API reference
Models
A model is a generator you can call by
slug. Each one publishes a parameter spec, so you know exactly which inputs and params are valid before you spend credits.GET
/api/v1/modelsSearch and page through enabled models in catalog order. Items are compact; fetch one model for its full spec. Uses the list envelope and is cacheable (
ETag, max-age=60).Query
kindstringOne of
image, video, audio, edit, upscale, lipsync.familystringBrand, case-insensitive, e.g.
Google, Kling.taskstringe.g.
text-to-image, image-to-video, text-to-speech.qstringSearch by name, slug or brand.
limitinteger1–100.Default
24cursorstringThe
next_cursor from the previous page.curl "https://<your-host>/api/v1/models?task=image-to-video&limit=10" -H "Authorization: Bearer $AIO_KEY"{
"object": "list",
"data": [
{
"object": "model",
"slug": "kling-2-5-turbo",
"name": "Kling 2.5 Turbo",
"family": "Kling",
"kind": "video",
"tasks": ["image-to-video"],
"description": "Smooth, cinematic motion from a single frame.",
"badge": "FAST",
"default_credits": 50,
"cover_url": null,
"inputs": { "prompt": "required", "images": { "min": 1, "max": 1 }, "video": null, "audio": null }
}
],
"has_more": true,
"next_cursor": "eyJvIjoxMCwiZiI6IkJ3b…"
}GET
/api/v1/models/{slug}The full spec for one model: params, raw pricing, pricing explained (formula, default cost, cost per priced option), inputs explained and an example request body. Returns
404 MODEL_UNAVAILABLE if the slug is unknown or the model is disabled.{
"object": "model",
"slug": "flux-2-pro",
"name": "FLUX.2 Pro",
"family": "FLUX",
"kind": "image",
"tasks": ["text-to-image"],
"description": "Fast, sharp and photographic.",
"badge": "FAST",
"default_credits": 5,
"cover_url": null,
"inputs": { "prompt": "required", "images": null, "video": null, "audio": null },
"avg_seconds": 8,
"params": {
"prompt": "required",
"negativePrompt": false,
"controls": [
{ "key": "aspect_ratio", "label": "Aspect", "type": "select", "default": "1:1",
"options": [{ "value": "1:1", "label": "1:1" }, { "value": "16:9", "label": "16:9" }] },
{ "key": "num_images", "label": "Count", "type": "select", "default": 1,
"options": [{ "value": 1, "label": "1" }, { "value": 4, "label": "4" }] },
{ "key": "seed", "label": "Seed", "type": "number", "min": 0, "max": 2147483647, "default": 0 }
]
},
"pricing": { "base": 5, "perUnitKey": "num_images" },
"pricing_explained": {
"default_params": { "aspect_ratio": "1:1", "num_images": 1, "seed": 0 },
"default_credits": 5,
"formula": ["5 credits base", "× params.num_images (one charge per output)", "rounded up, minimum 1"],
"variants": [
{ "params": { "num_images": 1 }, "credits": 5 },
{ "params": { "num_images": 4 }, "credits": 20 }
]
},
"inputs_explained": ["prompt: required", "inputs.images: not accepted"],
"example_request": { "model": "flux-2-pro", "prompt": "…" }
}Reading the params spec#
prompt:required,optionalornone.negativePrompt: truemeansnegative_promptis honoured.images,video,audio: present only if the model accepts that input, withmin/maxcounts. Send URLs ininputs.imagesetc. when creating a generation.controls: each becomes a key inparams.selectvalues must match an option exactly;numbermust be withinmin–max. Omitted keys usedefault; unknown keys are ignored.
Pricing formula#
credits = ceil( base × Π multipliers[key][params[key]] × params[perUnitKey] + perSecond × params.duration ) (minimum 1)Template generations ignore this formula and cost the template's fixed credits. To get the exact number for a request, use the estimate endpoint.
POST
/api/v1/estimatePrice a request without creating anything. Validates
params with the same rules as generation.Body
modelstringModel slug. Provide this or
template.templatestringTemplate slug.
paramsobjectSame shape as in POST /api/v1/generations.Default
{}curl https://<your-host>/api/v1/estimate \
-H "Authorization: Bearer $AIO_KEY" -H "Content-Type: application/json" \
-d '{ "model": "kling-2-5-turbo", "params": { "duration": 10 } }'{ "object": "estimate", "model": "kling-2-5-turbo", "template": null,
"params": { "duration": 10 }, "credits": 70, "balance": 1840, "sufficient": true }Live catalog#
Rendered from the production catalog, so it is always current. Search, filter by kind and scroll to load more; open a row for its params and pricing. Use the slug in model; see Generations for the request shape.