API reference / Images
Image generation and editing
Use the unified Images routes. Model-specific options are documented on each model page in the sidebar.
POST
Text to image
Create an image from a prompt.
POST/v1/images/generations
Image editing
Send public HTTPS image URLs and an optional mask.
POST/v1/images/edits
Task status
Poll the task until it completes or fails.
GET/v1/tasks/{task_id}
bashcopy from the code panel
curl -X POST "https://api.apiko.app/v1/images/generations" \
-H "Authorization: Bearer $APIKO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_FROM_/v1/models",
"prompt": "A quiet product photo on a dark desk",
"size": "1:1",
"async": true
}'- Use async: true for long-running jobs and poll every 5–10 seconds.
- Reference images and masks must be publicly reachable HTTPS URLs. Do not send local paths or private dashboard URLs.
- When completed, download data[].url promptly. Result URLs are kept for 24 hours and should be treated as opaque.