API reference

One endpoint creates every kind of generation. Base URL: https://generativeaiapi.com/api/public/v1

Create an API key

Quickstart

Three steps: create a key in your dashboard, export it, and make one call. This request blocks until the image is ready and returns its URL.

curl
curl https://generativeaiapi.com/api/public/v1/generations \
  -H "Authorization: Bearer $GENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "turbo-image", "prompt": "a brutalist library", "wait": true }'

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.

header
Authorization: Bearer gai_live_xxxxxxxx

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

request
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
}
201 response
{
  "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
}
FieldTypeNotes
modelstringModel slug from the catalogue. Required.
promptstringRequired for image and video models.
imagestringhttps URL or base64 data URL for image input.
optionsobjectModel-specific options; unknown keys are ignored.
waitbooleanBlock until the job settles.
webhook_urlstringStored 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.

GET /v1/generations/{id}
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.

image-to-video
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.

tagging
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, ..." }
node
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.

slugs
flash-image      image  2 credits
turbo-image      image  3 credits
studio-image     image  4 credits
edit-image       image  14 credits
pro-image        image  16 credits
max-image        image  52 credits
video-extend     video  200 credits
motion-video     video  40 credits
motion-video-fast video  16 credits
motion-video-large video  80 credits
motion-video-large-fast video  32 credits
animate-video    video  20 credits
story-video      video  74 credits
image-tags       tag    4 credits
image-caption    tag    1 credits

Limits & best practice

  • Keep keys server-side. A key in browser code can be read and reused by anyone.
  • Poll no faster than once every two seconds; images settle in seconds, video in one to three minutes.
  • Use wait: true only for fast image models — long video jobs should be polled instead.
  • Download outputs you want to keep. Signed URLs stay valid for seven days.
  • Retry 500s with backoff; 400, 401 and 402 will not succeed on retry without a change.
  • Read credit costs from the models endpoint rather than hardcoding them.

Errors

400Invalid request — bad model slug, missing prompt or missing image.
401Missing, malformed or revoked API key.
402Insufficient credits. Top up and retry.
404Generation not found for this account.
500Unexpected platform error. Safe to retry.