Imagens API

Generate AI images from your own app.

Use an API key to create AI image tasks with the same models, credits, and async workflow as the Imagens web app.

Generate endpoint

POST https://imagens.app/image-api/v1/images/generations

Send JSON or form data with model_id and prompt.

Authentication

Use either X-API-Key or Authorization: Bearer ....

Keys use the same account credits and model pricing as the web interface.

cURL

curl -X POST "https://imagens.app/image-api/v1/images/generations" \
  -H "Authorization: Bearer img_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model_id": 123,
    "prompt": "A cinematic mountain cabin at sunrise",
    "ratio": "1:1",
    "num": 1
  }'

Start response

{
  "result": 1,
  "msg": "Generation started.",
  "data": {
    "task_id": "remote-task-id",
    "order_sn": "AI-202609271200001234",
    "status": "processing",
    "status_url": "https://imagens.app/image-api/v1/images/tasks/{task_id}"
  }
}

Poll the returned status URL with the same API key. When complete, data.urls contains the generated images.

01

Create a key

Open API Keys in your user center and generate a key.

02

Create a task

Choose a model and send a prompt to start generation.

03

Poll the result

Use the task status URL until the image URLs are ready.

Feedback email