Skip to main content

Images

Search, list, and upload dog images.

Search images​

curl -H "x-api-key: YOUR-API-KEY" "https://api.thedogapi.com/v1/images/search?limit=2"

Example response:

[
{
"id": "BJa4kxc4X",
"url": "https://cdn2.thedogapi.com/images/BJa4kxc4X.jpg",
"width": 1600,
"height": 1199,
"breeds": []
}
]

Useful search filters​

ParameterExampleDescription
limit10Number of images to return (1–100 with an API key).
page0Zero-based page index, see pagination.
orderRANDASC, DESC or RAND by upload date.
has_breeds1Only return images that have breed information.
breed_ids115,1Comma-separated breed IDs to filter by.
include_breeds1Embed the full breed objects in each image.
include_categories1Embed category objects in each image.
sub_idmy-user-123Only images uploaded with this sub_id.

For example, two random German Shepherd images with breed details attached:

curl -H "x-api-key: YOUR-API-KEY" "https://api.thedogapi.com/v1/images/search?limit=2&breed_ids=115&include_breeds=1"

Get an image by ID​

curl -H "x-api-key: YOUR-API-KEY" https://api.thedogapi.com/v1/images/BJa4kxc4X

Upload an image​

curl -X POST -H "x-api-key: YOUR-API-KEY" -F "file=@/path/dog.jpg" https://api.thedogapi.com/v1/images/upload

Synchronous Upload​

Upload an image and wait for the analysis (breed detection and categorisation) to complete before the response is returned. This endpoint lives on the dedicated upload host.

curl -X POST -H "x-api-key: YOUR-API-KEY" -F "file=@/path/dog.jpg" https://upload.thedogapi.com/v1/images/upload-sync

See Image Uploads for the full upload flow, status polling and quota checks.

Check Image Status​

Poll this endpoint to check if an uploaded image has been processed.

curl -H "x-api-key: YOUR-API-KEY" https://api.thedogapi.com/v1/images/IMAGE_ID/status

Example Status Response​

{
"id": "my-image-123",
"status": "clean",
"updated_at": "2024-01-01T12:00:00.000Z"
}

List your uploaded images​

curl -H "x-api-key: YOUR-API-KEY" https://api.thedogapi.com/v1/images

Filter by sub_id​

curl -H "x-api-key: YOUR-API-KEY" "https://api.thedogapi.com/v1/images?sub_id=YOUR-SUB-ID"

Delete an uploaded image​

curl -X DELETE -H "x-api-key: YOUR-API-KEY" https://api.thedogapi.com/v1/images/IMAGE_ID

Get Image Labels​

Retrieve the AI-generated labels (breeds, categories) for one of your uploaded images.

curl -H "x-api-key: YOUR-API-KEY" https://api.thedogapi.com/v1/images/IMAGE_ID/labels