API reference
Pagination & caching
Every list endpoint returns one page at a time in the same envelope, filters on the server, and the catalog endpoints can be cached with standard HTTP validators.
The list envelope#
GET /api/v1/models, GET /api/v1/templates and GET /api/v1/generations all respond with:
{
"object": "list",
"data": [ { "object": "template", "slug": "studio-headshot", "…": "…" } ],
"has_more": true,
"next_cursor": "eyJvIjoyNCwiZiI6IlpZbTd5QkxORmIifQ"
}Query
limitintegerItems per page, 1–100.Default
24cursorstringOpaque. Pass the previous page's
next_cursor unchanged, with the same filters. A cursor from a different query is rejected with 400 INVALID_INPUT (field: "cursor").has_more: falseandnext_cursor: nullmark the last page.- A page can occasionally hold fewer than
limititems whilehas_moreis still true. Keep following the cursor. - Cursors do not expire, but the catalog can change between pages; treat a full walk as a snapshot that may be slightly stale.
Server-side filters#
| Endpoint | Filters |
|---|---|
/api/v1/models | kind (image, video, audio, edit, upscale, lipsync), family (brand, case-insensitive), task (e.g. image-to-video), q (name, slug or brand) |
/api/v1/templates | kind (image, video), category (slug), q (title contains, case-insensitive), sort (default editorial order, popular most used, newest) |
/api/v1/generations | status. Always newest first. |
Walking every page
# first page of popular video templates
curl "https://<your-host>/api/v1/templates?kind=video&sort=popular&limit=50" \
-H "Authorization: Bearer $AIO_KEY"
# next page: same filters + cursor
curl "https://<your-host>/api/v1/templates?kind=video&sort=popular&limit=50&cursor=eyJvIjo1MC…" \
-H "Authorization: Bearer $AIO_KEY"Lean lists, rich detail#
List items are compact: slug, name or title, kind, badge, credits (default_credits for models), cover/preview URLs and an input summary. The full spec lives on the detail endpoints, GET /models/{slug} and GET /templates/{slug}: every control, pricing explained, inputs explained and a ready-to-send example_request.
Caching#
| Endpoints | Cache-Control |
|---|---|
GET /models, /models/{slug}, /templates, /templates/{slug} | public, max-age=60, stale-while-revalidate=300 |
| Everything else (generations, estimate, uploads, me, errors) | no-store |
Catalog responses carry an ETag. Send it back as If-None-Match and an unchanged response comes back as 304 Not Modified with no body. Conditional requests still count toward the rate limit but transfer almost nothing.
curl -i "https://<your-host>/api/v1/models?kind=video" -H "Authorization: Bearer $AIO_KEY"
# HTTP/1.1 200 OK
# cache-control: public, max-age=60, stale-while-revalidate=300
# etag: W/"K4dGLo7CNc1QA2f2v0-ivinRIpI"
curl -i "https://<your-host>/api/v1/models?kind=video" -H "Authorization: Bearer $AIO_KEY" \
-H 'If-None-Match: W/"K4dGLo7CNc1QA2f2v0-ivinRIpI"'
# HTTP/1.1 304 Not ModifiedSame catalog for every key
Models and templates are identical for every caller, which is why their responses are markedpublic. Anything team-specific (generations, balance) is always no-store.