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/templates
Search 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

kindstring
image or video.
categorystring
Category slug, e.g. vp-dancing-dogs.
qstring
Title contains (case-insensitive), e.g. headshot.
sortstring
default (editorial order), popular (most used first) or newest.Default default
limitinteger
1–100.Default 24
cursorstring
The next_cursor from the previous page.
curl "https://<your-host>/api/v1/templates?kind=video&sort=popular&limit=12" -H "Authorization: Bearer $AIO_KEY"
200 OK
{
  "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.
200 OK
{
  "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) or required.
  • images: how many photos to send in inputs.images. slotLabels describes each one in order.
  • durations, aspectRatios: allowed values for params.duration and params.aspect_ratio when present.

Run a template#

Pass template instead of model. The charge is always the template's credits.

bash
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.