Submit Image Generation or Edit Task
Submit an asynchronous image task. Provide at least one of prompt or images; the server returns a public job_id, which you can use with the query endpoint to retrieve task status and results.
curl -X POST "https://api.routescope.ai/v1/aiart/openai/image/submit" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-image-2", "prompt": "一只橘猫坐在霓虹灯下,电影感,细节丰富", "size": "1024x1024", "quality": "high", "n": 1, "output_format": "png" }'{
"request_id": "req_8f2b7c1a9d",
"job_id": "task_20260529123456_abcd1234"
}{
"code": "invalid_request",
"message": "prompt or images is required",
"data": null
}{
"code": "invalid_request",
"message": "prompt or images is required",
"data": null
}{
"code": "invalid_request",
"message": "prompt or images is required",
"data": null
}{
"code": "invalid_request",
"message": "prompt or images is required",
"data": null
}Authorization
BearerAuth
Model relay API authentication. Request header: Authorization: Bearer .
In: header
Request Body
application/json
Image generation or editing prompt. Required for text-to-image; can be used together with images for image-to-image or editing.
Model name. If omitted, the server defaults to gpt-image-2.
"gpt-image-2"Input reference image URL list. Used for image-to-image, image editing, or multi-image references; empty strings in the array are ignored.
Mask image URL. Used to limit the editing area; omitted when no mask is needed.
uriInput image fidelity control. Used during image editing to control how closely the result follows the input image; supported values depend on the upstream channel.
Output image size. Common format is width x height, for example 1024x1024; exact support depends on the upstream model.
Output image quality tier. Supported values depend on the upstream channel, such as low, medium, or high.
Background mode. Controls transparent or generated backgrounds; supported values depend on the upstream channel.
Number of images to generate. Currently only 1 image is supported.
1 <= value <= 1Output image format. Common values include png, jpeg, and webp; exact support depends on the upstream channel.
Output image compression quality. Usually applies to jpeg/webp formats; this field supports explicitly passing 0, which the server preserves and forwards upstream.
0 <= value <= 100Result return format. This endpoint submits asynchronous tasks and always returns job_id in the submit response; the field is forwarded as an upstream extension parameter.
Logo add switch. Usually 1 means add and 0 means do not add; this field supports explicitly passing 0.
0 | 1Logo parameters for adding a specified logo to generated images.
Extended request parameters. Use this to pass upstream extension fields or avoid top-level field conflicts.
Response Body
application/json
application/json
application/json
application/json
application/json
Last updated on