API reference
Templates
Templates are curated effects: a tuned prompt and settings behind a single slug and a fixed price. You supply only what the template asks for, usually one or two photos.
GET
/api/v1/templatesSearch and page through enabled templates. Items are compact; fetch one template for its full input description. Uses the list envelope and is cacheable (
ETag, max-age=60).Query
kindstringimage or video.categorystringCategory slug, e.g. vp-dancing-dogs.
qstringTitle contains (case-insensitive), e.g. headshot.
sortstringdefault (editorial order), popular (most used first) or newest.Default defaultlimitinteger1–100.Default
24cursorstringThe
next_cursor from the previous page.curl "https://<your-host>/api/v1/templates?kind=video&sort=popular&limit=12" -H "Authorization: Bearer $AIO_KEY"{
"object": "list",
"data": [
{
"object": "template",
"slug": "studio-headshot",
"title": "Studio headshot",
"kind": "image",
"category": "portraits",
"credits": 12,
"badge": "TOP",
"is_pro": false,
"cover_url": "https://cdn…/cover.jpg",
"preview_url": null,
"inputs": { "prompt": "none", "images": { "min": 1, "max": 1 } }
}
],
"has_more": true,
"next_cursor": "eyJvIjoxMiwiZiI6Ilp5bTd5…"
}GET
/api/v1/templates/{slug}Full detail for one template: inputs (raw and explained in words), the fixed price and an example request body. Returns
404 TEMPLATE_UNAVAILABLE if it is unknown or disabled.{
"object": "template",
"slug": "studio-headshot",
"title": "Studio headshot",
"description": "Clean grey-backdrop portrait from any selfie.",
"kind": "image",
"category": { "slug": "portraits", "title": "Portraits" },
"inputs": { "prompt": "none", "images": { "min": 1, "max": 1, "slotLabels": ["Selfie"] } },
"inputs_explained": ["prompt: none (ignored if sent)", "inputs.images: exactly 1 photo URL (in order: Selfie)"],
"credits": 12,
"pricing_explained": "Fixed price: 12 credits per run, whatever the params.",
"badge": "TOP",
"is_pro": false,
"cover_url": "https://cdn…/cover.jpg",
"preview_url": null,
"preview_format": "image",
"media_ratio": 0.75,
"example_request": { "template": "studio-headshot", "inputs": { "images": ["https://…/photo.jpg"] } }
}The inputs object#
prompt:none(any prompt you send is ignored),optional(appended to the template's own prompt) orrequired.images: how many photos to send ininputs.images.slotLabelsdescribes each one in order.durations,aspectRatios: allowed values forparams.durationandparams.aspect_ratiowhen present.
Run a template#
Pass template instead of model. The charge is always the template's credits.
curl https://<your-host>/api/v1/generations \
-H "Authorization: Bearer $AIO_KEY" -H "Content-Type: application/json" \
-d '{
"template": "studio-headshot",
"inputs": { "images": ["https://cdn…/uploads/selfie.jpg"] }
}'Live list#
Search by title, filter by kind and scroll to load more.