Read GPT Image 2 API docs
FreeImage generation API using the GPT Image 2 model
FreeFree tier
Inputs: textOutputs: image
About Read GPT Image 2 API docs
This is the official documentation for the GPT Image 2 image generation API by EvoLink AI. It provides a RESTful interface for generating images from textual prompts using the gpt-image-2 model. The API requires Bearer token authentication and supports asynchronous task handling with status tracking, progress updates, and task cancellation. It includes detailed request/response structures, error codes for common issues (invalid request, authentication, quota, rate limits, etc.), and billing information based on per-call credit consumption.
Key Features
Text-to-image generation via gpt-image-2 model
Asynchronous task handling with status and progress tracking
Task cancellation support
Bearer token authentication
Per-call billing with credit reservation
Detailed error responses for common API issues
Pros & Cons
Pros
- Asynchronous generation with real-time progress and cancellation
- Clear error codes for troubleshooting
- Explicit billing structure per call
Cons
- Requires paid credits (per-call billing)
- Rate limits may apply (429 error)
- Requires API token and authentication
Best For
Generating images from textual descriptions for commercial applicationsIntegrating AI image generation into applications or workflows
FAQ
How do I authenticate to use the API?
All APIs require Bearer Token authentication. You need to get an API Key from the API Key Management Page and add it to the request header as 'Authorization: Bearer YOUR_API_KEY'.
What model is used for image generation?
The model name is 'gpt-image-2', which is the official channel providing better stability and controllability, suitable for commercial scenarios.
What is the maximum prompt length?
The prompt can be up to 32,000 characters (counted by Unicode code points, works for CJK and other languages). However, if the prompt exceeds 8,000 tokens, the generated image may not match expectations.