Auto Image API
One prompt, no model picking: Auto Image routes the request across premium image models and returns the strongest result. One POST request returns a hosted image URL.
API Tester
Production endpoint{}
Pricing & Credits
Cost Per Image
$0.21 USD
21 credits per image. One image per request.
Billing Policy
Reserved: 21 credits are deducted before generation starts
Failed: Automatically refunded in full
Only credits_charged in a successful response is billed
API Reference
POST /api/auto-image
One prompt, no model picking: Auto Image routes the request across premium image models and returns the strongest result.
Request Format
Send a POST request with a JSON body. The API key may also be sent as X-API-Key or Authorization: Bearer.
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Required | Your API key for authentication. |
| prompt | string | Required | Text description of the image. Up to 4,000 characters. |
| size | string | Optional |
widthxheight. Default: 1024x1024. Any size is accepted with each side between 512 and 2048 and a multiple of 16; these are the recommended presets.
Unsupported sizes return 400.
|
| seed | integer | Optional | Fixes generation randomness for reproducible results where the model supports it. |
Response Examples
Success Response (200 OK)
{
"success": true,
"image_url": "https://netwrckstatic.netwrck.com/static/uploads/example.webp",
"images": ["https://netwrckstatic.netwrck.com/static/uploads/example.webp"],
"model_used": "openpaths/auto-image",
"prompt_used": "A cozy coffee shop interior, warm light, photorealistic",
"size_used": "1024x1024",
"cost": "0.21",
"credits_charged": 21
}
Error Responses
Every error has success: false, an error message and a retryable boolean. Only retry when retryable is true, and never more than twice with backoff.
| Status | retryable | Meaning |
|---|---|---|
| 400 | false | Invalid JSON, missing or oversized prompt, unsupported size, or the model rejected the prompt. |
| 401 | false | Missing or invalid API key. |
| 402 | false | Insufficient credits. |
| 429 | true | The model is busy. |
| 502 / 504 | true or false | Generation failed or timed out after 100 seconds. Credits are refunded. |
{
"success": false,
"error": "Unsupported size for Auto Image",
"retryable": false
}
Related
Browse every model on the API overview, or try the Auto Image tool in your browser.
Netwrck