For developers
Connect your intake software
When an intake photo is ready, your server or automation can request a portrait and attach the labeled pair to the dog’s record. The same pair appears in the shelter’s Saved portraits.
POST /api/v1/portraits
Authorization: Bearer YOUR_KEY
Content-Type: application/json
Idempotency-Key: intake-A833997-photo-v1
{
"name": "Cedrick",
"note": "Patchy fur on the forehead",
"photo": "data:image/jpeg;base64,…"
} You get a job ID and a status URL right away. Each accepted job uses one generation from the same daily limit as the studio.
Three calls, start to finish
Submit one job per photo revision, wait for it to finish, then save the labeled pair.
- 1
Create a workspace key
In the shelter studio, open Integrations. Choose Generate and read for intake, or Read only to import portraits staff make. The key is shown once.
- 2
Submit the photo
Send the dog’s name, an optional care note and the photo to
POST /api/v1/portraitswith a stableIdempotency-Key. - 3
Save the pair
Check the
status_urluntil the job completes, then save both images and their labels on the animal record.
Reference
The essentials. The OpenAPI specification has every field.
Authentication
One key per integration. Store it in your automation’s secret settings.
Send the key on every request as Authorization: Bearer YOUR_KEY. Use HTTPS
for a hosted workspace.
To rotate, create a replacement key, update the integration, then revoke the old key. Revocation blocks future requests immediately. Jobs already accepted still finish.
Submitting a photo
JPEG or PNG as a base64 data URL, up to 5 MB before encoding.
Include the dog’s name, an optional note describing the visible, temporary concern, and
the photo. Supply an Idempotency-Key for each intake event or photo revision.
If delivery is interrupted, send the same body and key again. All keys for a shelter share the same idempotency history. Reusing a key with different content returns HTTP 409.
Checking the result
Poll the status_url on the same host.
queued·processingWait the number of seconds inRetry-After, then check again.completedGET theportrait_url. Saveid, thephotoandillustrationimages, and theirlabels.failedTerminal, with an error. Inspect it before retrying with a new event ID.
Queued jobs survive restarts. A job interrupted mid-generation is marked failed, so it is never charged twice.
Importing existing portraits
Includes portraits staff made in the studio.
GET /api/v1/portraits?after_id=0 returns up to 50 summaries in ascending ID
order. Use next_after_id for the next page and save the highest ID you
processed for your next sync. Fetch each pair with GET /api/v1/portraits/{id}.
Errors and limits
Every error response includes an error message.
| 401 | The key is missing, invalid or revoked. |
|---|---|
| 403 | The key lacks generation access. |
| 404 | The item isn’t available in this shelter. |
| 400 · 413 · 415 | Invalid input, too large, or the wrong content type. |
| 429 | The daily generation limit is used up. It resets at midnight UTC. |
| 503 | Generation isn’t configured on this server. |
Sharing the pair
Keep the shelter photo and the AI illustration label together wherever you show the pair. The illustration shows one possible appearance. Use the current shelter photo as the main listing image.
Ready to connect?
Create a key in the studio. API jobs share the studio’s daily generation limit.