Go to https://api.ovh.com/console/ and create a new API key with these rights (replace domain.ltd with your domain managed at OVH):
GET /domain/zone/
GET /domain/zone/domain.ltd/status
GET /domain/zone/domain.ltd/record
GET /domain/zone/domain.ltd/record/*
POST /domain/zone/domain.ltd/record
POST /domain/zone/domain.ltd/refresh
DELETE /domain/zone/domain.ltd/record/*