API quickstart & endpoints

Endpoints cover generation, retrieval, account, models and image tools. All responses are JSON.

MethodPathDescription
POST/v1/images/generationsGenerate one or more images
POST/v1/images/tools/{tool}Edit an image: remove background, upscale, expand or erase
GET/v1/jobs/{id}Retrieve a past generation
GET/v1/accountPlan, credit balance and limits
GET/v1/modelsList available models and tools

Generate an image

curl https://multigen.fdmultimedia.workers.dev/v1/images/generations \
  -H "X-API-Key: $MULTIGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a matte black ceramic mug on a marble counter, soft daylight",
    "n": 1,
    "size": "2K"
  }'

Response:

{
  "id": "job_9f83c2a1",
  "status": "succeeded",
  "model": "multigen-image-1",
  "credits_used": 5,
  "credits_remaining": 937,
  "images": [ { "url": "https://…/output.png" } ]
}

Parameters

FieldDefaultNotes
prompt—Required, up to 4000 chars
n11–4 images
size2K2K or 4K (4K bills 2×)
image_urls[]Up to 6 public https reference URLs
Note
Image URLs are signed and expire after 1 hour — download and store the bytes if you need them longer.