图像接口

POST /v1/images/generations。GPT Image、nano-banana 与 Gemini 图像模型都走这一条。

Base URLhttps://api.oiovideo.com鉴权Authorization: Bearer YOUR_API_KEY

路径

POST /v1/images/generations

全部图像模型统一走这一条,同步返回图片。

模型与尺寸写法

模型尺寸写法档位
gpt-image-2.0-vip像素1K
gpt-image-2.5-vip像素1K
gpt-image-2.0-pro像素2K / 4K
gpt-image-2.5-pro像素2K / 4K
nano-banana-2 / nano-banana-pro / gemini-3.1-flash-image-preview / gemini-3-pro-image-preview画幅 + quality1K / 2K / 4K
seedream-5.0-pro像素1K / 2K / 4K

像素类请求

curl -X POST https://api.oiovideo.com/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2.0-vip",
    "prompt": "A cinematic city at night, no text",
    "size": "1920x1080",
    "n": 1
  }'

像素对照表

画幅gpt-image-2.0-vip · 1Kgpt-image-2.5-vip · 1Kgpt-image-2.0-pro · 2Kgpt-image-2.0-pro · 4Kgpt-image-2.5-pro · 2Kgpt-image-2.5-pro · 4K
1:11024x10241024x10242048x20482880x28802048x20484096x4096
4:31536x11521024x7682048x15363840x28802048x15363840x2880
3:41152x1536768x10241536x20482880x38401536x20482880x3840
16:91920x10801024x5762048x11523840x21602048x11523840x2160
9:161080x1920576x10241152x20482160x38401152x20482160x3840

seedream-5.0-pro 像素

画幅1K2K4K
1:11024x10242048x20484096x4096
4:31024x7682048x15363840x2880
3:4768x10241536x20482880x3840
16:91920x10802560x14403840x2160
9:161080x19201440x25602160x3840

size 必须用表中的原生值;像素类模型不要传 quality、aspect_ratio。

画幅类请求(nano-banana / Gemini)

curl -X POST https://api.oiovideo.com/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana-pro",
    "prompt": "Keep the subject, change the background to a beach at sunset",
    "size": "3:4",
    "quality": "hd",
    "n": 1,
    "images": [
      "https://img.oiovideo.com/samples/ref-character.jpg"
    ]
  }'
档位qualitysize 写法
1K不传1:1 / 3:4 / 4:3 / 16:9 / 9:16
2Khd同上
4K4K同上

不要传 aspect_ratio,也不要把 1K / 2K / 4K 写进 size。

参考图

先 上传素材 换公网 HTTPS,写入 images 数组;不传则为文生图。本站只接收公网 URL:随请求文件或 Data URI 会被 413 拒绝。

字段

字段类型必填说明
modelstring是官网模型广场的模型名
promptstring是提示词
sizestring是像素类填对照表像素值;画幅类填 3:4 / 16:9 等画幅
qualitystring否仅画幅类:1K 省略、2K 传 hd、4K 传 4K
ninteger否默认 1
imagesstring[]否参考图公网 HTTPS 数组
response_formatstring否固定 url;传入 b64_json 会被 400 拒绝

取图

响应里的 data[].url 就是图(对象存储公网直链,无需 Key,可直接展示或下载;约 24 小时内有效,请及时保存)。