Video API
视频接口
Current public video docs cover Seedance 2.0 only. Submit, poll, then download with the same Bearer token.
当前公开视频文档只保留 Seedance 2.0。先提交,再轮询,最后使用同一个 Bearer token 下载成品。
Use this page to integrate the current public video and image endpoints. Public video requests go to multimodal.vibelearning.top; public image requests go to image1.vibelearning.top. Always use the returned local task_id and local /content route instead of trying to reconstruct an upstream URL.
这页用于对接当前公开的视频和图片接口。公开视频请求统一走 multimodal.vibelearning.top,公开图片请求走 image1.vibelearning.top。请始终使用返回的本地 task_id 和本地 /content 路由,不要自己拼上游地址。
This page is organized like a product API guide, not an internal memo. Start with the quickstart, then read the module you actually need.
这页按产品 API 文档方式组织,不是内部备忘录。先看快速开始,再读你实际要接的模块。
Current public video docs cover Seedance 2.0 only. Submit, poll, then download with the same Bearer token.
当前公开视频文档只保留 Seedance 2.0。先提交,再轮询,最后使用同一个 Bearer token 下载成品。
Three parallel families: Banana, web-image2 (image-plus groups), and adobe-image2 (原生 4k). Both image2 families use gpt-image-2.
三个并列家族:Banana、web-image2(image-plus 系列分组)和 adobe-image2(原生 4k)。两个 image2 家族都用 gpt-image-2。
Do not expose provider domains or provider result URLs. Clients should only use your public routes and local task IDs.
不要暴露上游域名或上游结果链接。客户端只应使用公开路由和本地 task ID。
If you only need the shortest path to production, use the following rules.
如果你只需要最短路径接入生产,按下面这张表做即可。
Current public video model: only seedance-2.0 is documented here. It accepts 4–15s and is billed per generated second. Other video families are temporarily unpublished.
当前公开视频模型:本页只保留 seedance-2.0。时长 4–15s,按生成秒数计费。其他视频模型文档暂时下架。
| Need | 需求 | Use this route | 使用路由 | Behavior | 行为 |
|---|---|---|---|---|---|
| Generate a video | 生成视频 | POST /v1/videos | POST /v1/videos |
Returns a local task ID. Poll it later and then download from the same public host. | 返回本地 task ID。后续轮询它,再从同一公开域名下载成品。 |
| Check video status | 查询视频状态 | GET /v1/videos/{task_id} | GET /v1/videos/{task_id} |
Returns current task state. | 返回当前任务状态。 |
| Download generated video | 下载视频成品 | GET /v1/videos/{task_id}/content | GET /v1/videos/{task_id}/content |
Requires the same Bearer token. | 需要带同一个 Bearer token。 |
| Generate a Banana image (native) | Banana 文生图(原生) | POST /v1beta/models/{model}:generateContent | POST /v1beta/models/{model}:generateContent |
Gemini native. Read inlineData from candidates[0].content.parts. | Gemini 原生。从 candidates[0].content.parts 读取 inlineData。 |
| Generate a Banana image (OpenAI-compatible) | Banana 文生图(兼容) | POST /v1/chat/completions | POST /v1/chat/completions |
Synchronous chat response. Read the data:image payload from choices[0].message.content. | 同步聊天响应。从 choices[0].message.content 读取 data:image。 |
| Call web-image2 | 调用 web-image2 | POST /v1/images/generations or POST /v1/images/edits | POST /v1/images/generations 或 POST /v1/images/edits |
Use an image-plus series key. Model is gpt-image-2. Async edits are not open. | 使用 image-plus 系列分组的 key。模型名 gpt-image-2。异步图生图未开放。 |
| Call adobe-image2 | 调用 adobe-image2 | POST /v1/images/generations or POST /v1/images/edits | POST /v1/images/generations 或 POST /v1/images/edits |
Use a 原生 4k key. Same model name. Pass an Adobe size such as 3840x2160. Async edits are open. | 使用 原生 4k 分组的 key。模型名相同。传 Adobe 的 size,例如 3840x2160。异步图生图已开放。 |
Important: Seedance uses multimodal.vibelearning.top. Image families use image1.vibelearning.top. web-image2 keys belong to image-plus groups; adobe-image2 keys belong to 原生 4k. Do not send Banana models to /v1/images/generations.
重要:Seedance 走 multimodal.vibelearning.top。图片家族走 image1.vibelearning.top。web-image2 的 key 挂在 image-plus 系列分组;adobe-image2 的 key 挂在 原生 4k。不要把 Banana 模型发到 /v1/images/generations。
| Host | 域名 | Role | 职责 | What clients should do | 客户端该怎么用 |
|---|---|---|---|---|---|
multimodal.vibelearning.top | multimodal.vibelearning.top |
Public video API and docs host | 公开视频 API 与文档站 | Use this host for /docs, /pricing, and all public /v1/videos/* routes. | 这个域名同时承载 /docs、/pricing 和所有公开 /v1/videos/* 路由。 |
image1.vibelearning.top | image1.vibelearning.top |
Public image API ingress | 公开图片 API 入口 | Use this host for /v1/images/generations and /v1/images/edits. | 文生图和图生图统一发到这个域名的 /v1/images/generations 与 /v1/images/edits。 |
The current public video contract is Seedance 2.0. Other video families remain in the source document but are temporarily unpublished.
当前公开视频合同只保留 Seedance 2.0。其他视频模型仍留在源文件中,但暂时不对客户展示。
For text, first-frame, first/last-frame, multiple-image, or reference-video generation. Billed per generated second.
适合文生视频、首帧、首尾帧、多图和参考视频生成;按生成秒数计费。
Open Seedance guide →查看 Seedance 接法 →Use the base model for text or image input. The 1.5 preview family currently requires an image. Fixed-duration wrappers are available.
基础模型支持文生和图生;1.5 preview 当前必须带图片,并提供固定 10 秒、15 秒包装模型。
Open Grok guide →查看 Grok 接法 →The simplest fixed 10-second integration. Supports text and image input; reference-video behavior has an explicit validation caveat.
最简单的固定 10 秒接法,支持文本和图片输入;参考视频能力请留意章节中的验证说明。
Open Omni guide →查看 Omni 接法 →-t
For models whose public name ends in -t. Resolution selects the price tier; duration does not multiply the listed request price.
公开模型名以 -t 结尾。分辨率决定价格档位,时长不会再次乘到按次价格上。
Use the video API for asynchronous generation flows. The current public shape follows an OpenAI-compatible task pattern.
视频接口用于异步生成流程。当前公开形态采用 OpenAI 风格的任务模式。
| Model family | 模型族 | Base URL | Base URL | Notes | 说明 |
|---|---|---|---|---|---|
seedance-2.0 | seedance-2.0 |
https://multimodal.vibelearning.top/v1 |
Task-based public video API. Create with POST /v1/videos, poll with GET /v1/videos/{task_id}, then download from the returned local video_url or /content. | 统一的任务型公开视频接口。先用 POST /v1/videos 创建任务,再用 GET /v1/videos/{task_id} 轮询,最后通过返回的本地 video_url 或 /content 下载。 |
All requests require:
所有请求都需要:
Authorization: Bearer YOUR_API_KEY
If your key already starts with sk-, send it as-is. Do not strip the prefix on the client side.
如果你的 key 本身就是 sk- 开头,请原样放进 Bearer 头里,不要在客户端自行去前缀。
Duration: Seedance accepts numeric duration from 4 to 15.
时长限制:Seedance 接受 4 到 15 的数字型 duration。
POST /v1/videos.POST /v1/videos 提交任务。task_id.task_id。GET /v1/videos/{task_id} until terminal state.GET /v1/videos/{task_id},直到进入终态。GET /v1/videos/{task_id}/content.GET /v1/videos/{task_id}/content 下载成品。Why this matters: video is not a one-shot synchronous response. If your client expects an immediate MP4 body from POST /v1/videos, the integration is wrong.
为什么要注意:视频不是一次同步请求直接返回 MP4。如果你的客户端期待 POST /v1/videos 直接吐视频文件,这个接法就是错的。
Use this common shape, then replace the model and model-specific fields using the selected model guide below.
先使用下面的公共结构,再根据所选模型章节替换模型名,并补充该模型专属字段。
curl --request POST \
--url https://multimodal.vibelearning.top/v1/videos \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "YOUR_VIDEO_MODEL",
"prompt": "Describe the shot, subject motion, and camera movement."
}'
Typical create response:
典型创建回包:
{
"id": "task_xxx",
"task_id": "task_xxx",
"status": "queued",
"progress": 20,
"query_endpoint": "/v1/videos/task_xxx"
}
curl --request GET \
--url https://multimodal.vibelearning.top/v1/videos/task_xxx \
--header 'Authorization: Bearer YOUR_API_KEY'
Typical success payload:
典型成功回包:
{
"completed": true,
"failed": false,
"id": "task_xxx",
"progress": 100,
"query_endpoint": "/v1/videos/task_xxx",
"status": "completed",
"task_id": "task_xxx",
"video_url": "https://multimodal.vibelearning.top/v1/videos/task_xxx/content"
}
curl --request GET \
--url https://multimodal.vibelearning.top/v1/videos/task_xxx/content \
--header 'Authorization: Bearer YOUR_API_KEY' \
--output result.mp4
Customers usually get stuck not on the route itself, but on which fields belong in the request body. Use this section as the practical request guide.
客户最容易卡住的往往不是路由,而是请求体该怎么写。这里给出更实用的字段说明。
| Field | 字段 | Meaning | 含义 | Notes | 说明 |
|---|---|---|---|---|---|
model | model |
Target public video model name | 目标公开视频模型名 | Use the exact public model name shown in the model list. Example: omni_flash-10s, grok-video-1.5-preview-10s. | 使用模型列表里展示的公开模型名,不要自己猜别名。例如:omni_flash-10s、grok-video-1.5-preview-10s。 |
prompt | prompt |
Main generation prompt | 主提示词 | Required for text-to-video and often still useful for reference-based generation. | 文生视频必填,参考图/参考素材生成时通常也建议保留。 |
image_url | image_url |
Single reference image URL | 单张参考图 URL | Preferred image-to-video field for Omni and Grok 1.5 preview wrappers. | Omni 和 Grok 1.5 preview 包装模型的首选图生视频字段。 |
duration | duration |
Video length in seconds | 视频时长,单位秒 | Use this for Omni and compatibility cases. Do not send it for fixed-wrapper Grok models unless your client always writes the matching fixed duration. | Omni 和兼容场景可用这个字段。固定包装的 Grok 模型除非客户端固定写对应秒数,否则不要额外传它。 |
aspect_ratio | aspect_ratio |
Aspect ratio for Omni-style requests | Omni 风格请求的画幅比例 | Recommended for Omni. Common values: 16:9, 9:16, 1:1. | Omni 推荐传这个。常见值:16:9、9:16、1:1。 |
resolution | resolution |
Requested output resolution | 请求的输出分辨率 | Use a resolution the selected model actually supports. Keep it aligned with the chosen size. | 只传所选模型实际支持的分辨率,并且和 size 保持一致。 |
size | size |
Target width × height | 目标宽高 | Use a size consistent with the requested ratio and resolution. | 应与 ratio 和 resolution 保持一致。 |
ratio | ratio |
Aspect ratio | 画幅比例 | Common values include 16:9, 9:16, 1:1, 3:4. | 常见值如 16:9、9:16、1:1、3:4。 |
generate_audio | generate_audio |
Whether to generate audio | 是否生成音频 | Only expose this if your product really supports audio generation for the selected model. | 只有当你的产品确实为该模型开放了音频生成能力时,再对外暴露这个字段。 |
Current public mapping: all public video models documented here use https://multimodal.vibelearning.top/v1. Public image generation and image editing use https://image1.vibelearning.top/v1.
当前公开映射:本页文档中的所有公开视频模型统一走 https://multimodal.vibelearning.top/v1。公开文生图和图生图统一走 https://image1.vibelearning.top/v1。
/v1/videostask_id, not an MP4 body.task_id,不是直接返回 MP4。/v1/videos/{task_id}/v1/videos/{task_id}/contentFlexible duration and resolution, with text, image, and reference-video input.
支持灵活时长与分辨率,可使用文本、图片或参考视频作为输入。
Seedance uses Multi's asynchronous video task flow: submit once, save the local task_id, poll the same task, then download through the local content endpoint. It supports text-to-video, a first frame, first/last-frame transitions, multiple reference images, and reference videos.
Seedance 使用 Multi 的异步视频任务流程:只提交一次,保存本地 task_id,持续查询同一任务,成功后通过本地内容接口下载。支持文生视频、首帧图、首尾帧过渡、多图参考和参考视频。
| Model | 模型 | Resolutions | 分辨率 | Duration | 时长 | Defaults | 默认值 |
|---|---|---|---|---|---|---|---|
seedance-2.0 |
480p, 720p, 1080p |
4–15s |
duration: 5, resolution: 720p |
Without reference videos, billing is the selected resolution rate multiplied by generated duration. A request containing video uses Mix billing: the provider's reference-video tier is multiplied by generated duration only; the reference video's own duration is not added to billable seconds. Multi reconciles the system quote immediately after task acceptance. Failed tasks are refunded.
不带参考视频时,费用等于所选分辨率单价 × 生成时长。请求中包含 video 时使用 Mix 计费:按对应分辨率的含参考视频档位 × 生成时长计费,参考视频自身时长不计入计费秒数。任务被上游接受后,Multi 会立即按系统报价调整预扣;失败任务自动退款。
| Model | 模型 | 480p |
720p |
1080p |
Mix billing | Mix 计费 |
|---|---|---|---|---|---|---|
seedance-2.0 |
$0.44/s | $0.88/s | $2.20/s | Reference-video tier × generated duration; final amount is the submit-time system quote | 含参考视频档位 × 生成时长;最终以提交时系统报价为准 |
Example: a non-Mix 480p request generating 4 seconds costs 4 × $0.44 = $1.76. The resolution tier is selected from the normalized resolution field before submission.
示例:非 Mix 的 480p 请求生成 4 秒,费用为 4 × $0.44 = $1.76。系统会在提交前根据标准化后的 resolution 选择对应价格档位。
Seedance text-to-video request body:
Seedance 文生视频请求体:
{
"model": "seedance-2.0",
"prompt": "A paper boat drifting through a rain-washed neon street, cinematic tracking shot.",
"duration": 4,
"resolution": "480p",
"aspect_ratio": "16:9"
}
Complete text-to-video submit example:
完整文生视频提交示例:
curl -X POST "https://multimodal.vibelearning.top/v1/videos" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2.0",
"prompt": "A paper boat drifting through a rain-washed neon street, cinematic tracking shot.",
"duration": 4,
"resolution": "480p",
"aspect_ratio": "16:9"
}'
Seedance first-frame image-to-video request body:
Seedance 首帧图生视频请求体:
{
"model": "seedance-2.0",
"prompt": "The subject turns slowly toward the camera while the fabric moves naturally in a light breeze.",
"duration": 6,
"resolution": "720p",
"aspect_ratio": "9:16",
"image_url": "https://example.com/first-frame.jpg"
}
Seedance first/last-frame transition request body:
Seedance 首尾帧过渡请求体:
{
"model": "seedance-2.0",
"prompt": "Create a smooth cinematic transition from the opening composition to the closing composition.",
"duration": 8,
"resolution": "1080p",
"aspect_ratio": "16:9",
"image": "https://example.com/first-frame.jpg",
"image_tail": "https://example.com/last-frame.jpg"
}
image/image_url sets the first frame, image_tail sets the last frame, images accepts up to 9 reference images, and video accepts one direct URL or an array of up to 3 direct URLs.
image/image_url 用于首帧,image_tail 用于尾帧,images 最多接受 9 张参考图;video 可传一个文件直链或最多 3 个文件直链组成的数组。
| Media | 素材 | Formats | 支持格式 | Limits | 主要限制 |
|---|---|---|---|---|---|
| Image | 图片 | .jpeg, .png, .webp, .bmp, .tiff, .gif, .heic, .heif |
Each file <30MB; 300–6000px for both width and height; width ÷ height must be 0.4–2.5; up to 9 reference images. | 单张 <30MB;宽、高均为 300–6000px;宽 ÷ 高必须在 0.4–2.5;参考图最多 9 张。 | |
| Video | 视频 | .mp4, .mov; H.264/H.265 |
Each file 2–15s and ≤200MB; 24–60 FPS; up to 3 files with total duration ≤15s. | 单个 2–15 秒且 ≤200MB;24–60 FPS;最多 3 个,总时长 ≤15 秒。 | |
| Audio | 音频 | .wav, .mp3 |
The upstream model supports audio references, but Multi's current public Seedance request does not expose the audio field. Do not send it yet. | 上游模型支持音频参考,但 Multi 当前公开 Seedance 请求尚未开放 audio 字段,请暂勿传入。 |
Direct-download URL required: every reference URL must return the media file on the first request with HTTP 200. Share pages and URLs that require 301/302 redirects, login, cookies, or anti-bot verification will fail. WeChat Channels, Douyin/TikTok, and Bilibili share-page URLs are not file URLs.
必须使用可直接下载的文件直链:每个素材地址首次请求就必须以 HTTP 200 返回文件。需要 301/302 跳转、登录、Cookie 或人机验证的地址会失败;微信视频号、抖音和 B 站分享页都不是文件直链。
Mix request body using one strict direct-download video URL:
使用一个严格文件直链的 Mix 请求体:
{
"model": "seedance-2.0",
"prompt": "Use the motion and camera language from the references to create a coherent new shot.",
"duration": 6,
"resolution": "720p",
"video": "https://cdn.example.com/files/reference.mp4"
}
Mix settlement: the initial balance check reserves the normal generated-duration amount. After the provider accepts the task, Multi immediately reconciles to the Mix system quote. Reference-video duration is not added to billable seconds. Keep enough balance for the accepted quote.
Mix 结算:初次余额检查先按普通生成时长预扣;上游接受任务后,Multi 会立即调整为 Mix 系统报价。参考视频自身时长不加入计费秒数,请确保余额足以覆盖任务接受后的报价。
Polling: save the local task_id, poll every 3–5 seconds, and after success download only through the returned local video_url or /v1/videos/{task_id}/content. Do not store or reconstruct provider result links.
轮询:保存本地 task_id,每 3–5 秒轮询一次;成功后只通过返回的本地 video_url 或 /v1/videos/{task_id}/content 下载。不要保存或自行拼接上游结果链接。
Poll and download:
查询与下载:
curl "https://multimodal.vibelearning.top/v1/videos/{task_id}" \
-H "Authorization: Bearer YOUR_API_KEY"
curl -L "https://multimodal.vibelearning.top/v1/videos/{task_id}/content" \
-H "Authorization: Bearer YOUR_API_KEY" \
-o result.mp4
A fixed 10-second model with a compact request contract.
固定 10 秒、请求结构简单的视频模型。
Use this section if you want the simplest Omni integration path. Treat Omni as a fixed 10-second task model: submit, poll, then download.
如果你想用最简单的方式接入 Omni,就按这一节来:把它当成固定 10 秒的任务型视频模型,流程就是提交、轮询、下载。
| Item | 项目 | Value | 值 | Notes | 说明 |
|---|---|---|---|---|---|
| Host | 域名 | https://multimodal.vibelearning.top/v1 |
Only for omni_flash-10s. | 只用于 omni_flash-10s。 |
|
| Model | 模型 | omni_flash-10s |
Fixed 10-second Omni video model. | 固定 10 秒的 Omni 视频模型。 | |
| Required fields | 必填字段 | model, prompt, duration |
For image-to-video, add image_url. | 如果是图生视频,再补 image_url。 |
|
| Video reference input | 参考视频输入 | video |
Use an object, not a raw string. Example shape: {"video":{"url":"https://example.com/input.mp4"}}. | 必须传对象,不要直接传字符串。示例形态:{"video":{"url":"https://example.com/input.mp4"}}。 |
|
| Duration rule | 时长规则 | 10s fixed |
Send duration: 10. Do not expect other durations from this model. | 直接传 duration: 10 即可,不要预期这个模型支持别的时长。 |
|
| Recommended fields | 推荐字段 | aspect_ratio |
Common values: 16:9, 9:16, 1:1. | 常见值:16:9、9:16、1:1。 |
|
| Response shape | 返回结构 | id, task_id, status, progress, query_endpoint |
Query later for video_url. | 后续轮询时再拿 video_url。 |
Recommended polling behavior: after POST /v1/videos, store the returned task_id and poll every 5 to 10 seconds. Keep polling while the state is still queued, pending, processing, or similar.
推荐轮询方式:调用 POST /v1/videos 后,先保存返回的 task_id,然后每 5 到 10 秒轮询一次。只要状态还是 queued、pending、processing 这类处理中状态,就继续轮询。
Omni text-to-video request body:
Omni 文生视频请求体:
{
"model": "omni_flash-10s",
"prompt": "A tiny paper lantern drifting across a calm lake at dusk, gentle cinematic motion.",
"duration": 10,
"aspect_ratio": "16:9"
}
Omni image-to-video request body:
Omni 图生视频请求体:
{
"model": "omni_flash-10s",
"prompt": "Animate the portrait with natural blinking, subtle breathing, and a gentle cinematic push-in.",
"image_url": "https://example.com/input.png",
"duration": 10,
"aspect_ratio": "9:16"
}
Omni video-reference request body:
Omni 参考视频请求体:
{
"model": "omni_flash-10s",
"prompt": "Edit the input video into a dreamy watercolor style while preserving the original scene layout and camera motion.",
"video": {
"url": "https://example.com/input.mp4"
},
"duration": 10,
"size": "1280x720"
}
Current validation status: the public Omni route accepts a video object and can complete the task, but our current live verification has not yet proven stable true video-edit behavior that preserves the exact source-video structure. In other words: task success does not automatically mean source-video editing is working as expected.
当前验证状态:公开 Omni 路由已经能接受 video 对象并成功完成任务,但我们目前的线上实测还没有验证出稳定的“保留原始视频结构”的真实视频编辑效果。也就是说:任务成功,不等于源视频编辑已经按预期生效。
What is confirmed today: video must be an object. A raw string such as "video": "https://example.com/input.mp4" is rejected by the upstream validation layer.
目前已经确认的规则:video 必须是对象。像 "video": "https://example.com/input.mp4" 这种直接传字符串的写法,会被上游校验层拒绝。
What your client should do after submit:
提交后客户端应该怎么处理:
task_id from the create response.task_id。GET /v1/videos/{task_id} until you get a terminal state.GET /v1/videos/{task_id},直到任务进入终态。video_url or from /v1/videos/{task_id}/content.video_url 或 /v1/videos/{task_id}/content 下载成片。Raw per-second models and fixed 10/15-second wrappers through the self-operated account pool.
通过自营号池提供原始按秒模型,以及固定 10 秒、15 秒包装模型。
| Item | 项目 | Value | 值 | Notes | 说明 |
|---|---|---|---|---|---|
| Host | 域名 | https://multimodal.vibelearning.top/v1 |
Use this host for both Grok video models. | 两个 Grok 视频模型都走这个域名。 | |
| Models | 模型 | grok-imagine-videogrok-imagine-video-1.5-previewgrok-video-10sgrok-video-15sgrok-video-1.5-preview-10sgrok-video-1.5-preview-15s |
All of them are asynchronous task models exposed through the same public route. | 它们都是通过同一公开路由暴露的异步任务模型。 | |
| Duration | 时长 | grok-imagine-video: up to 15sgrok-imagine-video-1.5-preview: up to 15sgrok-video-10s / grok-video-1.5-preview-10s: fixed 10sgrok-video-15s / grok-video-1.5-preview-15s: fixed 15s |
Use numeric duration for raw models. Fixed wrappers override any caller duration. Earlier legacy-channel observations about 15-second requests being normalized to 10 seconds are no longer treated as current self-pool behavior. | 原始模型请使用数字型 duration。固定包装模型会覆盖调用方传入的时长。旧渠道曾出现的“15 秒被规范成 10 秒”现象,不再作为当前自营号池的既定行为。 |
|
| Preferred fields | 推荐字段 | model, prompt, duration, aspect_ratio, resolution |
duration is the canonical numeric field. Legacy string seconds and common size values remain accepted by the public compatibility layer, but do not send both duration fields. | duration 是规范的数字型时长字段。公开兼容层仍接受字符串型 seconds 和常见 size,但不要同时发送两个时长字段。 |
|
| Image input | 图片输入 | image_url |
grok-imagine-video-1.5-preview and its fixed wrappers require an image. The public layer accepts image_url and converts it to the self-pool image: {"url": ...} contract. | grok-imagine-video-1.5-preview 及其固定包装模型必须带图。公开层接受 image_url,并转换为号池使用的 image: {"url": ...} 结构。 |
|
| Multi-image input | 多图输入 | reference_images |
Each entry should be an object containing url or file_id. Multi-image output behavior has not yet been reverified on the current self-operated pool. | 每个元素应为带 url 或 file_id 的对象。当前自营号池尚未重新验证多图成片行为。 |
Self-pool production check (2026-07-12): the fixed 10-second base text-to-video model and the fixed 10-second 1.5 image-to-video model both completed at 100% and returned final video URLs. Request normalization, local task creation, self-operated channel selection, polling, and billing are working.
自营号池生产验证(2026-07-12):基础模型固定 10 秒文生视频与 1.5 模型固定 10 秒单图生视频均已进度 100% 完成并返回成片地址;请求规范化、本地任务创建、自营渠道选择、轮询和计费均正常。
Model difference: grok-imagine-video supports text-to-video and image-to-video. grok-imagine-video-1.5-preview should currently be treated as image-to-video only. If you send only prompt to grok-imagine-video-1.5-preview, the upstream will return Text-to-video is not supported for this model.
模型差异:grok-imagine-video 支持文生视频和图生视频。grok-imagine-video-1.5-preview 当前应视为只支持图生视频。如果你给 grok-imagine-video-1.5-preview 只传 prompt 不传图片,上游会返回 Text-to-video is not supported for this model.
Text to video with grok-imagine-video:
使用 grok-imagine-video 做文生视频:
{
"model": "grok-imagine-video",
"prompt": "A tiger running across a grassland, cinematic daylight.",
"duration": 10,
"aspect_ratio": "16:9",
"resolution": "720p"
}
Image to video with fixed-wrapper grok-video-1.5-preview-10s:
使用固定包装模型 grok-video-1.5-preview-10s 做图生视频:
{
"model": "grok-video-1.5-preview-10s",
"prompt": "Animate the character with subtle blinking, a slight head turn, and gentle hair movement. Keep the framing stable and cinematic.",
"image_url": "https://example.com/input.jpg",
"aspect_ratio": "16:9",
"resolution": "720p"
}
Image to video with raw grok-imagine-video-1.5-preview:
使用原始模型 grok-imagine-video-1.5-preview 做图生视频:
{
"model": "grok-imagine-video-1.5-preview",
"prompt": "Animate the character with subtle blinking, a slight head turn, and gentle hair movement. Keep the framing stable and cinematic.",
"image_url": "https://example.com/input.jpg",
"duration": 10,
"aspect_ratio": "16:9",
"resolution": "720p"
}
Multi-image video with grok-imagine-video:
使用 grok-imagine-video 做多图参考视频:
{
"model": "grok-imagine-video",
"prompt": "The face of <IMAGE_1> wearing the red jacket from <IMAGE_2>, looking at camera, portrait shot. Keep the identity from <IMAGE_1> and transfer the clothing from <IMAGE_2>.",
"reference_images": [
{"url": "https://example.com/character.webp"},
{"url": "https://example.com/jacket.jpg"}
],
"duration": 15,
"aspect_ratio": "9:16",
"resolution": "720p"
}
Validation status: this is the current request contract. The account pool is available, but multi-image output has not yet been reverified on the current self-operated pool.
验证状态:这是当前请求结构。号池目前可用,但多图最终成片尚未在当前自营号池重新验证。
-t)-t)One listed charge per submitted task, selected by model and resolution.
每个提交任务按一次计费,具体档位由模型和分辨率决定。
A model name ending in -t is billed once per submitted task. Duration does not multiply the listed price. The selected resolution determines the tier; when omitted, 720p is used.
模型名以 -t 结尾时,表示每个提交任务按次计费。时长不会再次乘到价格上;价格档位由分辨率决定,未传时默认使用 720p。
| Model | 模型 | 480p |
720p |
1080p |
4k |
|---|---|---|---|---|---|
grok-imagine-video-1.5-preview-t | $0.75 / request | $0.75 / request | — | — | |
grok-video-3-t | $0.60 / request | $0.60 / request | — | — | |
omni-flash-t | — | $1.125 / request | $1.425 / request | $4.05 / request | |
omni-flash-t edit编辑模式 | — | $1.575 / request | $1.875 / request | $4.20 / request | |
veo3.1-t | — | $8.25 / request | $10.50 / request | $13.50 / request | |
veo3.1-fast-t | — | $0.825 / request | $1.125 / request | $3.15 / request | |
veo3.1-pre-t | — | $0.675 / request | $0.825 / request | $3.15 / request |
Create tasks with POST /v1/videos, then poll the returned local task ID at GET /v1/videos/{task_id}. Use the public -t model names below; do not send the provider model names without the suffix.
统一使用 POST /v1/videos 创建任务,再使用返回的本地任务 ID 轮询 GET /v1/videos/{task_id}。请求时必须使用下列带 -t 后缀的公开模型名,不要直接传不带后缀的上游模型名。
grok-video-3-tGrok Video 3 supports text-to-video, a single first frame, and concept-reference generation with 1–7 images.
Grok Video 3 支持文生视频、单图首帧和概念参考视频;概念参考模式支持 1–7 张参考图。
| Parameter | 参数 | Rules | 说明与可选值 |
|---|---|---|---|
model | grok-video-3-t (required) | 固定传 grok-video-3-t(必填) | |
prompt | Required video-generation prompt. | 视频生成提示词,必填。 | |
mode | text, frame, or ref. | 支持 text、frame、ref。 | |
images_url | Omit for text; exactly 1 first-frame image for frame; 1–7 reference images for ref. | text 不传;frame 传 1 张首帧图;ref 传 1–7 张参考图。 | |
aspect_ratio | 16:9, 9:16, or 1:1; default 9:16. | 支持 16:9、9:16、1:1;默认 9:16。 | |
duration | 6, 10, 12, 16, or 20 seconds; default 6. | 支持 6、10、12、16、20 秒;默认 6。 | |
resolution | 480p or 720p; default 720p. | 支持 480p、720p;默认 720p。 |
{
"model": "grok-video-3-t",
"prompt": "A cinematic camera slowly moves through a rainy city street.",
"mode": "text",
"aspect_ratio": "16:9",
"duration": 6,
"resolution": "720p"
}
grok-imagine-video-1.5-preview-tGrok Imagine Video 1.5 requires exactly one public first-frame image. A singular image_url is also accepted and normalized to images_url.
Grok Imagine Video 1.5 必须提供且仅提供 1 张公网首帧图;也可传单数形式 image_url,系统会自动归一化为 images_url。
| Parameter | 参数 | Rules | 说明与可选值 |
|---|---|---|---|
model | grok-imagine-video-1.5-preview-t (required) | 固定传 grok-imagine-video-1.5-preview-t(必填) | |
prompt | Required video-generation prompt. | 视频生成提示词,必填。 | |
images_url | Required array containing exactly 1 public first-frame image URL. | 必填数组,只能包含 1 个公网首帧图片 URL。 | |
aspect_ratio | 16:9, 9:16, or 1:1; default 16:9. | 支持 16:9、9:16、1:1;默认 16:9。 | |
duration | 6, 10, 12, or 15 seconds; default 6. | 支持 6、10、12、15 秒;默认 6。 | |
resolution | 480p or 720p; default 720p. The compatibility alias size is accepted. | 支持 480p、720p;默认 720p。兼容使用 size 传值。 |
{
"model": "grok-imagine-video-1.5-preview-t",
"prompt": "The subject turns slightly while the background remains stable.",
"images_url": ["https://example.com/first-frame.png"],
"aspect_ratio": "9:16",
"duration": 10,
"resolution": "720p"
}
omni-flash-tOmni Flash supports text generation, 1–3 reference images, and video editing. For editing, send both mode: "edit" and request_mode: "edit"; the latter selects Multi's editing price tier.
Omni Flash 支持文生视频、1–3 张参考图和视频编辑。编辑模式必须同时传 mode: "edit" 与 request_mode: "edit";后者用于选择 Multi 的编辑计费档。
| Parameter | 参数 | Rules | 说明与可选值 |
|---|---|---|---|
model | omni-flash-t (required) | 固定传 omni-flash-t(必填) | |
prompt | Required generation or editing prompt. | 视频生成或编辑提示词,必填。 | |
mode | text, ref, or edit. | 支持 text、ref、edit。 | |
request_mode | Use edit when mode is edit; otherwise omit or use default. | mode 为 edit 时固定传 edit;其他模式不传或使用 default。 | |
images_url | Omit for text; 1–3 images for ref; for edit, the first item is the public source-video URL. | text 不传;ref 传 1–3 张参考图;edit 的第 1 项为公网源视频 URL。 | |
aspect_ratio | 16:9 or 9:16; default 16:9. | 支持 16:9、9:16;默认 16:9。 | |
duration | 4, 6, 8, or 10 seconds; default 8. | 支持 4、6、8、10 秒;默认 8。 | |
resolution | 720p, 1080p, or 4k; default 720p. | 支持 720p、1080p、4k;默认 720p。 |
{
"model": "omni-flash-t",
"prompt": "Change the cup to blue while preserving the action and camera movement.",
"mode": "edit",
"request_mode": "edit",
"images_url": ["https://example.com/source-video.mp4"],
"aspect_ratio": "9:16",
"duration": 8,
"resolution": "720p"
}
The three public aliases share the same text/first-frame request structure and offer 720p, 1080p, and 4k. The two high-resolution tiers require an 8-second request.
三个公开别名共用相同的文生/首帧请求结构,均支持 720p、1080p、4k;两个高清档位必须使用 8 秒时长。
| Parameter | 参数 | Rules | 说明与可选值 |
|---|---|---|---|
model | veo3.1-t, veo3.1-fast-t, or veo3.1-pre-t. | 传 veo3.1-t、veo3.1-fast-t 或 veo3.1-pre-t。 | |
prompt | Required video-generation prompt. | 视频生成提示词,必填。 | |
mode | text or frame. | 支持 text、frame。 | |
images_url | Omit for text; for frame, provide 1 first-frame image or 2 first/last-frame images. | text 不传;frame 传 1 张首帧图,或 2 张首尾帧图。 | |
aspect_ratio | 16:9 or 9:16; default 16:9. | 支持 16:9、9:16;默认 16:9。 | |
duration | 4, 6, or 8 seconds; default 8. Durations 4/6 are limited to 720p. | 支持 4、6、8 秒;默认 8。4/6 秒仅支持 720p。 | |
resolution | 720p, 1080p, or 4k; 1080p/4k require duration: 8. | 支持 720p、1080p、4k;1080p/4k 必须传 duration: 8。 |
{
"model": "veo3.1-fast-t",
"prompt": "A stable, sharp cinematic product showcase.",
"mode": "frame",
"images_url": ["https://example.com/first-frame.png"],
"aspect_ratio": "16:9",
"duration": 8,
"resolution": "1080p"
}
This behavior is shared by every video model above. Normalize provider-specific states into the three classes below.
以上所有视频模型都共用这套处理方式。客户端只需把不同模型的状态归并成下面三类。
| State class | 状态类型 | Values to treat as equivalent | 等价状态值 | Client behavior | 客户端动作 |
|---|---|---|---|---|---|
| In progress | 处理中 | queued, pending, processing, in_progress, running | queued、pending、processing、in_progress、running |
Continue polling. A task can remain at queued with a low fixed progress such as 20 for some time and still complete normally later. | 继续轮询。任务可能会在一段时间内停留在 queued,并显示类似 20 这样的固定低进度,但后续仍然会正常完成。 |
| Success | 成功 | succeeded, completed, success | succeeded、completed、success |
Switch to /content retrieval. | 改为调用 /content 取成品。 |
| Failure | 失败 | failed, error, cancelled | failed、error、cancelled |
Stop polling and surface a task failure to the user. | 停止轮询,并向用户返回失败结果。 |
What you should store: keep the returned task_id for polling, and after success use the returned video_url or the matching /v1/videos/{task_id}/content route to download the final video.
你真正需要保存的:先保存返回的 task_id 用于轮询;任务成功后,直接使用返回的 video_url,或者使用对应的 /v1/videos/{task_id}/content 路由下载成片。
multimodal.vibelearning.top. Image generation and editing use image1.vibelearning.top.multimodal.vibelearning.top,文生图和图生图统一使用 image1.vibelearning.top。/content directly in a browser tab, remember that the browser tab will not automatically carry your Bearer token./content 直接贴到浏览器标签页打开,要注意浏览器不会自动带上你的 Bearer token。task_id as your query key only. You do not need any provider task ID.task_id 当作查询任务的唯一键即可,不需要感知任何上游任务号。| Problem | 问题 | Why it happens | 原因 | Correct fix | 正确做法 |
|---|---|---|---|---|---|
| Client expects an MP4 directly from create | 客户端期待创建请求直接返回 MP4 | Video generation is asynchronous. | 视频生成是异步任务。 | Submit, poll, then download. Do not treat POST /v1/videos as a direct media response. | 先提交、再轮询、最后下载。不要把 POST /v1/videos 当成直接返回媒体内容。 |
/content works in code but fails in browser | /content 在代码里能用,浏览器直接打开失败 |
The browser tab is not sending your Bearer token. | 浏览器标签页没有带 Bearer token。 | Download through your authenticated client logic, not by asking customers to open a bare URL. | 通过你自己的鉴权客户端逻辑下载,不要让客户直接打开裸链接。 |
| Customer sees an upstream host or provider task ID | 客户看到了上游域名或上游任务 ID | The integration leaked provider details. | 接入层把上游信息泄露出来了。 | Only surface local task_id and your public route shape. | 对外只展示本地 task_id 和你的公开路由。 |
Request is sent to multimodal instead of runtime API host | 请求被发到了 multimodal,而不是实际 API 域名 |
Docs host and API host got mixed together. | 文档域名和接口域名混用了。 | Use multimodal.vibelearning.top for all public video requests. Use image1.vibelearning.top for image generation and editing. | 所有公开视频请求都发到 multimodal.vibelearning.top。文生图和图生图发到 image1.vibelearning.top。 |
grok-imagine-video-1.5-preview returns “Text-to-video is not supported for this model” | grok-imagine-video-1.5-preview 返回 “Text-to-video is not supported for this model” |
The request body only sent text and did not include an image reference. | 请求体只传了文本,没有带图片参考。 | Treat grok-imagine-video-1.5-preview as image-to-video. Add image_url. | 把 grok-imagine-video-1.5-preview 当作图生视频模型使用,补上 image_url。 |
Upstream reports duplicate duration | 上游提示重复 duration |
Both seconds and duration reached an xAI-compatible endpoint that treats them as aliases. | seconds 和 duration 同时到达了把两者视为别名的 xAI 兼容接口。 |
Use one numeric duration. The public adapter now removes the legacy alias before forwarding. | 只使用一个数字型 duration。公开适配器现在会在转发前移除旧别名。 |
Banana, web-image2, and adobe-image2 are sibling contracts on image1.vibelearning.top. Both image2 families send model=gpt-image-2; the group on the key decides which contract you get.
Banana、web-image2 和 adobe-image2 是 image1.vibelearning.top 上并列的三套合同。两个 image2 家族都传 model=gpt-image-2;具体走哪套,由 key 所在分组决定。
Gemini image models on the banana group. Use native generateContent or OpenAI-compatible chat completions.
挂在 banana 分组上的 Gemini 图片模型。走原生 generateContent 或 OpenAI 兼容 Chat Completions。
The image-plus series. Sync generations and edits; async text-to-image only.
image-plus 系列分组。同步文生图 / 图生图;异步只开放文生图。
The 原生 4k Adobe family. Use the Adobe size table. Async edits are open. No mask.
原生 4k 的 Adobe 家族。使用 Adobe 尺寸表。异步图生图已开放。不支持 mask。
Gemini image models on the banana group. Two public routes are verified: native generateContent and OpenAI-compatible chat completions.
挂在 banana 分组上的 Gemini 图片模型。当前已验证两条公开路径:原生 generateContent,以及 OpenAI 兼容的 Chat Completions。
Do not send these models to POST /v1/images/generations. That route only accepts Imagen models and will return not supported model for image generation.
不要把这些模型发到 POST /v1/images/generations。该路由只接受 Imagen 模型,会返回 not supported model for image generation。
| Model | 模型 | Role | 定位 | Public price | 公开单价 |
|---|---|---|---|---|---|
gemini-3.1-flash-image-preview | gemini-3.1-flash-image-preview |
Default Banana model. Faster, lower cost. | 默认 Banana 模型。更快,更便宜。 | $0.12 / image | $0.12 / 张 |
gemini-3-pro-image-preview | gemini-3-pro-image-preview |
Higher-quality Banana model. | 更高质量的 Banana 模型。 | $0.15 / image | $0.15 / 张 |
| Route | 路由 | Status | 状态 | How to read the image | 如何取图 |
|---|---|---|---|---|---|
POST /v1beta/models/{model}:generateContent | POST /v1beta/models/{model}:generateContent |
Verified | 已验证 | Gemini native. Read inlineData / inline_data from candidates[0].content.parts. | Gemini 原生。从 candidates[0].content.parts 读取 inlineData / inline_data。 |
POST /v1/chat/completions | POST /v1/chat/completions |
Verified | 已验证 | OpenAI-compatible. Read data:image from choices[0].message.content. | OpenAI 兼容。从 choices[0].message.content 读取 data:image。 |
POST /v1/images/generations | POST /v1/images/generations |
Not supported for Banana | Banana 不支持 | Imagen-only :predict path. Banana returns only imagen models are supported. | 这是 Imagen 的 :predict 路径。Banana 会返回 only imagen models are supported。 |
https://image1.vibelearning.top
Use a key on the banana group. Send it as Authorization: Bearer YOUR_API_KEY on both verified routes.
使用挂在 banana 分组上的 key。两条已验证路径都用 Authorization: Bearer YOUR_API_KEY。
This is the Gemini-native Banana endpoint. Put the model name in the path. Keep generationConfig.responseModalities as TEXT plus IMAGE.
这是 Banana 的 Gemini 原生端点。模型名写在路径里。保持 generationConfig.responseModalities 为 TEXT 加 IMAGE。
curl -X POST "https://image1.vibelearning.top/v1beta/models/gemini-3.1-flash-image-preview:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{"text": "A single yellow banana on a white table, studio lighting, photorealistic. Square 1:1 composition."}
]
}
],
"generationConfig": {
"responseModalities": ["TEXT", "IMAGE"]
}
}'
Typical native success shape:
典型原生成功回包:
{
"candidates": [
{
"content": {
"parts": [
{
"inlineData": {
"mimeType": "image/jpeg",
"data": "..."
}
}
]
}
}
],
"usageMetadata": {}
}
Use this if your client already speaks OpenAI chat. The gateway converts it to native generateContent. Keep generationConfig.responseModalities as TEXT plus IMAGE. The image comes back inside the chat message, usually as a data:image/...;base64,... string.
如果你的客户端已经按 OpenAI chat 接入,用这条。网关会把它转成原生 generateContent。保持 generationConfig.responseModalities 为 TEXT 加 IMAGE。图片在聊天消息里返回,通常是 data:image/...;base64,... 字符串。
curl -X POST "https://image1.vibelearning.top/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-flash-image-preview",
"messages": [
{
"role": "user",
"content": "A single yellow banana on a white table, studio lighting, photorealistic. Square 1:1 composition."
}
],
"generationConfig": {
"responseModalities": ["TEXT", "IMAGE"]
},
"stream": false
}'
Typical success shape:
典型成功回包:
{
"id": "chatcmpl-xxx",
"object": "chat.completion",
"model": "gemini-3.1-flash-image-preview",
"choices": [
{
"message": {
"role": "assistant",
"content": "data:image/jpeg;base64,..."
}
}
],
"usage": {
"prompt_tokens": 276,
"completion_tokens": 1519,
"total_tokens": 1795
}
}
Stay on the two verified Banana routes. Do not switch to /v1/images/edits.
继续走上面两条已验证路径。Banana 不要改用 /v1/images/edits。
Native: put the prompt in a text part and attach each reference as inline_data.
原生:提示词放在 text part,每张参考图作为一个 inline_data part。
curl -X POST "https://image1.vibelearning.top/v1beta/models/gemini-3.1-flash-image-preview:generateContent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{"text": "Keep the same subject and restyle it as a clean product poster."},
{
"inline_data": {
"mime_type": "image/jpeg",
"data": "BASE64_IMAGE"
}
}
]
}
],
"generationConfig": {
"responseModalities": ["TEXT", "IMAGE"]
}
}'
OpenAI-compatible: put the prompt in a text part and attach each reference as an image_url part.
OpenAI 兼容:提示词放在 text part,每张参考图作为一个 image_url part。
curl -X POST "https://image1.vibelearning.top/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-flash-image-preview",
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "Keep the same subject and restyle it as a clean product poster."},
{"type": "image_url", "image_url": {"url": "https://example.com/reference.jpg"}}
]
}
],
"generationConfig": {
"responseModalities": ["TEXT", "IMAGE"]
},
"stream": false
}'
candidates[0].content.parts. Accept both inlineData and inline_data. Decode the base64 data field.candidates[0].content.parts。同时兼容 inlineData 和 inline_data。解码其中的 base64 data。choices[0].message.content. It may be a string or an array of parts. Extract every data:image URL.choices[0].message.content。它可能是字符串,也可能是 parts 数组。抽出其中所有 data:image。-preview.-preview。451 Content blocked is a safety rejection, not a channel outage. Change the prompt instead of retrying the same request.451 Content blocked 是内容安全拦截,不是渠道故障。应改提示词,不要原样重试。The image-plus series of gpt-image-2, including image2-plus, image2-plus-vip, and image-plus-bb. For Adobe 4K sizes or async edits, use adobe-image2.
gpt-image-2 的 image-plus 系列,包括 image2-plus、image2-plus-vip、image-plus-bb。如果要接 Adobe 4K 或异步图生图,请看 adobe-image2。
Recommended default: use the synchronous image route for simple calls. Use the async task route only when your client cannot keep a long HTTP request open.
默认建议:普通调用优先使用同步图片接口。只有当客户端不方便保持长 HTTP 请求时,再使用异步任务接口。
https://image1.vibelearning.top/v1
Use a key on an image-plus series group. Send Authorization: Bearer YOUR_API_KEY. The model name is still gpt-image-2.
使用挂在 image-plus 系列分组上的 key。请求头为 Authorization: Bearer YOUR_API_KEY。模型名仍是 gpt-image-2。
/v1/images/generationsgpt-image-2.gpt-image-2 的同步文生图。/v1/images/generations/tasks/v1/images/generations/tasks/{task_id}/v1/images/editscurl -X POST "https://image1.vibelearning.top/v1/images/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "A clean sci-fi product poster, minimal composition, high detail",
"size": "1024x1024",
"n": 1
}'
curl -X POST "https://image1.vibelearning.top/v1/images/generations/tasks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "A clean sci-fi product poster, minimal composition, high detail",
"size": "1024x1024",
"n": 1
}'
The create call returns immediately with a local task ID:
创建接口会立即返回本地任务 ID:
{
"id": "task_xxx",
"task_id": "task_xxx",
"object": "image.generation.task",
"status": "queued",
"created_at": 1781803308,
"query_endpoint": "/v1/images/generations/tasks/task_xxx"
}
Poll the task with the same Bearer token:
使用同一个 Bearer token 轮询任务:
curl -X GET "https://image1.vibelearning.top/v1/images/generations/tasks/task_xxx" \
-H "Authorization: Bearer YOUR_API_KEY"
When finished, status becomes completed and response contains the same OpenAI-compatible image payload returned by the synchronous route, including usage when the upstream provider returns token usage.
完成后,status 会变为 completed,response 中会包含与同步接口一致的 OpenAI 兼容图片响应;如果上游返回 token 用量,也会保留 usage。
{
"id": "task_xxx",
"task_id": "task_xxx",
"object": "image.generation.task",
"status": "completed",
"response": {
"created": 1781803330,
"data": [
{
"url": "https://image1.vibelearning.top/..."
}
],
"usage": {
"prompt_tokens": 19,
"completion_tokens": 734,
"total_tokens": 753
}
}
}
curl -X POST "https://image1.vibelearning.top/v1/images/edits" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "model=gpt-image-2" \
-F "prompt=请基于参考图做高精度重绘" \
-F "size=1024x1024" \
-F "n=1" \
-F "image=@./reference.png"
curl -X POST "https://image1.vibelearning.top/v1/images/edits" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "model=gpt-image-2" \
-F "prompt=Use all reference images together to create one cohesive poster." \
-F "size=1024x1024" \
-F "n=1" \
-F "image[]=@./ref1.png" \
-F "image[]=@./ref2.png" \
-F "image[]=@./ref3.png"
gpt-image-2 may return either b64_json or image URLs. Your client should support both response shapes.
gpt-image-2 可能返回 b64_json,也可能返回图片 URL。客户端应兼容这两种返回形式。
The synchronous route is still the simplest integration. The asynchronous text-to-image route is a local task wrapper around the same generation pipeline. On web-image2, asynchronous image editing is not currently exposed. For async edits, use adobe-image2.
同步路由仍然是最简单的接入方式。异步文生图路由是同一条生成链路外面的本地任务包装。web-image2 的异步图生图当前尚未开放。如果需要异步图生图,请改用 adobe-image2。
| Route | 路由 | Public support | 公开支持情况 | How to use it | 正确用法 |
|---|---|---|---|---|---|
POST /v1/images/generations | POST /v1/images/generations |
Supported | 支持 | Send JSON and wait for data in the same response. | 发送 JSON,请在同一个响应中读取 data。 |
POST /v1/images/edits | POST /v1/images/edits |
Supported | 支持 | Send multipart form data and wait for data in the same response. | 发送 multipart 表单,请在同一个响应中读取 data。 |
POST /v1/images/generations/tasks | POST /v1/images/generations/tasks |
Supported for text-to-image | 支持文生图 | Send the same JSON body as /v1/images/generations. The task route returns task_id first; poll until completed or failed. | 发送与 /v1/images/generations 相同的 JSON。任务接口先返回 task_id;轮询直到 completed 或 failed。 |
GET /v1/images/generations/tasks/{task_id} | GET /v1/images/generations/tasks/{task_id} |
Supported | 支持 | Use the same Bearer token that created the task. A token can only read its own user's tasks. | 使用创建任务时的同一个 Bearer token。Token 只能读取自己用户下的任务。 |
POST /v1/images/edits/tasks | POST /v1/images/edits/tasks |
Not currently available | 当前未开放 | Use the synchronous multipart route POST /v1/images/edits. | 请改用同步 multipart 路由 POST /v1/images/edits。 |
GET /v1/images/edits/tasks/{task_id} | GET /v1/images/edits/tasks/{task_id} |
Not currently available | 当前未开放 | There is no image-edit task to poll. Read the result directly from the synchronous edit response. | 当前没有可轮询的图生图任务;请直接读取同步编辑接口的响应。 |
Practical timeout advice: image generation can take tens of seconds, especially for high resolution or multi-image edits. Set your client read timeout high enough, and retry only after checking whether the previous request already produced a billable result.
实用超时建议:图片生成可能需要几十秒,尤其是高分辨率或多图编辑。客户端读取超时要设置得足够长;重试前请先确认上一条请求是否已经产生可计费结果。
| Parameter | 参数 | Meaning | 含义 | Notes | 说明 |
|---|---|---|---|---|---|
output_format | output_format |
Actual image file format | 实际输出图片格式 | Supported values: png, jpeg, webp. | 支持值:png、jpeg、webp。 |
response_format | response_format |
How the result is returned | 结果返回形式 | Use url or b64_json. This does not change the underlying image format by itself. | 可选 url 或 b64_json。它只控制返回形式,不会单独决定底层图片格式。 |
The 原生 4k Adobe family. Model is still gpt-image-2. Price is ¥0.10 / image. Use an Adobe size; invalid sizes return 400.
原生 4k 的 Adobe 家族。模型名仍是 gpt-image-2。单价 ¥0.10 / 张。必须传 Adobe 的 size,非法尺寸直接 400。
Base URL is https://image1.vibelearning.top/v1. Use a 原生 4k key as Authorization: Bearer YOUR_API_KEY. Do not use an image-plus key here.
请求地址为 https://image1.vibelearning.top/v1。使用 原生 4k 分组的 key,请求头 Authorization: Bearer YOUR_API_KEY。不要用 image-plus 系列的 key。
Pass size as widthxheight. Do not put 4k into quality. Check decoded pixels, not only the echoed size.
用 widthxheight 传 size。不要把 4k 写进 quality。验收看解码像素,不要只看回显 size。
| Ratio | 比例 | 1K | 1K | 2K | 2K | 4K | 4K |
|---|---|---|---|---|---|---|---|
| 1:1 | 1:1 | 1024x1024 | 1024x1024 | 2048x2048 | 2048x2048 | 2880x2880 | 2880x2880 |
| 5:4 | 5:4 | 1120x896 | 1120x896 | 2240x1792 | 2240x1792 | 3200x2560 | 3200x2560 |
| 4:5 | 4:5 | 896x1120 | 896x1120 | 1792x2240 | 1792x2240 | 2560x3200 | 2560x3200 |
| 4:3 | 4:3 | 1152x864 | 1152x864 | 2304x1728 | 2304x1728 | 3264x2448 | 3264x2448 |
| 3:4 | 3:4 | 864x1152 | 864x1152 | 1728x2304 | 1728x2304 | 2448x3264 | 2448x3264 |
| 3:2 | 3:2 | 1248x832 | 1248x832 | 2496x1664 | 2496x1664 | 3504x2336 | 3504x2336 |
| 2:3 | 2:3 | 832x1248 | 832x1248 | 1664x2496 | 1664x2496 | 2336x3504 | 2336x3504 |
| 16:9 | 16:9 | 1280x720 | 1280x720 | 2560x1440 | 2560x1440 | 3840x2160 | 3840x2160 |
| 9:16 | 9:16 | 720x1280 | 720x1280 | 1440x2560 | 1440x2560 | 2160x3840 | 2160x3840 |
| 21:9 | 21:9 | 1456x624 | 1456x624 | 3024x1296 | 3024x1296 | 3696x1584 | 3696x1584 |
quality is low / medium / high. detail_level is 1–5 and overrides quality. Neither changes the ¥0.10 unit price. 4K calls need a 90s read timeout.
quality 取 low / medium / high。detail_level 为 1–5,会覆盖 quality。两者都不改 ¥0.10 单价。4K 读取超时至少 90 秒。
curl -X POST "https://image1.vibelearning.top/v1/images/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-2","prompt":"a cinematic mountain sunrise","size":"3840x2160","quality":"high"}'
curl -X POST "https://image1.vibelearning.top/v1/images/edits" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "model=gpt-image-2" \
-F "prompt=turn this photo into watercolor style" \
-F "size=2496x1664" \
-F "image=@./input.png"
curl -X POST "https://image1.vibelearning.top/v1/images/edits/tasks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "model=gpt-image-2" \
-F "prompt=blend these images into one scene" \
-F "image[]=@./reference-a.png" \
-F "image[]=@./reference-b.png"
Edits are whole-image redraws, 1–6 references, no mask. Async edits are open; poll GET /v1/images/edits/tasks/{task_id} with the same token and read response.data when completed.
图生图是整体重绘,1–6 张参考图,不支持 mask。异步图生图已开放;用同一个 token 轮询 GET /v1/images/edits/tasks/{task_id},completed 后读 response.data。
| Problem | 问题 | Why it happens | 原因 | Correct fix | 正确做法 |
|---|---|---|---|---|---|
image is required | image is required |
The request did not include a valid multipart image field. | 请求没有带合法的 multipart 图片字段。 | Use image for single-image edits, or repeated image[] fields for multi-image edits. | 单图用 image,多图用重复的 image[]。 |
| Copied curl command breaks unexpectedly | 复制 curl 命令后异常损坏 | Older @reference.png examples are vulnerable to page-level email protection rewriting. | 历史上的 @reference.png 写法容易被页面邮箱保护错误改写。 |
Prefer @./reference.png style examples. | 统一使用 @./reference.png 这种写法。 |
Banana returns not supported model for image generation | Banana 返回 not supported model for image generation |
The request used /v1/images/generations. | 请求打到了 /v1/images/generations。 |
Use POST /v1beta/models/{model}:generateContent or POST /v1/chat/completions, and keep generationConfig.responseModalities. | 改用 POST /v1beta/models/{model}:generateContent 或 POST /v1/chat/completions,并带上 generationConfig.responseModalities。 |
adobe-image2 returns 400 or mask is not supported | adobe-image2 返回 400 或 mask is not supported |
The request used an image-plus size, put 4k into quality, or sent a mask. | 请求用了 image-plus 的尺寸、把 4k 写进了 quality,或传了 mask。 |
Use a 原生 4k key, an Adobe size such as 3840x2160, and whole-image redraw without mask. | 改用 原生 4k 的 key、Adobe 尺寸(如 3840x2160),并且不要传 mask。 |
| Image client reuses video polling logic | 图片客户端复用了视频轮询逻辑 | The video task response and image task response use different result fields. | 视频任务和图片任务的结果字段不同。 | For image tasks, read response.data after status=completed. For video tasks, use the returned video task/content routes. | 图片任务在 status=completed 后读取 response.data。视频任务则使用视频返回的 task/content 路由。 |