Skip to main content
Use /v1/images/generations for production image generation.
curl https://api.apiany.ai/v1/images/generations \
  -H "Authorization: Bearer $APIANY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana",
    "prompt": "A bright API dashboard rendered as a product hero image",
    "size": "1k"
  }'
The response returns a task:
{
  "task_id": "task_123",
  "status": "processing",
  "poll_url": "/v1/tasks/task_123"
}

Sync variant

/v1/images/generations/sync creates a task and waits up to the configured maximum wait time. Use it for compatibility and demos. Use the async endpoint for production workloads.

Image edits

/v1/images/edits supports OpenAI-style image editing workflows where the selected model supports reference images.