Routescope APIRoutescope API

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.

POST
/v1/aiart/openai/image/submit
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

AuthorizationBearer <token>

Model relay API authentication. Request header: Authorization: Bearer .

In: header

Request Body

application/json

prompt?string

Image generation or editing prompt. Required for text-to-image; can be used together with images for image-to-image or editing.

model?string

Model name. If omitted, the server defaults to gpt-image-2.

Default"gpt-image-2"
images?array<string>

Input reference image URL list. Used for image-to-image, image editing, or multi-image references; empty strings in the array are ignored.

mask?string

Mask image URL. Used to limit the editing area; omitted when no mask is needed.

Formaturi
input_fidelity?string

Input image fidelity control. Used during image editing to control how closely the result follows the input image; supported values depend on the upstream channel.

size?string

Output image size. Common format is width x height, for example 1024x1024; exact support depends on the upstream model.

quality?string

Output image quality tier. Supported values depend on the upstream channel, such as low, medium, or high.

background?string

Background mode. Controls transparent or generated backgrounds; supported values depend on the upstream channel.

n?integer

Number of images to generate. Currently only 1 image is supported.

Range1 <= value <= 1
output_format?string

Output image format. Common values include png, jpeg, and webp; exact support depends on the upstream channel.

output_compression?integer

Output image compression quality. Usually applies to jpeg/webp formats; this field supports explicitly passing 0, which the server preserves and forwards upstream.

Range0 <= value <= 100
response_format?string

Result 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?integer

Logo add switch. Usually 1 means add and 0 means do not add; this field supports explicitly passing 0.

Value in0 | 1
logo_param?

Logo parameters for adding a specified logo to generated images.

extra_body?

Extended request parameters. Use this to pass upstream extension fields or avoid top-level field conflicts.

[key: string]?never

Response Body

application/json

application/json

application/json

application/json

application/json

Last updated on