Quickstart
Five minutes from zero to your first generated image. You need an account with a small prepaid balance and an API key.
1. Create an account and add balance
Sign up, then open Billing and add funds (minimum $5). Balance is debited per job at the published rates; failed and blocked jobs are refunded automatically.
2. Create an API key
In API keys, create a key. It is shown once — copy it into your secrets store and export it as FASTGEN_API_KEY. Keys look like fgc_live_….
3. Submit a job
Every generation endpoint returns 202 Accepted with a job. The optional Idempotency-Key header makes retries safe.
curl https://api.fastgencloud.com/v1/images/generations \
-H "Authorization: Bearer $FASTGEN_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: demo-0001" \
-d '{
"model": "fast-image",
"prompt": "isometric illustration of a small coffee shop, warm light, clean vector style",
"size": "1024x1024",
"n": 1
}'4. Poll until it finishes
Fast image models usually finish in a few seconds when capacity is warm. Poll every 1–2 seconds, or skip polling entirely by passing a webhook_url (see Webhooks).
curl https://api.fastgencloud.com/v1/jobs/$JOB_ID \
-H "Authorization: Bearer $FASTGEN_API_KEY"5. Download the output
When status is succeeded, output.images[].url (or output.video.url) is a signed URL valid for up to 7 days and never past expires_at (your account’s retention window, 7 days by default). Store the file on your side if you need it longer.
{
"id": "…",
"object": "job",
"status": "succeeded",
"kind": "image.generation",
"model": "fast-image",
"input": { "prompt": "isometric illustration of …", "size": "1024x1024", "n": 1 },
"output": {
"images": [
{ "url": "https://…signed…", "width": 1024, "height": 1024, "mime": "image/png", "seed": 913 }
]
},
"usage": { "charged_micros": 4000, "charged_usd": 0.004, "gpu_ms": 1830 },
"moderation": { "status": "passed" },
"error": null,
"created_at": "2026-08-17T10:00:00Z",
"completed_at": "2026-08-17T10:00:04Z",
"expires_at": "2026-08-24T10:00:04Z"
}Image to video
Video works the same way: pass a start frame as a public https URL or a base64 data URI, an optional motion prompt, and a duration of 5 or 8 seconds. Billing is per second of output. Bring your own LoRAs by URL (up to 3): url is the high-noise file and low_url the optional low-noise pair — a singleurl is applied to both.
curl https://api.fastgencloud.com/v1/videos/generations \
-H "Authorization: Bearer $FASTGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "image-to-video",
"image": "https://example.com/still.jpg",
"prompt": "slow camera push-in, gentle steam rising from the cup",
"duration": 5,
"loras": [
{ "url": "https://example.com/my-motion-lora-high.safetensors",
"low_url": "https://example.com/my-motion-lora-low.safetensors",
"strength": 0.9 }
]
}'Next steps
GET /v1/modelslists enabled models with supported sizes, durations and a price preview.- Add
webhook_urlto any job and verify the signature — Webhooks. - Handle
402,422and429— Errors and limits. - Read what is and isn’t allowed — Content policy.
- Explore every field in the API reference.