Authorizations
All endpoints require authentication using a Bearer Token. Get the API Key: Visit the API Key management page to obtain your API Key. Add the following to the request headers: Authorization: Bearer YOUR_API_KEY
Body
Model name Fixed value: "gpt_4o"
Model parameters object Show params object properties
Text description for image generation No limits
URL of the reference image for image-to-image generation
Supports only a single image
Must be a publicly accessible URL
Aspect ratio for image generation Supported aspect ratios:
1:1 - Square (default)
3:2 - Landscape 3:2
2:3 - Portrait 2:3
Initiator task ID User-defined task identifier, required
Callback URL for task completion notification After task completion, the system will send a POST request to this URL to notify the result
Custom metadata Returned as-is in query results, can be used for business identification
Response
Task ID, used to query the result
Initiator’s task ID, can be used to query the result
Initial status, fixed as "pending"
Estimated credit consumption
Creation time (ISO format)
cURL
Python
JavaScript
Go
Java
PHP
Ruby
Swift
C#
C
Objective-C
OCaml
Dart
R
curl --request POST \
--url https://test.aireiter.com/api/openapi/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt_4o",
"params": {
"prompt": "An ancient castle under the starry sky",
"aspect_ratio": "1:1"
},
"out_task_id": "my_task_123456"
}'
{
"statusCode" : 200 ,
"message" : "" ,
"data" : {
"task_id" : "order_p9EyMzcBxkH7zxQhlnP6k" ,
"out_task_id" : "my_task_123456" ,
"status" : "pending" ,
"estimated_credits" : 100 ,
"created_at" : "2025-12-22T06:03:28.242Z"
}
}