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→ pollGET /v1/jobs/:id- Auth
X-API-Keyheader — 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
Getting your API key
New here? You can be making your first request in under a minute:
- Create a free account at /signup — just an email and a password, and accept the terms. No card required.
- Verify your email by entering the 6-digit code we send you.
- 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.
- Send the key as the
X-API-Keyheader (orAuthorization: Bearer) on every/v1request. - Make your first call:
POST /v1/generatewith 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):
| Plan | Price | Requests / min | Credits / hour | Credits / day | Credits / month |
|---|---|---|---|---|---|
free | $0 | 1 | 3 | 6 | 25 |
starter | $12/mo | 3 | 20 | 60 | 400 |
pro | $39/mo | 6 | 60 | 200 | 2,000 |
Check your live usage and remaining credits any time via
GET /v1/usage. Upgrade from your
dashboard whenever you need more.
Models & credits
| Model | Name | Credits / image | Description |
|---|---|---|---|
flash | Flash | 1 | Fast standard image generation. |
studio | Studio | 2 | Premium, high-detail generation. |
vivid | Vivid | 2 | Premium 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
Query: ?wait=true (optional) — block and return the finished job.
Body (JSON):
| Field | Type | Default | Notes |
|---|---|---|---|
prompt required | string | — | Up to 4000 characters. |
model | string | flash | flash · studio · vivid — see models & credits. |
aspectRatio | string | 16:9 | 16:9 · 4:3 · 1:1 · 3:4 · 9:16 |
count | integer | 2 | 1–4 images. |
size | string | original | original · medium (≤1024px) · small (≤512px) · thumb (≤256px). Downscales + compresses for small, fast-loading files (e.g. thumbnails). Does not change generation time. |
seed | integer | — | Optional, for reproducible output. |
references | string[] | — | 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
status transitions queued → running → done | 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
{ "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
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
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
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
{ "ok": true, "service": "img-gen-api" }
Parameters at a glance
| Models | flash (1 credit) · studio · vivid (2 credits) |
|---|---|
| Aspect ratios | 16:9 4:3 1:1 3:4 9:16 |
| Count | 1–4 images per request |
| Prompt | ≤ 4000 characters |
| References | ≤ 10 previous image ids |
Errors
All errors are JSON: { "error": { "code": "...", "message": "..." } }
| Status | Code | Meaning |
|---|---|---|
| 400 | bad_request / bad_json | Invalid parameters or malformed body. |
| 400 | bad_model | Unknown model — use flash, studio, or vivid. |
| 401 | missing_key / invalid_key | No, wrong, or disabled API key. |
| 404 | not_found | Unknown job id or endpoint. |
| 429 | rate_limited | Per-minute plan rate limit hit — see Retry-After. |
| 429 | quota_exceeded | Not enough credits left in an hourly/daily/monthly window. |
| 502 | job failed | Generation failed (e.g. content moderation). Try another prompt or model — failed jobs are never charged. |
| 503 | model_unavailable | The 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. |
| 503 | busy | Generation 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:
| Credits | 25 / month |
| Daily allowance | 6 credits |
| Hourly allowance | 3 credits |
| Rate limit | 1 req / min |
Sign up — your API key is issued instantly.
What models are available?
| Model | Name | Credits / image | Best for |
|---|---|---|---|
flash | Flash | 1 | Fast standard generation |
studio | Studio | 2 | Premium, high-detail work |
vivid | Vivid | 2 | Premium 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?
| Plan | Price | Req / min | Credits / hr | Credits / day | Credits / mo |
|---|---|---|---|---|---|
| Free | $0 | 1 | 3 | 6 | 25 |
| Starter | $12/mo | 3 | 20 | 60 | 400 |
| Pro | $39/mo | 6 | 60 | 200 | 2,000 |
Exceeding a limit returns 429 with a Retry-After header.
Only successful generations consume credits.
How do I get an API key?
- Create a free account at /signup (email + password).
- Enter the 6-digit code we email you to verify.
- Copy your API key — shown once, regenerate anytime from the dashboard.
- Send it as the
X-API-Keyheader (orAuthorization: Bearer) onPOST /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 queued → running → done (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.
Questions? support@sikasio.com