Everything you need to call the API. Requests are async: submit a generation, then poll it until the outputs are ready. Base URL https://vogoo.ai/api/v1
Create a key on the API Keys page. Keys start with vogoo_ and act as your account, so keep them on the server. Send the key in either header:
Authorization: Bearer vogoo_xxxxxxxxxxxx
# or
x-api-key: vogoo_xxxxxxxxxxxxEvery model you can call, with its media type, supported tasks and credit cost. Browse the same list in the models market.
curl https://vogoo.ai/api/v1/models{
"object": "list",
"data": [
{
"id": "nano-banana-2",
"object": "model",
"name": "Nano Banana 2",
"brand": "Google",
"type": "image",
"scenes": ["text-to-image", "image-to-image"],
"description": "…",
"credits": "…",
"max_resolution": "…",
"duration": null,
"estimated_time": "…"
}
]
}Submits a job and answers 202 with a generation object in queued or in_progress state.
| Field | Type | Description |
|---|---|---|
model | string, required | A model id from the models market or GET /api/v1/models. |
prompt | string | What to generate. Required unless options carries the full input. |
scene | string | One of the model's tasks, such as text-to-video or image-to-video. Defaults to the first one. |
options | object | Model settings such as aspect_ratio, duration, image_input (image models) or image_urls (video models). Unsupported keys are ignored. |
enhance_prompt | boolean | Let Vogoo rewrite the prompt before it reaches the model. Default false. |
curl https://vogoo.ai/api/v1/generations \
-H "Authorization: Bearer $VOGOO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2",
"prompt": "Studio product shot of a matte black sneaker, soft light",
"options": { "aspect_ratio": "1:1" }
}'Returns the current state. Poll every few seconds until status is completed, failed or canceled. You can only read generations created by your own account.
// Node.js 18+: submit, then poll until done
const headers = {
Authorization: `Bearer ${process.env.VOGOO_API_KEY}`,
'Content-Type': 'application/json',
};
let gen = await fetch('https://vogoo.ai/api/v1/generations', {
method: 'POST',
headers,
body: JSON.stringify({ model: 'nano-banana-2', prompt: 'A cat astronaut' }),
}).then((r) => r.json());
while (gen.status === 'queued' || gen.status === 'in_progress') {
await new Promise((r) => setTimeout(r, 5000));
gen = await fetch(`https://vogoo.ai/api/v1/generations/${gen.id}`, { headers })
.then((r) => r.json());
}
console.log(gen.outputs);{
"id": "…",
"object": "generation",
"status": "completed", // queued | in_progress | completed | failed | canceled
"model": "nano-banana-2",
"model_name": "Nano Banana 2",
"type": "image",
"scene": "text-to-image",
"prompt": "A cat astronaut",
"outputs": [
{ "type": "image", "url": "https://…" }
// video: { "type": "video", "url", "thumbnail_url", "duration" }
// audio: { "type": "audio", "url", "thumbnail_url", "title", "duration" }
],
"error": null // { "code", "message" } when status is failed
}outputs stays empty until the generation completes. Download the files you want to keep.
Every error has the same shape. param is set when a request field is invalid.
{ "error": { "code": "INVALID_REQUEST", "message": "…", "param": "model" } }| Status | Code | Meaning |
|---|---|---|
| 400 | INVALID_REQUEST | Bad JSON, unknown model or scene, missing prompt. |
| 400 | GENERATION_FAILED | The model rejected the input. |
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 402 | INSUFFICIENT_CREDITS | Not enough credits for this generation. |
| 403 | FORBIDDEN | Account suspended, email not verified, or the model needs a paid plan. |
| 404 | NOT_FOUND | No generation with that id on your account. |
| 422 | CONTENT_POLICY | Prompt or input blocked by moderation. |
| 429 | RATE_LIMITED | Too many requests or too many jobs running at once. |
| 503 | SERVICE_UNAVAILABLE | Upstream model busy or timed out. Retry later. |
| 500 | INTERNAL_ERROR | Unexpected error on our side. |