Get started
Models and variants
The catalog is an endpoint. Read it to learn every model's id, prices and input fields.
GET /v1/models lists every model that can run right now with its variants and prices. GET /v1/models/{id} adds the allowed quantity and every input field the model accepts. Neither needs a key. The same catalog is on the Models page.
{
"id": "nano-banana-pro",
"name": "Nano Banana Pro",
"maker": "Google",
"category": "image",
"unit": "per_image",
"variants": [
{ "id": "1k", "label": "1K", "price_usd": 0.141225, "providers": 2 },
{ "id": "2k", "label": "2K", "price_usd": 0.141225, "providers": 2 },
{ "id": "4k", "label": "4K", "price_usd": 0.252105, "providers": 2 }
],
"quantity": { "min": 1, "max": 4 },
"inputs": {
"prompt": { "type": "text", "required": true, "max": 20000 },
"aspect_ratio": { "type": "enum", "required": false, "values": ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"] },
"images": { "type": "url_list", "required": false, "max": 14 }
}
}How to read a model
- A variant is a priced setting such as
720por1080p+audio. Itsprice_usdis per unit.providersis how many providers can run it. - The unit is what
quantitycounts:per_second(seconds of video),per_image,per_run(always 1) orper_1k_chars. - For
per_1k_charsmodels, leavequantityout. It is worked out from the text: one unit per 1,000 characters, rounded up. inputsis the complete list of fields the model takes ininput. A field the model does not list is refused with a 400, never passed through.
Input types
| Type | What to send |
|---|---|
text | A string, up to max characters. |
enum | One of values. |
int | A whole number between min and max. |
bool | true or false. |
url | A public https URL to a file. |
url_list | A list of public https URLs, up to max. |
Files (images, end_image, audio, video) are always public https URLs. OpenGrid does not accept uploads or base64 data.