Documentation Index
Fetch the complete documentation index at: https://apixo.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
GPT Image 1 is an OpenAI image generation model for prompt-based image creation and reference-guided generation. Use this page when you are ready to call the API after trying the model in the APIXO playground.| Capability | Value |
|---|---|
| Model ID | gpt-image-1 |
| Mode | gpt-image-1 |
| Prompt length | 1-10000 characters |
| Reference images | 0-5 URLs |
| Aspect ratios | 1:1, 2:3, 3:2 |
| Number of images | 1, 2, 4 |
Endpoint and authentication
Base URL:| Method | Endpoint | Purpose |
|---|---|---|
POST | /generateTask/gpt-image-1 | Submit a generation task |
GET | /statusTask/gpt-image-1?taskId={taskId} | Poll task status and retrieve results |
Copy-paste async quickstart
This minimal request submits a text-to-image task and returns ataskId.
taskId; you need it to poll for the final result.
Poll for result
resultJson after state becomes success:
Request body
Text-to-image
Reference-guided generation
Parameters
Result delivery mode. Use
async for polling with statusTask, or callback for webhook delivery.Required when
request_type is callback. Must be a public HTTPS URL that can receive the final task payload. See Webhooks.GPT Image 1 input parameters.
Response format
Submit task response
POST /generateTask/gpt-image-1 returns a task ID when the task is accepted:
API status code.
200 means the task was accepted.Human-readable status message.
Unique task identifier used with the status endpoint.
Status response fields
Unique task identifier.
Current task state:
processing, success, or failed.JSON string containing the generated image URLs. Present when
state is success.Machine-readable failure code. Present when
state is failed.Human-readable failure message. Present when
state is failed.Task creation timestamp in Unix milliseconds.
Task completion timestamp in Unix milliseconds. Present after completion.
Processing duration in milliseconds. Present after completion.
Webhook callback mode
Use callback mode when your backend should receive the final result automatically instead of polling.Billing
GPT Image 1 is billed per generated image. The selectednum_images value determines the number of images requested.
| Unit | APIXO price | Market price |
|---|---|---|
| Image | $0.35 / image | $0.40 / image |
Latency and polling
Actual latency may vary by prompt complexity, reference image count, provider route, and current queue load.| Typical generation time | Recommended first poll | Poll interval |
|---|---|---|
| About 30 seconds | 20 seconds after task creation | 3-10 seconds |
429, slow down requests and retry with backoff. For account-level details, see System APIs.
Errors and troubleshooting
HTTP errors
| Code | Meaning | What to do |
|---|---|---|
400 | Invalid request body, mode, parameter, prompt, or image URL shape | Fix the request before retrying |
401 | Missing or invalid API key | Check the Authorization header |
402 | Insufficient balance or quota | Add balance or switch account/key |
403 | Key or route cannot access the model | Check permissions and route strategy |
429 | Rate limit, daily quota, or provider rate limit reached | Retry with exponential backoff |
500 | Server error or unknown upstream error | Retry with backoff |
502 | Upstream provider error | Retry with backoff |
504 | Upstream timeout | Retry or use callback mode for long-running jobs |
Task failure codes
| Fail code | Meaning | What to do |
|---|---|---|
SensitiveContent | Prompt or output was rejected by provider safety checks | Change the prompt or reference image |
PromptInvalid | Prompt format or content was rejected | Revise the prompt |
ImageNotAccess | A reference image URL could not be reached | Use a public, direct image URL |
ImageFormatIncorrect | Image format is incorrect | Use a supported image format |
RateLimited | Provider or account rate limit was reached | Retry with backoff |
Timeout | Generation did not finish in time | Retry, reduce input complexity, or use callback mode |
Unknown error | Unmapped provider-side failure | Retry with backoff or try another route |
Tips
promptmust be a non-empty string and cannot exceed 10000 characters.aspect_ratiois required. Use1:1for square outputs,3:2for landscape images, or2:3for portrait images.num_imagesis required. Supported values are1,2, and4.image_urlssupports JPG, PNG, and WebP reference images, up to 10 MB per image. Use public, direct HTTP(S) image URLs.- Result URLs are normally stored for 15 days. Download and store important outputs promptly.