API reference
One endpoint creates every kind of generation. Base URL: https://generativeaiapi.com/api/public/v1
Authentication
Send your key as a bearer token on every request. Keys start with gai_live_ and are shown once at creation — store them in your server environment, never in browser code.
Authorization: Bearer gai_live_xxxxxxxxCreate a generation
Credits are deducted when the job starts and refunded automatically if it fails. Pass wait: true to block until the job finishes (up to two minutes) instead of polling.
POST /api/public/v1/generations
Authorization: Bearer gai_live_xxxxxxxx
Content-Type: application/json
{
"model": "studio-image",
"prompt": "an orbital greenhouse at golden hour",
"options": { "aspect_ratio": "16:9" },
"wait": false
}{
"id": "0f1b8b2e-...",
"status": "processing",
"model": "studio-image",
"kind": "image",
"prompt": "an orbital greenhouse at golden hour",
"credits": 5,
"outputs": [],
"text": null,
"error": null,
"created_at": "2026-08-09T05:19:08.000Z",
"completed_at": null
}| Field | Type | Notes |
|---|---|---|
| model | string | Model slug from the catalogue. Required. |
| prompt | string | Required for image and video models. |
| image | string | https URL or base64 data URL for image input. |
| options | object | Model-specific options; unknown keys are ignored. |
| wait | boolean | Block until the job settles. |
| webhook_url | string | Stored with the job for your own bookkeeping. |
Retrieve a generation
Poll every couple of seconds until status is succeeded or failed. Output URLs are signed and valid for seven days.
curl https://generativeaiapi.com/api/public/v1/generations/0f1b8b2e-... \
-H "Authorization: Bearer gai_live_xxxxxxxx"
# once finished
{
"status": "succeeded",
"outputs": ["https://.../0.png"],
"completed_at": "2026-08-09T05:19:31.000Z"
}Video & image input
Video jobs take one to three minutes. Image-to-video models require the image field.
curl https://generativeaiapi.com/api/public/v1/generations \
-H "Authorization: Bearer gai_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "animate-video",
"prompt": "slow dolly in, drifting dust",
"image": "https://example.com/still.jpg",
"options": { "resolution": "480p" }
}'Image tagging
Tagging models return their result in text rather than outputs.
curl https://generativeaiapi.com/api/public/v1/generations \
-H "Authorization: Bearer gai_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "image-tags",
"image": "https://example.com/product.jpg",
"wait": true
}'
# -> { "status": "succeeded", "text": "studio photo, ceramic mug, ..." }const res = await fetch("https://generativeaiapi.com/api/public/v1/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GENAI_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ model: "turbo-image", prompt: "a brutalist library", wait: true }),
});
const job = await res.json();
console.log(job.outputs[0]);Models endpoint
GET /v1/models returns the live catalogue with credit costs. No authentication required.
flash-image image 1 credits
turbo-image image 2 credits
studio-image image 5 credits
edit-image image 6 credits
pro-image image 10 credits
max-image image 16 credits
motion-video video 45 credits
animate-video video 22 credits
story-video video 35 credits
image-tags tag 1 credits
image-caption tag 1 creditsErrors
| 400 | Invalid request — bad model slug, missing prompt or missing image. |
| 401 | Missing, malformed or revoked API key. |
| 402 | Insufficient credits. Top up and retry. |
| 404 | Generation not found for this account. |
| 500 | Unexpected platform error. Safe to retry. |