Image Gen API — AI Image Generation API

A developer REST API for AI image generation — send a prompt, get back hosted image URLs. Three models, an async job flow, and a free tier with an instant API key.

Base URL: https://img-gen-api.sikasio.com

Generation is job-based: you submit a prompt and the API returns a job. Poll the job until it's done, or use the ?wait=true shortcut to get the result in a single call. Generated images are hosted on our servers and returned as stable https URLs.

Quick facts

Base URL
https://img-gen-api.sikasio.com
Endpoint
POST /v1/generate → poll GET /v1/jobs/:id
Auth
X-API-Key header — instant free key at /signup
Models
flash (1 credit) · studio · vivid (2 credits)
Output
Hosted JPG URLs, 1–4 images per request, 5 aspect ratios
Pricing
Free $0 (25 credits/mo) · Starter $12/mo (400) · Pro $39/mo (2,000)
Provider
Sikasio · support@sikasio.com

Get your free API key →

Getting your API key

New here? You can be making your first request in under a minute:

  1. Create a free account at /signup — just an email and a password, and accept the terms. No card required.
  2. Verify your email by entering the 6-digit code we send you.
  3. Copy your API key — it's shown once, right after verification, so save it somewhere safe. You can always see its prefix or regenerate a fresh key from your account dashboard.
  4. Send the key as the X-API-Key header (or Authorization: Bearer) on every /v1 request.
  5. Make your first call: POST /v1/generate with a prompt — see the quick start below.

Already have an account? Sign in. Forgot your password? Reset it here.

Authentication

Every /v1 request must include your API key in the X-API-Key header:

X-API-Key: igk_live_YOUR_KEY

An Authorization: Bearer igk_live_YOUR_KEY header works as an alternative to X-API-Key if that's a better fit for your HTTP client.

Missing, wrong, or disabled keys return 401. Credits are only charged for successful generations — failed jobs and validation errors cost nothing.

CORS: enabled (Access-Control-Allow-Origin: *) — you can call the API and embed returned image URLs directly from browser apps. Note that some sandboxed preview environments enforce their own content-security-policy allowlist and may block third-party hosts regardless.

Plans & quotas

Every plan has a per-minute rate limit plus hourly, daily, and monthly credit allowances (see models & credits for what a credit buys):

PlanPriceRequests / minCredits / hourCredits / dayCredits / month
free$013625
starter$12/mo32060400
pro$39/mo6602002,000

Check your live usage and remaining credits any time via GET /v1/usage. Upgrade from your dashboard whenever you need more.

Models & credits

ModelNameCredits / imageDescription
flashFlash1Fast standard image generation.
studioStudio2Premium, high-detail generation.
vividVivid2Premium photorealistic generation.

How credits work: 1 image = 1 credit on flash, 2 credits on studio/vivid; charged on success only.

Model availability: each model has a daily capacity. When a model's capacity for the day is used up it is temporarily unavailable (the others keep working) and comes back at the next daily reset — usually around 10:00 UTC (13:00 Cairo). Check before you send: GET /v1/availability (public, no key) or the available fields on GET /v1/models. A request for an unavailable model is rejected up front with 503 model_unavailable — no job is created and nothing is charged (see errors). Live view: status page.

Quick start

One-shot (synchronous)

curl -X POST "https://img-gen-api.sikasio.com/v1/generate?wait=true" \
  -H "X-API-Key: igk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a neon coffee cup, studio product shot",
    "model": "flash",
    "count": 2,
    "aspectRatio": "1:1"
  }'
{
  "id": "ab1ed22c-...",
  "status": "done",
  "images": [
    { "url": "https://img-gen-api.sikasio.com/files/ab1ed22c-..._1_89dc.jpg",
      "seed": 1698732404, "id": "user:...", "bytes": 575942 }
  ]
}

Use each images[].url directly in an <img> tag or download it.

Async vs. synchronous

Async (default)

POST /v1/generate returns 202 with a job id immediately. Poll GET /v1/jobs/:id until status is done or failed. Best for many/large requests and to avoid client timeouts.

Synchronous

Add ?wait=true to block until the images are ready (up to ~120s), returning the finished job inline. If it takes longer, you get the job back as running and can poll it.

Create a generation

POST/v1/generaterequires X-API-Key

Query: ?wait=true (optional) — block and return the finished job.

Body (JSON):

FieldTypeDefaultNotes
prompt requiredstringUp to 4000 characters.
modelstringflashflash · studio · vivid — see models & credits.
aspectRatiostring16:916:9 · 4:3 · 1:1 · 3:4 · 9:16
countinteger21–4 images.
sizestringoriginaloriginal · medium (≤1024px) · small (≤512px) · thumb (≤256px). Downscales + compresses for small, fast-loading files (e.g. thumbnails). Does not change generation time.
seedintegerOptional, for reproducible output.
referencesstring[]Optional. Up to 10 ids from previous results, used as reference images.

Returns 202 (async) or 200 (with ?wait=true, when done):

{ "id": "ab1ed22c-...", "status": "queued", "model": "flash",
  "count": 2, "createdAt": "2026-07-08T12:59:41.316Z" }

Retrieve a job

GET/v1/jobs/:idrequires X-API-Key

status transitions queuedrunningdone | failed.

{
  "id": "ab1ed22c-...",
  "status": "done",
  "model": "flash",
  "count": 2,
  "createdAt": "2026-07-08T12:59:41.316Z",
  "finishedAt": "2026-07-08T13:00:38.152Z",
  "images": [
    { "url": "https://img-gen-api.sikasio.com/files/..._1_....jpg",
      "seed": 1698732404, "id": "user:...", "bytes": 575942 }
  ]
}

On failure: { "status": "failed", "error": "…reason…" }. Unknown id → 404. Jobs are visible only to the API key that created them.

List models

GET/v1/modelsrequires X-API-Key
{ "default": "flash",
  "models": [
    { "id": "flash",  "label": "Flash",  "credits": 1, "description": "Fast standard image generation.",
      "available": true,  "reason": null,             "availableAt": null },
    { "id": "studio", "label": "Studio", "credits": 2, "description": "Premium, high-detail generation.",
      "available": false, "reason": "daily_capacity", "availableAt": "2026-08-18T10:00:00.000Z" },
    { "id": "vivid",  "label": "Vivid",  "credits": 2, "description": "Premium photorealistic generation.",
      "available": true,  "reason": null,             "availableAt": null }
  ],
  "aspectRatios": ["16:9","4:3","1:1","3:4","9:16"], "maxCount": 4,
  "sizes": ["original","medium","small","thumb"] }

available tells you whether the model can be used right now; reason is daily_capacity (back at availableAt, an estimate) or disabled.

Check model availability

GET/v1/availabilitypublic — no key

A tiny, unauthenticated JSON you can poll from any client or dashboard before sending a request. Same available/reason/availableAt semantics as /v1/models.

curl -s https://img-gen-api.sikasio.com/v1/availability
{ "models": {
    "flash":  { "available": true,  "reason": null,             "since": null, "availableAt": null },
    "studio": { "available": false, "reason": "daily_capacity", "since": "2026-08-17T14:02:11.000Z", "availableAt": "2026-08-18T10:00:00.000Z" },
    "vivid":  { "available": true,  "reason": null,             "since": null, "availableAt": null } },
  "updatedAt": "2026-08-17T15:00:00.000Z" }

Recommended client pattern: pick your preferred model; if it is unavailable, either fall back to one that is (flash = 1 credit, studio/vivid = 2) or retry after availableAt. Sending anyway returns 503 model_unavailable with the same information and a Retry-After header — it never creates a job or spends credits.

Check usage

GET/v1/usagerequires X-API-Key

Your key's plan, live credit usage across the three windows, and the queue state.

{ "name": "my-app",
  "plan": "starter",
  "limits": { "rpm": 3, "hourlyCredits": 20, "dailyCredits": 60, "monthlyCredits": 400 },
  "used": { "hour": 1, "day": 4, "month": 7 },
  "remaining": { "hour": 19, "day": 56, "month": 393 },
  "queue": { "total": 4, "queued": 0, "running": 1, "done": 3, "failed": 0, "active": 1 } }

Fetch an image

GET/files/:namepublic

Serves a generated image (the URLs returned by generation). Public, cacheable, and auto-deleted after a retention window (default 7 days) — download anything you need to keep.

Health check

GET/healthzpublic
{ "ok": true, "service": "img-gen-api" }

Parameters at a glance

Modelsflash (1 credit) · studio · vivid (2 credits)
Aspect ratios16:9 4:3 1:1 3:4 9:16
Count1–4 images per request
Prompt≤ 4000 characters
References≤ 10 previous image ids

Errors

All errors are JSON: { "error": { "code": "...", "message": "..." } }

StatusCodeMeaning
400bad_request / bad_jsonInvalid parameters or malformed body.
400bad_modelUnknown model — use flash, studio, or vivid.
401missing_key / invalid_keyNo, wrong, or disabled API key.
404not_foundUnknown job id or endpoint.
429rate_limitedPer-minute plan rate limit hit — see Retry-After.
429quota_exceededNot enough credits left in an hourly/daily/monthly window.
502job failedGeneration failed (e.g. content moderation). Try another prompt or model — failed jobs are never charged.
503model_unavailableThe requested model is out of daily capacity (or temporarily disabled). The body carries model, reason, availableAt and available (models you can use now); Retry-After is set. No job is created, nothing is charged. Check GET /v1/availability first.
503busyGeneration queue is full — retry after Retry-After.

Rate limits

Each plan sets a per-minute request limit plus hourly, daily, and monthly credit allowances (see plans & quotas). Only successful generations consume credits — validation errors and failed jobs don't. When you hit a limit you get 429 (rate_limited or quota_exceeded) with a Retry-After header (seconds). Check remaining credits any time via GET /v1/usage.

FAQ

What is Image Gen API?

Image Gen API is a developer REST API for AI image generation. You send a text prompt to POST https://img-gen-api.sikasio.com/v1/generate with an X-API-Key header and get back hosted image URLs. It is built by Sikasio, uses an async job flow (submit → poll → download), and has a free tier with an instant API key.

How do I generate an image with an API?

POST a JSON body with a prompt to https://img-gen-api.sikasio.com/v1/generate with your key in the X-API-Key header. Add ?wait=true to get the finished images in one call:

curl -X POST "https://img-gen-api.sikasio.com/v1/generate?wait=true" \
  -H "X-API-Key: igk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "a neon coffee cup, studio product shot", "model": "flash"}'
Is there a free image generation API?

Yes — a permanent free plan, no card required:

Credits25 / month
Daily allowance6 credits
Hourly allowance3 credits
Rate limit1 req / min

Sign up — your API key is issued instantly.

What models are available?
ModelNameCredits / imageBest for
flashFlash1Fast standard generation
studioStudio2Premium, high-detail work
vividVivid2Premium photorealism

List them any time with GET /v1/models.

What happens when a model is unavailable?

Each model has a daily capacity. When it is used up for the day the model is unavailable until the next daily reset (usually around 10:00 UTC) while the other models keep working. Check GET /v1/availability (public, no key) or the available field on GET /v1/models before sending; a request for an unavailable model returns 503 model_unavailable with the expected return time and the models you can use instead — no job is created and no credits are spent.

How do credits work?

1 image = 1 credit on flash, 2 credits on studio/vivid — charged on success only. Failed generations and validation errors cost nothing.

Each plan has hourly, daily, and monthly credit allowances; check your live balance with GET /v1/usage or on your dashboard.

What are the rate limits & quotas?
PlanPriceReq / minCredits / hrCredits / dayCredits / mo
Free$013625
Starter$12/mo32060400
Pro$39/mo6602002,000

Exceeding a limit returns 429 with a Retry-After header. Only successful generations consume credits.

How do I get an API key?
  1. Create a free account at /signup (email + password).
  2. Enter the 6-digit code we email you to verify.
  3. Copy your API key — shown once, regenerate anytime from the dashboard.
  4. Send it as the X-API-Key header (or Authorization: Bearer) on POST /v1/generate.

The whole flow takes under a minute.

How does the async job flow work?

POST /v1/generate returns 202 with a job id immediately. The job moves queuedrunningdone (or failed); poll GET /v1/jobs/:id until it finishes and read the hosted URLs from images[].

Prefer one call? Add ?wait=true to block up to ~120 seconds and receive the finished job inline.

Can I use generated images commercially?

Yes. Images generated on any plan — including the free tier — can be used in commercial products, stores, apps, and marketing, subject to the terms of service.

How long are generated images hosted?

Generated images are served from stable public URLs (unguessable filenames) with long cache headers and are auto-deleted after a retention window — 7 days by default. Download anything you need to keep.

Get an API key

Sign up and get a free key instantly — 25 credits a month, no card required. Upgrade to starter or pro from your account whenever you need more.

Get your free API key →

Questions? support@sikasio.com