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:

200 OK
{
  "object": "list",
  "data": [ { "object": "template", "slug": "studio-headshot", "…": "…" } ],
  "has_more": true,
  "next_cursor": "eyJvIjoyNCwiZiI6IlpZbTd5QkxORmIifQ"
}

Query

limitinteger
Items per page, 1–100.Default 24
cursorstring
Opaque. 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: false and next_cursor: null mark the last page.
  • A page can occasionally hold fewer than limit items while has_more is 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#

EndpointFilters
/api/v1/modelskind (image, video, audio, edit, upscale, lipsync), family (brand, case-insensitive), task (e.g. image-to-video), q (name, slug or brand)
/api/v1/templateskind (image, video), category (slug), q (title contains, case-insensitive), sort (default editorial order, popular most used, newest)
/api/v1/generationsstatus. 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#

EndpointsCache-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 Modified

Same catalog for every key

Models and templates are identical for every caller, which is why their responses are marked public. Anything team-specific (generations, balance) is always no-store.