Developer API

One API key.
Every AI model.

Call Midjourney, Veo, Kling, Seedance, Suno, ElevenLabs and 30+ other models through a single REST endpoint. Same account, same credits, same prices as the app — no separate contract.

Quickstart

Submit a job, poll until it completes, use the file. Three calls, any language.

# 1. Submit a job
curl -X POST https://ai-genbackend-production.up.railway.app/api/generations \
  -H "X-API-Key: nx_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "a red fox in fresh snow, golden hour, 85mm", "model": "nano-banana-2", "aspectRatio": "16:9"}'
# → { "generationId": "3f1c…" }

# 2. Poll until status is "completed"
curl https://ai-genbackend-production.up.railway.app/api/generations/3f1c… -H "X-API-Key: nx_live_YOUR_KEY"
# → { "status": "completed", "mediaUrl": "https://cdn…/….png", "cost": 60, … }

Base URL

https://ai-genbackend-production.up.railway.app/api

Send the key as the X-API-Key header (or as a Bearer token). Keys are created in Settings → API and shown once.

How it works

The same pipeline the app uses — your code just skips the UI.

01

Create a key

Settings → API → New key. Available on every paid plan and for team members; name it per service so you can revoke keys independently.

02

POST a generation

Send the prompt, pick a model by its slug, add model-specific options. The response is a job id — credits are charged once, when the job is accepted.

03

Collect the result

Poll the job until its status is completed — mediaUrl points to the file on our CDN. Failed jobs are refunded automatically.

Built for shipping, not demos

Everything the app can do, with the same guarantees behind it.

30+ models, one integration

Switching from FLUX to Midjourney or from Kling to Veo is a change to one field. New models land in the API the day they land in the app.

One balance

API calls draw on the same credits as the app and the Telegram bot. No separate wallet, no minimum commitment.

Pay per generation

Credits, not seats. A generation costs the same whether it comes from a browser or a cron job, and failed jobs are refunded.

Image, video, voice, music

Four content types behind one endpoint — the model slug decides the output, the response shape is the same.

Provider failover built in

Most models are backed by more than one upstream. When a provider stalls, the job is retried elsewhere — you see a result, not an outage.

Team-ready

Members of a Business team create their own keys that spend from the team pool. Revoke a person, keep the pipeline.

Auto top-up

Save a card and set a line: when the balance drops below it, we add credits automatically — no job dies mid-batch.

Usage by model and key

Spend per day, per model and per API key, plus the full request log — in the dashboard or via /usage.

Low-balance alerts

Pick a number of credits; we email you the moment your balance crosses it.

Endpoint reference

The public surface. Billing, key management and account settings are session-only by design — a leaked key cannot touch them.

MethodEndpointDescription
POST/generationsCreate a generation. Returns .
GET/generations/:idJob status, cost and mediaUrl once completed.
GET/generationsvideo
DELETE/generations/:idCancel a queued or processing job (credits refunded) or delete a finished one.
GET/auth/meYour profile, plan and current credit balance.
GET/generations/:id/streamServer-Sent Events progress stream. Pass the key as ?token= — EventSource cannot set headers.
GET/usage/summary?days=30Credits spent per day, model, source and API key over the last N days.
GET/usage/requestsPaged request log; filter with ?source=api, ?keyId=, ?status=.

Request body — POST /generations

FieldTypeDescription
promptstringText prompt, 1–10 000 characters. Required.
modelstringModel slug, e.g. nano-banana-2, flux-pro, midjourney-v7, seedance, suno-v5, elevenlabs-tts. Required.
aspectRatiostringImage / video aspect ratio: 1:1, 16:9, 9:16, 4:3, 3:2, 21:9 …
referenceImagesstring[]Image URLs for image-to-image and reference modes.
videoDurationstringVideo length in seconds as a string ("5", "10"); allowed values depend on the model.
videoResolutionstring480p, 720p or 1080p — model-dependent.
voicestringVoice preset for text-to-speech models.
musicDurationstringClip length preset for music models.

Job lifecycle

queued → processing → completed

Full model list, slugs and prices →

Same credits, same prices

There is no separate API price list. A generation costs the same credits whether it comes from the app or from your code, and both draw from one balance.

Basic

$15/mo

8.000 credits / month

2 parallel jobs

Pro

$39/mo

20.000 credits / month

6 parallel jobs

Max

$99/mo

60.000 credits / month

8 parallel jobs

Business

$50/mo

per seat

30.000 credits / month

16 parallel jobs

The Free trial does not include API access — it is image-only and time-boxed, which makes it the one tier a script could farm. Top-up packs stack on any plan and never expire.

Häufig gestellte Fragen

Ready to build?

Create a key in Settings and make your first call in under a minute.

Get your API key