跳转到主要内容
POST
/
api
/
openapi
/
submit
curl --request POST \
  --url https://aireiter.com/api/openapi/submit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gpt_image_2",
    "params": {
      "prompt": "一只橘猫坐在窗台上看夕阳,水彩画风格",
      "aspect_ratio": "16:9"
    },
    "out_task_id": "my_task_123456"
  }'
{
    "statusCode": 200,
    "message": "",
    "data": {
        "out_task_id": "my_task_123456",
        "status": "pending",
        "estimated_credits": 100,
        "created_at": "2025-12-22T06:03:28.242Z"
    }
}

Documentation Index

Fetch the complete documentation index at: https://docs.aireiter.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
必填
所有接口均需要使用Bearer Token进行认证获取 API Key:访问 API Key 管理页面 获取您的 API Key使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY

Body

model
string
必填
模型名称固定值:"gpt_image_2"
params
object
必填
模型参数对象
out_task_id
string
必填
发起方任务ID用户自定义的任务标识,必填

尺寸 × 分辨率映射表

aspect_ratio × resolution → 实际像素(13 比例 × 3 档位):
aspect_ratio1K2K4K
1:11024×1024 / 1254×12542048×20482880×2880
3:21536×10242048×13603520×2336
2:31024×15361360×20482336×3520
4:31024×7682048×15363312×2480
3:4768×10241536×20482480×3312
5:41280×1024 / 1448×10862560×20483216×2576
4:51024×1280 / 1122×14022048×25602576×3216
16:91536×864 / 1672×9412048×11523840×2160
9:16864×1536 / 941×16721152×20482160×3840
2:12048×1024 / 1774×8872688×13443840×1920
1:21024×2048 / 887×17741344×26881920×3840
21:92016×864 / 1915×8212688×11523840×1648
9:21864×2016 / 821×19151152×26881648×3840
3:2 / 2:3 @ 2K 实际是 2048×1360(近似比例,误差 < 0.5%);4K 现已支持全部 13 个比例。

自定义尺寸(size 参数)

当需要精确控制像素尺寸时,可使用 size 参数代替 aspect_ratio + resolution 组合。 有效范围: 总像素 655,360 ~ 8,294,400(上游官方限制) 实测有效下限: 总像素 ≥ 2,088,960(约 1440×1452 或 2048×1020 等同面积) 低于此下限时上游不报错,但会静默替换为相近比例的 ~1.57M 像素尺寸。

常用 size 示例

size 值总像素推荐用途
2048x20484,194,304正方形高清
2048x15363,145,7284:3 横版
1536x20483,145,7283:4 竖版
2048x11522,359,29616:9 横版
1152x20482,359,2969:16 竖版
3840x21608,294,4004K 16:9(最高档)
2688x13443,612,6722:1 宽横版
不要与 aspect_ratioresolution 同时传入,否则返回 400。

Response

out_task_id
string
发起方任务ID,可用于查询结果
status
string
初始状态,固定为 "pending"
estimated_credits
number
预估消耗积分
created_at
string
创建时间(ISO 格式)
curl --request POST \
  --url https://aireiter.com/api/openapi/submit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gpt_image_2",
    "params": {
      "prompt": "一只橘猫坐在窗台上看夕阳,水彩画风格",
      "aspect_ratio": "16:9"
    },
    "out_task_id": "my_task_123456"
  }'
{
    "statusCode": 200,
    "message": "",
    "data": {
        "out_task_id": "my_task_123456",
        "status": "pending",
        "estimated_credits": 100,
        "created_at": "2025-12-22T06:03:28.242Z"
    }
}