Pets
Manage your own pets, upload their photos, and generate AI portraits.
Create a Pet
Create a profile for your pet. You can include an initial image(s) or upload one later.
curl -X POST -H "x-api-key: YOUR-API-KEY" -H "Content-Type: multipart/form-data" \
-F "name=Buddy" \
-F "breed_id=15" \
-F "date_of_birth=2022-06-15" \
-F "sub_id=my-user-123" \
-F "microchip_id=123456789" \
-F "description=My best friend" \
-F "images=@/path/to/photo.jpg"
https://api.thedogapi.com/v1/pets
List your Pets
Get a list of all pets you have created.
curl -H "x-api-key: YOUR-API-KEY" https://api.thedogapi.com/v1/pets
Example Response
[
{
"id": "pet123",
"name": "Buddy",
"breed_id": "15",
"species_id": "2",
"description": "My best friend",
"sub_id": "my-user-123",
"microchip_id": "123456789",
"date_of_birth": "2022-06-15",
"images": [
{
"id": "abc123",
"url": "https://cdn.example.com/images/abc123.jpg",
"pet_id": "pet123",
"width": 640,
"height": 480,
"pose": "front",
"pet_age_months": 18,
"created_at": "2024-01-01T12:00:00.000Z"
}
],
"created_at": "2024-01-01T12:00:00.000Z",
"updated_at": "2024-01-01T12:00:00.000Z"
}
]
Get Pet Details
curl -H "x-api-key: YOUR-API-KEY" https://api.thedogapi.com/v1/pets/pet123
Update a Pet
curl -X PATCH -H "x-api-key: YOUR-API-KEY" -H "Content-Type: application/json" \
-d '{"description": "Loves playing fetch"}' \
https://api.thedogapi.com/v1/pets/pet123
Upload Pet Images
Upload additional photos for a specific pet.
curl -X POST -H "x-api-key: YOUR-API-KEY" -H "Content-Type: multipart/form-data" \
-F "file=@/path/to/photo.jpg" \
-F "poses={\"0\":\"front\"}" \
https://api.thedogapi.com/v1/pets/pet123/images
List Portrait Styles
Returns the list of valid styles to use when generating a portrait.
curl -H "x-api-key: YOUR-API-KEY" https://api.thedogapi.com/v1/pets/portrait-styles
Example Response
[
{
"id": "birthday_party",
"name": "Birthday",
"description": "Balloons, candles, celebration scene",
"category": "holiday",
"popularity_score": 90
}
]
Generate Portrait
Create a stylized portrait of your pet.
curl -X POST -H "x-api-key: YOUR-API-KEY" -H "Content-Type: application/json" \
-d '{"style": "birthday_party"}' \
https://api.thedogapi.com/v1/pets/pet123/portrait
Delete a Pet
curl -X DELETE -H "x-api-key: YOUR-API-KEY" https://api.thedogapi.com/v1/pets/pet123