复制本页链接 https://docs.yuqitoken.cn 给 ChatGPT、Codex、Claude 或其他能读取网页的 AI,再告诉它你使用的客户端和模型。本服务使用独立域名体系,只使用 yuqitoken.cn,不得使用任何其他中转站域名。普通 OpenAI 兼容与异步接口默认使用 https://api.yuqitoken.cn/v1;仅 GPT Image 2 multipart 同步图生图 POST /v1/images/edits 使用 https://direct-api.yuqitoken.cn/v1;Claude Code / Anthropic Messages 使用不带 /v1 的 https://api.yuqitoken.cn。
请阅读并严格遵循:
https://docs.yuqitoken.cn
普通 OpenAI 兼容与异步接口默认使用这个 Base URL:
https://api.yuqitoken.cn/v1
仅 GPT Image 2 multipart 同步图生图 POST /v1/images/edits 使用这个 Base URL:
https://direct-api.yuqitoken.cn/v1
Claude Code / Anthropic Messages 只使用这个不带 /v1 的 Base URL:
https://api.yuqitoken.cn
按文档为对应客户端配置认证、精确模型名和同步/异步接口,并检查所有实际 API 请求域名都属于 yuqitoken.cn。
交给 AI 时必须同时要求:先按本页 machine contract 的精确模型列表和状态选择端点;模型名只能逐字读取 contract,不能从价格页、历史记录或第三方资料猜测;异步任务只轮询提交响应返回的原任务 ID;失败时不得自动补提第二单。
不要把完整 API Key 发到公开聊天、截图或代码仓库。让 AI 指导你把 Key 填入客户端的私密凭据区或环境变量即可。
完成中转服务配置
使用一把在控制台生成的 API Key,按本页公开合同配置已明确放行的模型。未完成同刻回读的模型会明确标为 pending/do_not_call;image2 使用同步图片接口;千问图像 3.0、Nano Banana 与可灵视频走异步 /v1/videos;GPT Image 2 文生图也走异步接口,上传参考图编辑走 /v1/images/edits。
https://api.yuqitoken.cn/v1仅 GPT Image 2 multipart 同步图生图:
https://direct-api.yuqitoken.cn/v1,客户端 timeout 至少 600 秒Claude Code / Anthropic Base URL:
https://api.yuqitoken.cn(不带 /v1)控制台:
https://console.yuqitoken.cn · 文档:https://docs.yuqitoken.cnOpenAI 兼容接口使用
Authorization: Bearer YOUR_API_KEY;Anthropic Messages 使用 x-api-key: YOUR_API_KEY。配置中只允许出现 yuqitoken.cn 域名体系,请勿公开密钥。快速开始
- 注册并登录控制台。
- 进入“令牌”,新建一个 API Key 并立即妥善保存。
- 先读取本页机器合同,确认目标模型的
availability=available与call_action=allow_call;pending/do_not_call 只能停下登记。 - 按机器合同选择接口:文字使用 Chat Completions 或 Responses;
image2使用同步图片接口;其它异步能力使用合同列出的提交与轮询路径。
curl -fsS https://docs.yuqitoken.cn/api-contract.json
# 仅当目标模型状态为 available/allow_call 时,才执行合同中的 POST 示例
模型与接口
模型名必须与本页 machine contract 完全一致,大小写、下划线和连字符不可改写。模型广场只用于查看客户价格;模型是否可调用只能以本页 contract 的 availability 与 call_action 为准。
| 场景 | 实际模型示例 | 接口 |
|---|---|---|
| GPT 文字、代码、推理 | gpt-5.5、gpt-5.6-sol、gpt-5.6-terra、gpt-6-astra、gpt-6-sol(当前 configuration_ready) | POST /v1/chat/completions 或 POST /v1/responses |
| Grok 文字 | 按 grok_text_chat 家族合同选择精确模型 | POST /v1/chat/completions |
| Claude Code 与 Anthropic Messages(5) | claude-fable-5、claude-fable-5-2、claude-opus-5、claude-opus-5-5、claude-sonnet-5 | POST /v1/messages |
| Image2 同步图片(1) | image2 | POST /v1/images/generations;编辑用 POST /v1/images/edits |
| GPT Image 2(4) | gpt-image-2、gpt-image-2-1K-medium、gpt-image-2-2K、gpt-image-2-4K | 文生图:POST /v1/videos 并轮询;图生图:multipart POST /v1/images/edits |
| GPT Image 2.5(7) | gpt-image-2.5、gpt-image-2.5-flare-1k、gpt-image-2.5-flare-2k、gpt-image-2.5-flare-4k、gpt-image-2.5-sunburst-1k、gpt-image-2.5-sunburst-2k、gpt-image-2.5-sunburst-4k | 异步文生图:POST /v1/videos 并轮询;同步文生图:POST /v1/images/generations;同步图生图:multipart POST /v1/images/edits |
| 千问图像 3.0 异步图片(3) | qwen-image-3.0、qwen-image-3.0-pro-1K、qwen-image-3.0-pro | POST /v1/videos,再用 GET /v1/videos/{task_id} 轮询 |
| Nano Banana 异步图片(6) | nano_banana_2、nano_banana_2-2K、nano_banana_2-4K、nano_banana_pro-1K、nano_banana_pro-2K、nano_banana_pro-4K | POST /v1/videos,再用 GET /v1/videos/{task_id} 轮询 |
| 可灵异步视频(4 个公开模型 ID / 3 条能力链) | kling-v2-6、kling-3.0-turbo、kling-3.0-turbo-1080p、kling-motion-control | POST /v1/videos,再用 GET /v1/videos/{task_id} 轮询 |
| Grok 视频 | 按 grok_video_async 家族合同选择带分辨率后缀的型号 | POST /v1/videos,再用 GET /v1/videos/{task_id} 轮询 |
id;只查询 GET /v1/videos/{task_id} 的原任务。queued 配合 progress=0 是正常排队状态,progress 只用于展示,不能单独判定成功或失败;以终态和结果 URL 为准:终态为 completed 且存在结果 URL 即成功,即使进度仍为 0 也不要重复提交。图片首次等待 5 秒,之后每 5–10 秒查询;视频首次等待 5 秒,之后每 10 秒查询。客户端安全上限:图片 30 分钟、视频 45 分钟;达到上限、状态未知或网络超时,保留 task_id、request_id、HTTP 状态和原始错误,停止自动动作,稍后继续查询原任务。遇到 429 时遵循 Retry-After 并加入随机抖动;除 Qwen 明确支持的同键重放外,不得自动重试或补提第二单。提交响应与重试安全:所有异步提交均应收到 JSON 对象并从顶层 id 取得任务 ID;没有 id 的 2xx、网络超时、503/504 或 429 都属于结果未知,不得猜 data.id、不得换端点或自动重提。保存响应头中的 Request-Id/X-Request-ID(若存在)以及完整脱敏错误 JSON。只有千问合同支持用同一个 Idempotency-Key 重放完全相同的请求;Nano、GPT Image 2 文生图和可灵没有公开幂等重放合同,未知结果只能查询原任务或人工核对。
GPT Luna 停售说明
gpt-5.6-luna 和 gpt-6-luna 的当前在售状态以本站目录为准。
GPT 文字模型:Chat Completions 与 Responses
https://api.yuqitoken.cn/v1,再在私密环境变量中放入用户 API Key。这里是 OpenAI 兼容入口;精确模型 ID 和完整机器合同见 api-contract.json。认证头固定为 Authorization: Bearer YOUR_API_KEY。模型名必须原样读取机器合同,不要自行猜别名。
最小示例
curl https://api.yuqitoken.cn/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"EXACT_MODEL_ID","messages":[{"role":"user","content":"你好"}]}'
Responses、流式事件、错误语义和未知结果处理留在机器合同;结果未知时保留请求标识并停止,不自动补提。
代码客户端与 Codex
/v1/chat/completions 与 /v1/responses 的路径固定,但 GPT 当前状态为 configuration_ready/configure_and_validate。普通 OpenAI 兼容客户端使用 Chat Completions;Codex 或明确要求 Responses API 的客户端使用 Responses。Base URL 是 https://api.yuqitoken.cn/v1;模型名只能从本页 machine contract 读取,不能从价格页、历史记录或第三方资料猜测。
Codex 配置必须写入用户级 ~/.codex/config.toml;项目目录里的 .codex/config.toml 会忽略自定义 provider。下面使用独立 provider 和环境变量,避免与 OpenAI 官方配置混用。
# ~/.codex/config.toml
model_provider = "relay"
model = "EXACT_MODEL_ID_FROM_CONTRACT"
[model_providers.relay]
name = "API 中转服务"
base_url = "https://api.yuqitoken.cn/v1"
env_key = "RELAY_API_KEY"
wire_api = "responses"
在系统私密环境中设置 RELAY_API_KEY,不要把真实 Key 写进 TOML 或项目仓库。配置规则以 Codex 官方配置参考为准。
Seedance 2.0 Fast
精确模型名:doubao-seedance-2-0-fast-260128。支持 480p、720p 和 4–15 秒。本型号已在本站公开目录启用。使用本站令牌,认证头为 Authorization: Bearer RELAY_API_KEY,创建请求为 Content-Type: application/json。
创建视频任务
POST https://api.yuqitoken.cn/v1/videos
Authorization: Bearer RELAY_API_KEY
Content-Type: application/json
{
"model": "doubao-seedance-2-0-fast-260128",
"prompt": "阳光照在窗台上",
"duration": 4,
"resolution": "480p"
}
duration 必填,为 4–15 的整数;resolution 可为 480p 或 720p,省略时为 720p。aspect_ratio 支持 16:9、9:16、1:1、21:9、4:3 和 3:4。
参考素材可用 reference_image_urls(最多 9 个)、reference_videos(最多 3 个)和 reference_audios(最多 3 个)。参考音频需同时提供参考图或参考视频。first_image_url 和 last_image_url 成对提供,且与参考素材分开使用。素材接受 HTTPS 或有效的 asset:// 地址。
查询原任务与读取结果
保存创建返回的本站 id ,使用原令牌轮询:
GET https://api.yuqitoken.cn/v1/videos/{task_id}
Authorization: Bearer RELAY_API_KEY
状态为 completed 时读取 url 或 data[].url;状态为 failed 时读取 error 并核对退款。提交结果未知时只查询原任务,不重复提交。400 请核对字段;401 或 403 请核对本站令牌、模型范围和余额。
参考视频两档与计费
| 条件 |
|---|
| reference_videos 非空 |
| 无参考视频 |
价格请查看本站价格页。
本轮完成公开目录与免费合同核验;未发起收费生成,真实首单实扣待对账。
Claude Code
claude-fable-5、claude-fable-5-2、claude-opus-5、claude-opus-5-5、claude-sonnet-5。本文给出 Claude Code 所需的完整 Base URL、认证头、请求字段、SSE 事件和错误处理;不要求客户 AI 猜测或查第三方资料。Claude Code 使用 Anthropic Messages:Base URL 不带 /v1,请求为 POST https://api.yuqitoken.cn/v1/messages,认证头为 x-api-key: YOUR_API_KEY,并固定发送 anthropic-version: 2023-06-01 与 Content-Type: application/json。把真实 Key 放入 ANTHROPIC_API_KEY 私密环境变量,不要写入文件、日志或聊天。
| 模型 ID | 状态 | 动作 |
|---|---|---|
claude-fable-5 | available | 按最小合同验证 |
claude-fable-5-2 | available | 仅 Max 分组 |
claude-opus-5 | available | 按最小合同验证 |
claude-opus-5-5 | available | 按最小合同验证 |
claude-sonnet-5 | available | 按最小合同验证 |
Fable 5.2:Max 分组与价格
claude-fable-5-2 只在 Max(max)分组可用。请在本站控制台选择 Max 分组的 API Key。价格以本站价格页为准。
价格请查看本站价格页。
直接配置与最小验证
export ANTHROPIC_BASE_URL="https://api.yuqitoken.cn"
export ANTHROPIC_API_KEY="YOUR_API_KEY"
curl -fsS https://docs.yuqitoken.cn/api-contract.json
# 将真实 Key 保存在私密环境变量;不要写入文件、日志或聊天
在同一个终端设置上面的两个环境变量后,运行 claude --model claude-fable-5-2 可选择 Fable 5.2;示例中的 Key 必须换成本站 Max 分组的 Key。Claude Code 会自动拼接 Messages 路径。可参照 Claude Code 官方网关配置。
Messages 最小请求
POST https://api.yuqitoken.cn/v1/messages
x-api-key: YOUR_API_KEY
anthropic-version: 2023-06-01
content-type: application/json
{"model":"EXACT_MODEL_ID","max_tokens":64,"messages":[{"role":"user","content":"..."}]}
必填字段是 model、max_tokens、messages。只发送本页 contract 明确列出的字段;收到 2xx 后按非流式响应或 SSE 终止事件判断,收到错误或未知结果则保留 request ID 并停止自动补提。
Grok 文字模型
当前精确型号为 grok-4.5、grok-4.6、grok-4.7,共用同一份 OpenAI 兼容 Chat 合同。Base URL 为 https://api.yuqitoken.cn/v1,使用 Authorization: Bearer YOUR_API_KEY,请求 POST /v1/chat/completions,JSON 必填 model 和 messages。新型号若出现在价格页,先查机器合同所属家族和状态。
curl -X POST "https://api.yuqitoken.cn/v1/chat/completions" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"grok-4.7","messages":[{"role":"user","content":"你好"}]}'
遇到超时、429、5xx 或响应结果未知,保留请求标识和错误信息,停止自动补提;不要根据相似名称改模型或猜测另一个接口。
Image2 与 GPT Image 2
gpt-image-2: available/allow_call;gpt-image-2-1K-medium: available/allow_call;gpt-image-2-2K: available/allow_call;gpt-image-2-4K: available/allow_call;image2: fail_closed/do_not_callimage2:同步文生图与图生图
image2 的公开合同仍固定为同步 Images 形状:文生图使用 POST /v1/images/generations;参考图编辑使用 multipart POST /v1/images/edits,文件字段为 image。只有 machine contract 标为 available/allow_call 时才可执行;当前状态下不要发送请求。
当前不可执行:image2 为 fail_closed/do_not_call。客户端只保留既有配置,不发送请求、不改成相似模型,也不从价格页推断可用性。
GPT Image 2 四款:文生图与图生图
逐模型状态:gpt-image-2: available/allow_call;gpt-image-2-1K-medium: available/allow_call;gpt-image-2-2K: available/allow_call;gpt-image-2-4K: available/allow_call
以下 4 个精确、区分大小写的 GPT Image 2 模型名分别独立生效。文生图走默认异步任务入口;上传参考图编辑固定走同步兼容的 multipart POST /v1/images/edits,并使用专用 Base URL https://direct-api.yuqitoken.cn/v1。客户端请求超时必须设置为至少 600 秒。这个地址仍然进入本站中转、使用同一 API Key 和计费,只是为长同步请求使用不同公网入口;不要把图生图请求发到 /v1/videos,也不要把文生图发到 /v1/images/generations。
curl --max-time 600 https://direct-api.yuqitoken.cn/v1/images/edits \
-H "Authorization: Bearer $API_KEY" \
-F "model=gpt-image-2-1K-medium" \
-F "image[]=@./reference.png;type=image/png" \
-F "prompt=保留主体,把背景改成简洁的办公场景" \
-F "size=1024x1024"
| 模型 | 图生图 multipart | 异步文生图 JSON | 说明 |
|---|---|---|---|
gpt-image-2 | -F "size=1024x1024"、-F "size=1536x1024"、-F "size=1024x1536" | "size": "1024x1024"、"size": "1536x1024"、"size": "1024x1536" | 基础款 |
gpt-image-2-1K-medium | -F "size=1024x1024" | "size": "1024x1024" | 1K medium 档 |
gpt-image-2-2K | -F "size=2048x2048" | "size": "2048x2048" | 2K 档 |
gpt-image-2-4K | -F "size=2880x2880" | "size": "2880x2880" | 4K 档 |
curl -X POST "https://api.yuqitoken.cn/v1/videos" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2-2K",
"prompt": "一张干净的鱼鳍鳞 AI 工作台等距插画,暖红色点缀,白色背景",
"size": "2048x2048"
}'
size 与 aspect_ratio 最多只能传一个;两者都不传时由适配器使用默认值或参考图比例,同时传入即拒绝。这组规则同时适用于异步文生图 JSON 与图生图 multipart。4K 正方形示例使用 "size": "2880x2880";其他比例只能改传公开支持的顶层 aspect_ratio。
GPT Image 2 严格输入边界:文本字段只允许 model、prompt,以及最多一个 size 或 aspect_ratio;图生图文件字段只允许重复的精确 image[]。图生图的 response_format 可省略,或发送 url(大小写不敏感);b64_json 和其他值都会被拒绝。n、quality、resolution、detailLevel、aspectRatio、ratio、width、height、mask 和所有未知字段都会被拒绝;服务内部固定单图和 URL 结果。单次请求体最大 10 MiB,最多 6 张参考图,图片合计最大 7 MiB。只接受 JPEG、PNG、WebP;HEIC/HEIF、AVIF、GIF、BMP、TIFF、RAW 直接拒绝,不做静默转码。
合同隔离:同步模型 image2 继续使用本节上方既有的 image 文件字段与同步端点;它不经过这三个 GPT Image 2 适配器,也不得套用 image[] 规则。反过来,GPT Image 2 三档不接受单数 image。
验收分辨率时同时核对原请求模型名与返回的 size;1K、2K、4K 正方形分别应为 1024x1024、2048x2048、2880x2880。
curl "https://api.yuqitoken.cn/v1/videos/$TASK_ID" \
-H "Authorization: Bearer $API_KEY"
GPT Image 2 异步文生图完成后,以 status=completed 且存在顶层 url 或 data[].url 为成功条件;progress 仅展示,progress=0 不能触发重复提交。失败时读取 error 并停止。
GPT Image 2.5:七个精确型号与三种固定接法
gpt-image-2.5、gpt-image-2.5-flare-1k、gpt-image-2.5-flare-2k、gpt-image-2.5-flare-4k、gpt-image-2.5-sunburst-1k、gpt-image-2.5-sunburst-2k、gpt-image-2.5-sunburst-4k。不存在公开泛型号 gpt-image-2.5-flare 或 gpt-image-2.5-sunburst,不得删掉分辨率后缀。两站使用同一套客户合同,只替换当前站点的 API Base URL。所有请求都使用 Authorization: Bearer YOUR_API_KEY;一次业务请求只允许一次生成 POST,超时、连接中断或结果未知时不得自动重复提交。
接法 A:异步文生图
curl -X POST "https://api.yuqitoken.cn/v1/videos" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.5-flare-4k",
"prompt": "一只白色陶瓷杯放在木桌上",
"size": "2880x2880",
"n": 1
}'
保存响应中的 id ,然后只查询原任务:GET https://api.yuqitoken.cn/v1/videos/{task_id}。只有最终状态为 completed 或等价成功状态,并且存在 data[].url,才算成功;排队、运行中、提交成功或进度数值都不代表已出图。
接法 B:同步文生图
curl -X POST "https://api.yuqitoken.cn/v1/images/generations" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.5-sunburst-2k",
"prompt": "月光下的湖面,真实摄影风格",
"size": "2048x2048",
"n": 1
}'
保持 HTTP 连接并直接等待 data[].url;这条接法不需要客户轮询。
接法 C:同步图生图
curl -X POST "https://direct-api.yuqitoken.cn/v1/images/edits" \
-H "Authorization: Bearer $API_KEY" \
-F "model=gpt-image-2.5-flare-2k" \
-F "prompt=保留人物和构图,改成水彩插画" \
-F "image[]=@./reference-1.png;type=image/png" \
-F "image[]=@./reference-2.png;type=image/png" \
-F "response_format=url"
最多上传 9 张参考图,每张都必须重复使用 multipart 文件字段 image[]。直接等待同步响应中的 data[].url;不要调用 /v1/videos,也不要轮询。
| 规则 | GPT Image 2.5 固定合同 |
|---|---|
| 输出数量 | n=1;不得传 n=4 |
| 尺寸与比例 | size 与 aspect_ratio 最多传一个,不得同时发送;文生图可两者都省略 |
| 比例格式 | aspect_ratio 必须是精确的 ASCII 宽:高 字符串,并且命中对应型号白名单;不得传小数、空格、中文冒号、别名或未公开比例,也不得依赖服务自动归一化 |
| 比例白名单 | 基础型号支持 1:1、5:4、9:16、21:9、16:9、3:2、4:3、4:5、3:4、2:3;六个 K 档型号额外支持 7:6 |
| 基础型号尺寸 | 1024x1024、1536x1024、1536x864、1536x1152、1152x1536、1280x1024、1024x1280、1536x656、1024x1536、auto |
| K 档尺寸格式 | 宽x高,宽高必须是正整数且均为 16 的倍数;最长边不超过 3840,长短边比例不超过 3:1;总像素范围:1K 为 655,360–1,048,576,2K 为 655,360–4,194,304,4K 为 655,360–8,294,400 |
| 默认正方形档位 | 1K:1024x1024;2K:2048x2048;4K:2880x2880 |
| 图生图输入 | 1–9 个真实上传文件;不接受 JSON 图片数组、Base64、图片 URL 或本地路径字符串 |
| 图生图结果格式 | response_format 可省略;如发送,只允许 url |
| 结果未知 | 保存请求时间、请求标识和已返回的任务标识;异步只查原任务,同步不得重新 POST |
图生图也允许同时省略 size 与 aspect_ratio,但只有全部参考图比例一致且服务能够识别时才会自动推断;比例不一致或无法识别时返回 HTTP 400 size_required,此时应修正原请求,不得自动重复提交。
与 image2 隔离:image2 继续使用单数文件字段 image;GPT Image 2.5 只接受重复字段 image[]。两份合同不得互相套用。
千问图像 3.0 异步生图
qwen-image-3.0、qwen-image-3.0-pro-1K 与 qwen-image-3.0-pro 都使用异步任务接口。提交后读取响应中的 id,只轮询这个原任务 ID。任务查询记录与成品临时地址仅保证 24 小时,请及时下载保存。
| 模型 | 公开调用规格 |
|---|---|
千问 Image 3.0qwen-image-3.0 | 文生图/图生图;支持 1K/2K |
千问 Image 3.0 Pro 1Kqwen-image-3.0-pro-1K | 文生图/图生图;固定 1K 档 |
千问 Image 3.0 Pro 2Kqwen-image-3.0-pro | 文生图/图生图;固定 2K 档 |
IDEMPOTENCY_KEY="qwen-$(uuidgen)"
curl -X POST "https://api.yuqitoken.cn/v1/videos" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"model": "qwen-image-3.0",
"prompt": "一张干净的余岂 AI 工作台等距插画,青绿色点缀,白色背景",
"size": "1024x1024"
}'
提交图生图任务
在同一个请求中传入顶层 images 数组,提供 1–3 张有序参考图;服务会按数组顺序传给千问。元素可为公网 HTTPS URL,或完整的 data:image/...;base64, Data URI;不接收 HTTP、裸 Base64、带账号密码或片段的 URL。单张 Data URI 解码后不得超过 10 MB,整个请求体不得超过 14 MiB:JPEG、PNG、WebP、GIF、BMP、TIFF、HEIC/HEIF 与 AVIF 会在受限进程中校验并归一化,SVG、PDF、PSD 与 RAW 默认拒绝。prompt_extend_mode 使用 direct,图生图不支持 agent。
IDEMPOTENCY_KEY="qwen-$(uuidgen)"
curl -X POST "https://api.yuqitoken.cn/v1/videos" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"model": "qwen-image-3.0-pro-1K",
"prompt": "保留人物主体,把背景改为简洁的企业办公场景",
"images": [
"https://example.com/person.png",
"https://example.com/style.png",
"https://example.com/background.png"
],
"size": "1024x1024",
"prompt_extend_mode": "direct"
}'
curl "https://api.yuqitoken.cn/v1/videos/$TASK_ID" \
-H "Authorization: Bearer $API_KEY"
标准版只传本站已验证的 size(1024x1024、2048x2048)或省略使用默认值;不要猜测未列出的比例或尺寸。Pro 1K 固定 1024x1024,Pro 2K 固定 2048x2048;任何跨档尺寸都会被拒绝。
图生图只接受顶层 images 数组;image、image_url、input_image、reference_image_url 与消息内容中的嵌套图片字段会被拒绝。Data URI 会校验真实文件签名、声明 MIME、像素数与体积;公网 HTTPS URL 由图像生成服务校验。允许字段为 model、prompt、images、n、size/resolution、aspect_ratio/aspectRatio、prompt_extend、watermark、negative_prompt、prompt_extend_mode、seed、idempotency_key;其中 n 固定为 1,需要多张结果时提交多个独立任务。客户优先使用请求头 Idempotency-Key;请求体同名字段是兼容写法,两处同时发送时必须一致。
Nano Banana 异步图片生成
POST /v1/videos;提交响应顶层的 id 是任务 ID。可用模型:nano_banana_2、nano_banana_2-2K、nano_banana_2-4K、nano_banana_pro-1K、nano_banana_pro-2K、nano_banana_pro-4K。请求体只使用本节列出的字段;分辨率由完整模型名决定,不要另外传 size 或 resolution。
文生图
curl -X POST "https://api.yuqitoken.cn/v1/videos" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano_banana_2",
"prompt": "一只橘猫坐在窗边晒太阳,写实摄影风格"
}'
图生图
curl -X POST "https://api.yuqitoken.cn/v1/videos" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano_banana_2",
"prompt": "保留人物主体,把背景改成日落海边",
"images": ["https://example.com/input.png"]
}'
图生图的 images 只能放一张无需登录即可访问的公网 HTTPS 图片。不要传 HTTP、Data URI、裸 Base64、本地路径或多张图片。
查询任务
curl "https://api.yuqitoken.cn/v1/videos/$TASK_ID" \
-H "Authorization: Bearer $API_KEY"
提交后保存顶层 id,只查询 GET /v1/videos/{task_id}。queued、processing 时继续查询;只有 status=completed 且返回 url 或 data[].url 才算成功。progress=0 可能只是排队,不能因此重复提交。
MiniMax H3
精确模型名:mm5-minimax-h3。本站暂不接收新任务。恢复时间以本站模型目录为准。创建使用本站令牌,认证头为 Authorization: Bearer RELAY_API_KEY,请求为 POST https://api.yuqitoken.cn/v1/videos。
{"model":"mm5-minimax-h3","prompt":"温暖的午后,阳光洒在窗台上。"}
duration 为 4–15 秒,默认 5;resolution 默认 768P,可选 2K。常用画幅为 adaptive、21:9、16:9、4:3、1:1、3:4、9:16;有首帧时不传 aspect_ratio。
参考图片、视频、音频分别最多 9、3、3 个,总数最多 12 个;仅传参考音频不支持。first_image_url 可单独传;last_image_url 需要首帧。首尾帧与参考素材互斥。
查询原任务
GET https://api.yuqitoken.cn/v1/videos/{task_id}
Authorization: Bearer RELAY_API_KEY
保存本站返回的 id ,使用原令牌查询原任务。结果未知时只查原任务,不重复提交。
价格档
| 分辨率 |
|---|
| 768P |
| 2K |
价格请查看本站价格页。
按条计费,价格由分辨率档位决定。4–15 秒是请求时长,不参与计费。价格以本站价格页为准。
可灵 4
使用本站令牌;请求头 Authorization: Bearer RELAY_API_KEY,JSON 请求发送至 POST https://api.yuqitoken.cn/v1/videos。
{"model": "kling-4.0", "prompt": "阳光照在窗台上", "resolution": "720p", "duration": 5}
kling-4.0 支持 720p(默认)和 1080p,时长 3–30 秒;kling-4.0-flash 支持 720p,时长 3–20 秒。时长默认 5 秒;可用 duration 或 seconds,同时填写时必须一致。
当前仅开放不带视频输入的请求。带视频输入或 Flash 使用 1080p 会返回 HTTP 400。
查询和下载
保存本站返回的任务编号,用原站令牌查询 GET https://api.yuqitoken.cn/v1/videos/{task_id},下载 GET https://api.yuqitoken.cn/v1/videos/{task_id}/content。提交结果不明时保留任务号并查询原任务,不重复提交。
默认组价格
按输出秒计费;以下 5 秒合计按普通充值口径估算,实际扣费以本站账单为准。
| 型号与分辨率 |
|---|
| 普通版 720p |
| 普通版 1080p |
| Flash 720p |
价格请查看本站价格页。
在售模型接入
以下型号以本站当前目录为准。价格见本站价格页。
文字模型
LongCat-2.5、agnes-3.0-flash、as-gemini-3.1-pro-preview、as-gemini-3.6-flash、as-gemini-3.8-flash、as-gemini-4-argon、as-gemini-4-carbon、as-gemini-4-hydrogen、codex-auto-review、deepseek-v4-flash、deepseek-v4-flash-0731、deepseek-v4-flash-vision、deepseek-v4-pro、deepseek-v4-pro-0813、deepseek-v4.1-flash、deepseek-v4.1-flash-1017、gemini-3-flash、gemini-3.1-flash-lite、gemini-3.1-pro-preview、gemini-3.5-flash、gemini-3.5-flash-lite、gemini-3.6-flash、gemini-3.7-flash、gemini-3.8-flash、gemini-4-argon、glm-5.1、glm-5.2、glm-5.3、glm-5.3-flash、glm-5.3-flashx、glm-5.4、gpt-5.5、gpt-5.6-luna、gpt-5.6-sol、gpt-5.6-terra、gpt-6-astra、gpt-6-luna、gpt-6-sol、gpt-6.1-sol、gpt-6.1-terra、gpt-6.2-astra、gpt-6.2-sol、hy3、hy4、kimi-k2.5、kimi-k2.6、kimi-k2.7-code、kimi-k2.8-code、kimi-k2.8-preview、kimi-k3、kimi-k3.1-pro、kimi-k3.1-pro-highspeed、mimo-v2.5-pro、mimo-v2.6-flash、mimo-v2.6-pro、minimax-m2.5、minimax-m2.7、minimax-m2.7-highspeed、minimax-m3、minimax-m3.1-flash、mu1-muse-chat、mu1-muse-invite、mu1-muse-live、nemotron-3-ultra、nemotron-3.5-lightning、qwen3.7-max、qwen3.7-plus、qwen3.8-27b、qwen3.8-flash、qwen3.8-max、qwen4-max、sensenova-6.8-flash-lite、step-3.7-flash、step-5
POST /v1/chat/completions:传 model、messages、max_tokens、stream。
{
"model": "LongCat-2.5",
"messages": [
{
"role": "user",
"content": "你好"
}
],
"max_tokens": 256,
"stream": false
}向量模型
text-embedding-3-large、text-embedding-3-small、text-embedding-ada-002、text-embedding-v4
POST /v1/embeddings:传 model 与 input。
{
"model": "text-embedding-3-large",
"input": "示例文本"
}图片模型
Z-Image-Turbo、doubao-seedream-5-0-lite-x、doubao-seedream-5-5、mu1-muse-image
POST /v1/images/generations。doubao-seedream-5-5 的 size 使用比例或 auto,resolution 可选 1k、2k;doubao-seedream-5-0-lite-x 的 size 使用比例或 auto,不接受宽高格式,resolution 可选 2K、3K、4K。mu1-muse-image 与 Z-Image-Turbo 的 size 使用比例,例如 1:1。
{
"model": "doubao-seedream-5-5",
"prompt": "一只纸鹤",
"size": "1:1",
"resolution": "2k"
}MIMO 语音
mimo-v2.5-asr 和 mimo-v2.5-tts 使用 POST /v1/chat/completions,不使用 /v1/audio/*。ASR 传 input_audio 转写;TTS 需要 assistant 角色并返回音频。
图片与视频型号
图片
flux-3-image-1.5k、flux-3-image-1k、flux-3-image-2k、flux-3-image-4k、flux-3-image-768sq、flux-3-klein-1k、flux-3-klein-2k、flux-3-klein-4k、gpt-image-2.6、gpt-image-2.6-flare、gpt-image-2.6-flare-1k、gpt-image-2.6-flare-2k、gpt-image-2.6-flare-4k、gpt-image-2.6-sunburst、gpt-image-2.6-sunburst-1k、gpt-image-2.6-sunburst-2k、gpt-image-2.6-sunburst-4k、gpt-image-2.6-x
向 POST /v1/images/generations 发送 JSON,填写 model 与 prompt。固定档型号以型号名选档;其他字段请参照对应型号说明。
{
"model": "flux-3-image-1.5k",
"prompt": "一只纸鹤"
}Wan 视频
wan3.0-video-1080p、wan3.0-video-480p、wan3.0-video-720p
向 POST /v1/videos 发送 model、prompt 和整数 duration(2–30 秒);型号名固定分辨率。保存返回的 id,使用同一站令牌 GET /v1/videos/{task_id} 查询。
视频提交
gemini-omni-1.2-flash、omni-fast、omni-fast-no-water
向 POST /v1/videos 发送 JSON。请按下列格式提交请求。
{
"model": "gemini-omni-1.2-flash",
"prompt": "海边灯塔的清晨",
"n": 1,
"seconds": "5"
}
重排模型(Rerank)
qwen3-rerank
入口为 POST /v1/rerank(请勿走 /v1/chat/completions),必填字段 model、query、documents。价格见本站价格页。
{
"model": "qwen3-rerank",
"query": "海边灯塔的清晨",
"documents": [
"清晨海边灯塔与海浪声",
"城市夜晚霓虹街道"
]
}
Midjourney 图像与图生模型
入口为 POST /v1/images/generations 与 POST /v1/images/edits(查询路径 GET /v1/images/generations/{task_id}、GET /v1/images/edits/{task_id})。请使用下表公开调用名;价格见本站价格页。
| 公开调用名 | 接口 | 支持参数 |
|---|---|---|
mj2-midjourney | POST /v1/images/generations / edits | model(必填)、prompt(必填)、n、size、response_format、async、images |
mj2-midjourney-blend | POST /v1/images/generations / edits | model(必填)、prompt(必填)、n、size、response_format、async、images |
mj2-midjourney-describe | POST /v1/images/generations / edits | model(必填)、prompt(必填)、n、response_format、async、images |
{
"model": "mj2-midjourney",
"prompt": "海边灯塔的清晨"
}
语音转写补充(Muse ASR)
mu1-muse-asr
入口为 POST /v1/audio/transcriptions(multipart/form-data),参数:model(必填)、file(必填)、language、prompt、response_format、temperature。价格见本站价格页。
{
"model": "mu1-muse-asr",
"file": "clip.wav"
}
视频与播客模型全量合同(21 款)
统一提交入口 POST /v1/videos,轮询入口 GET /v1/videos/{task_id}。以下公开调用名均已按现役目录定稿,请在 model 字段按原样传参;价格见本站价格页。
| 公开调用名 | 支持参数 | 最小示例 |
|---|---|---|
gf1-gemini-omni-1.2-flash | model(必填)、prompt(必填)、aspect_ratio、duration、resolution、seed、reference_image_urls、reference_videos、first_image_url、last_image_url | {"model": "gf1-gemini-omni-1.2-flash", "prompt": "海边灯塔的清晨"} |
gf1-gemini-omni-flash | model(必填)、prompt(必填)、aspect_ratio、duration、resolution、reference_image_urls、reference_videos | {"model": "gf1-gemini-omni-flash", "prompt": "海边灯塔的清晨"} |
mu1-muse-podcast | model(必填)、prompt(必填)、duration、language、speakers、voices | {"model": "mu1-muse-podcast", "prompt": "海边灯塔的清晨"} |
mu1-muse-video | model(必填)、prompt(必填)、aspect_ratio、camera_movement、custom_skill、custom_style、duration、mute_voice、negative_prompt、script、seed、skill_preset、style、style_preset、reference_image_urls、first_image_url、last_image_url | {"model": "mu1-muse-video", "prompt": "海边灯塔的清晨"} |
mu1-muse-video-20s | model(必填)、prompt(必填)、aspect_ratio、camera_movement、custom_skill、custom_style、duration、mute_voice、negative_prompt、script、seed、skill_preset、style、style_preset、reference_image_urls、reference_videos、first_image_url、last_image_url | {"model": "mu1-muse-video-20s", "prompt": "海边灯塔的清晨"} |
mu1-muse-video-30s | model(必填)、prompt(必填)、aspect_ratio、camera_movement、custom_skill、custom_style、duration、mute_voice、negative_prompt、script、seed、skill_preset、style、style_preset、reference_image_urls、reference_videos、first_image_url、last_image_url | {"model": "mu1-muse-video-30s", "prompt": "海边灯塔的清晨"} |
mu1-muse-video-40s | model(必填)、prompt(必填)、aspect_ratio、camera_movement、custom_skill、custom_style、duration、mute_voice、negative_prompt、script、seed、skill_preset、style、style_preset、reference_image_urls、reference_videos、first_image_url、last_image_url | {"model": "mu1-muse-video-40s", "prompt": "海边灯塔的清晨"} |
mu1-muse-video-50s | model(必填)、prompt(必填)、aspect_ratio、camera_movement、custom_skill、custom_style、duration、mute_voice、negative_prompt、script、seed、skill_preset、style、style_preset、reference_image_urls、reference_videos、first_image_url、last_image_url | {"model": "mu1-muse-video-50s", "prompt": "海边灯塔的清晨"} |
mu1-muse-video-60s | model(必填)、prompt(必填)、aspect_ratio、camera_movement、custom_skill、custom_style、duration、mute_voice、negative_prompt、script、seed、skill_preset、style、style_preset、reference_image_urls、reference_videos、first_image_url、last_image_url | {"model": "mu1-muse-video-60s", "prompt": "海边灯塔的清晨"} |
sd7-seedance-2.0-720p | model(必填)、prompt(必填)、aspect_ratio、duration、generate_audio、resolution、reference_image_urls、reference_videos、reference_audios | {"model": "sd7-seedance-2.0-720p", "prompt": "海边灯塔的清晨"} |
sd7-seedance-2.0-1080p | model(必填)、prompt(必填)、aspect_ratio、duration、generate_audio、resolution、reference_image_urls、reference_videos、reference_audios | {"model": "sd7-seedance-2.0-1080p", "prompt": "海边灯塔的清晨"} |
sd10-seedance-2.0-fast | model(必填)、prompt(必填)、aspect_ratio、duration、resolution、reference_image_urls、reference_videos、reference_audios | {"model": "sd10-seedance-2.0-fast", "prompt": "海边灯塔的清晨"} |
sd16-seedance-2.5-4 | model(必填)、prompt(必填)、aspect_ratio、duration、generate_audio、resolution、reference_image_urls、reference_videos、reference_audios | {"model": "sd16-seedance-2.5-4", "prompt": "海边灯塔的清晨"} |
sd17-seedance-2.5-6 | model(必填)、prompt(必填)、aspect_ratio、duration、resolution、reference_image_urls、reference_videos、reference_audios | {"model": "sd17-seedance-2.5-6", "prompt": "海边灯塔的清晨"} |
sd21-seedance-2.5-3 | model(必填)、prompt(必填)、aspect_ratio、duration(必填)、resolution(必填)、reference_image_urls、reference_videos、reference_audios、first_image_url、last_image_url | {"model": "sd21-seedance-2.5-3", "duration": 5, "resolution": "720p", "prompt": "海边灯塔的清晨"} |
sd23-seedance-2.5 | model(必填)、prompt(必填)、aspect_ratio(必填)、duration(必填)、resolution、reference_image_urls | {"model": "sd23-seedance-2.5", "aspect_ratio": "16:9", "duration": 5, "prompt": "海边灯塔的清晨"} |
sd23-seedance-2.5-pro | model(必填)、prompt(必填)、aspect_ratio(必填)、duration(必填)、resolution、reference_image_urls、reference_audios | {"model": "sd23-seedance-2.5-pro", "aspect_ratio": "16:9", "duration": 5, "prompt": "海边灯塔的清晨"} |
sd26-seedance-2.5 | model(必填)、prompt(必填)、aspect_ratio、duration、resolution、reference_image_urls、reference_videos、reference_audios | {"model": "sd26-seedance-2.5", "prompt": "海边灯塔的清晨"} |
sd26-seedance-2.5-flash | model(必填)、prompt(必填)、aspect_ratio、duration、resolution、reference_image_urls、reference_videos、reference_audios | {"model": "sd26-seedance-2.5-flash", "prompt": "海边灯塔的清晨"} |
wan8-wan3.0 | model(必填)、prompt(必填)、aspect_ratio(必填)、duration(必填)、resolution、reference_image_urls、reference_videos、reference_audios、first_image_url、last_image_url | {"model": "wan8-wan3.0", "aspect_ratio": "16:9", "duration": 5, "prompt": "海边灯塔的清晨"} |
wan8-wan3.0-2 | model(必填)、prompt(必填)、aspect_ratio(必填)、duration(必填)、resolution、reference_image_urls、reference_videos、reference_audios、first_image_url、last_image_url | {"model": "wan8-wan3.0-2", "aspect_ratio": "16:9", "duration": 5, "prompt": "海边灯塔的清晨"} |
3D 生成模型(公用入口)
tripo3d-p1、tripo3d-p2、tripo3d-v3.1
提交入口为 POST /v1/3d/generations,轮询入口为 GET /v1/3d/generations/{id}。返回对象为 threed.generation(任务 ID 形如 task_3d_...,状态为 queued / in_progress / completed / failed),完成后 data[].url 返回 15 分钟有效的本站签名下载链接(免 API Key 下载 GLB/FBX,过期可重新查询原单)。客户端重试请保留并回传 Idempotency-Key 请求头以确保同键不重复扣费。三款均支持文生、图生与多视图生成:tripo3d-p1 可限制面数,tripo3d-p2 可输出四边面,tripo3d-v3.1 支持几何质量、四边面与部件拆分;价格见本站价格页。
{
"model": "tripo3d-v3.1",
"prompt": "海边白色灯塔的精细三维模型"
}
视频转视频(公用调用名)
omni-v2v、omni-v2v-no-water
入口为 POST /v1/videos(参考查询路径 GET /v1/videos/{task_id})。支持 prompt、aspect_ratio、duration(4–15)、reference_image_urls(最多 5 个)与 reference_videos(最多 2 个)。价格见本站价格页。
{
"model": "omni-v2v",
"prompt": "海边灯塔的清晨",
"reference_image_urls": [
"https://example.com/reference.png"
]
}
Seedream 5.0 Lite
doubao-seedream-5-0-lite
支持 POST /v1/images/generations 与 POST /v1/images/edits(参考查询路径 GET /v1/images/generations/{task_id}、GET /v1/images/edits/{task_id}),可选 n(1)、size、response_format(url / b64_json)、async、images(最多 1 张)。价格见本站价格页。
{
"model": "doubao-seedream-5-0-lite",
"prompt": "海边灯塔的清晨"
}
可灵视频与动作迁移
POST /v1/videos 提交,再用 GET /v1/videos/{task_id} 轮询。通用 OpenAI Chat 客户端若只会调用 /v1/chat/completions 或 /v1/responses,不能直接调用可灵。先按目标选择精确模型:可灵 2.6 使用 kling-v2-6;可灵 3.0 Turbo 的 720P 与 1080P 是两个独立模型,分别使用 kling-3.0-turbo 与 kling-3.0-turbo-1080p;动作迁移使用独立的 kling-motion-control。不要用 resolution 参数切换 3.0 分辨率。
| 模型 ID | 规格 | 公开请求 |
|---|---|---|
kling-v2-6 | 可灵 2.6 | |
kling-3.0-turbo | 可灵 3.0 Turbo(固定 720P) | |
kling-3.0-turbo-1080p | 可灵 3.0 Turbo(固定 1080P) | |
kling-motion-control | 可灵动作迁移 |
价格请查看本站价格页。
| 能力 | 模型 | 公开请求字段 |
|---|---|---|
| 可灵 2.6 文生视频 | kling-v2-6 | model、prompt、seconds |
| 可灵 3.0 Turbo 720P 文生视频 | kling-3.0-turbo | model、prompt、seconds |
| 可灵 3.0 Turbo 1080P 文生视频 | kling-3.0-turbo-1080p | model、prompt、seconds |
| 人物动作迁移 | kling-motion-control | model、image_url、video_url、character_orientation、mode、seconds,可选 keep_original_sound |
kling-v2-6
curl -X POST "https://api.yuqitoken.cn/v1/videos" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v2-6",
"prompt": "对需要生成的画面和动作的明确描述",
"seconds": 5
}'
kling-3.0-turbo
curl -X POST "https://api.yuqitoken.cn/v1/videos" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-3.0-turbo",
"prompt": "对需要生成的画面和动作的明确描述",
"seconds": 5
}'
kling-3.0-turbo-1080p
curl -X POST "https://api.yuqitoken.cn/v1/videos" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-3.0-turbo-1080p",
"prompt": "对需要生成的画面和动作的明确描述",
"seconds": 5
}'
提交后只轮询返回的原任务 ID:GET /v1/videos/{task_id}。失败、取消、超时或结果未知时保留原任务 ID、错误信息和请求时间,不要自动补提第二单。
kling-motion-control
使用参考图片确定人物与画面,再迁移动作视频中的动作。seconds 是本站必填的任务时长字段,必须与本次采用的参考视频时长一致:至少 3 秒;character_orientation=image 时最多 10 秒,设为 video 时最多 30 秒。本站内部负责转换私有字段,客户只发送本页列出的公开字段。
curl -X POST "https://api.yuqitoken.cn/v1/videos" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-motion-control",
"image_url": "https://example.com/person.jpg",
"video_url": "https://example.com/motion.mp4",
"character_orientation": "image",
"mode": "std",
"seconds": 5,
"keep_original_sound": "no"
}'
curl "https://api.yuqitoken.cn/v1/videos/$TASK_ID" \
-H "Authorization: Bearer $API_KEY"
image_url 必须是公网可直接访问的 HTTPS 图片直链,只接受真实 MIME 为 image/jpeg 或 image/png 的 JPG/JPEG/PNG;HEIC、WEBP、AVIF 等必须先转换,不能只改后缀。URL 若需要登录、已过期、返回 HTML 或响应 MIME 不匹配,均应在提交前判为输入错误。
video_url 必须是公网可直接访问的参考视频直链;本站当前不公开推断其它视频格式字段。keep_original_sound 是可选字段,只允许 yes 或 no;当前公开稳定模式固定为 mode=std。图片应清晰包含完整上半身或全身,动作视频只能有一个清晰人物。
提交、轮询与终态响应
提交成功后保存响应中的顶层 id,它就是后续唯一允许轮询的 task_id。任务处于 queued、pending、processing、running 或 in_progress 时继续轮询;progress=0 不是失败。只在 completed 且结果中存在视频 URL 时判定成功;达到客户端安全上限后停单并保留原任务信息,不自动补单。
{
"id": "task_example_123",
"object": "generation.task",
"model": "kling-v2-6",
"status": "queued",
"progress": 0,
"created_at": 1787000000
}
{
"id": "task_example_123",
"object": "generation.task",
"model": "kling-v2-6",
"status": "processing",
"progress": 42,
"created_at": 1787000000
}
{
"id": "task_example_123",
"object": "generation.task",
"model": "kling-v2-6",
"status": "completed",
"progress": 100,
"completed_at": 1787000120,
"result": {
"type": "video",
"data": [{"url": "https://example.com/result.mp4", "format": "mp4"}]
}
}
{
"id": "task_example_123",
"object": "generation.task",
"model": "kling-v2-6",
"status": "failed",
"progress": 100,
"error": {"code": "generation_failed", "message": "具体失败原因"}
}
HTTP 401 表示当前站点 API Key 无效;HTTP 402/429 表示余额或限额;HTTP 503 表示服务暂时不可用。客户端不得把这些错误统一改写成“模型服务额度不足”,应保留 HTTP 状态、error.code、error.message 与 Request ID。
四个公开模型都按请求中的真实 seconds 计费,公开每秒价格见上表,实际最终扣费以控制台账单/使用记录为准。失败不等于自动退款;在原 task_id 的终态、视频 URL 和最终账单未核清前,不得自动补单,也不得用静态价格反推实际扣费。
Grok 视频五个规格
两站使用同一套客户接口。1.0 提供 grok-video-1.0-480p、grok-video-1.0-720p;1.5 提供 grok-video-1.5-480p、grok-video-1.5-720p、grok-video-1.5-1080p。分辨率由完整模型名确定;基础名与 grok-video-1.0-1080p 不属于公开型号。
curl -X POST "https://api.yuqitoken.cn/v1/videos" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"grok-video-1.5-720p","prompt":"一只纸飞机穿过晴朗的城市上空","seconds":5}'
curl "https://api.yuqitoken.cn/v1/videos/$TASK_ID" \
-H "Authorization: Bearer $API_KEY"
提交后保存响应顶层 id,只查询这个任务。queued、pending、processing、running、in_progress 继续等待;只有 completed 且存在可访问的视频 URL 才算成功。progress=100、HTTP 200 和任务 ID 都不能单独作为成功依据。失败或结果未知时保留原任务 ID、请求时间和错误信息,不自动提交第二单。按 seconds 计费,查询不重复计费;不要传 duration 或 resolution。
模型接口与计费说明
以下为本站当前在售型号与标准额度价格,不是人民币结算金额。未执行付费生成验证。组倍率以控制台和最终账单为准。
doubao-seedream-5-0-flash
接口:POST /v1/images/generations; POST /v1/images/edits;模式:sync;计费单位:张。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 doubao-seedream-5-0-flash。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
n | 否 | { "description": "生成张数。最小 1。最大 10。", "type": "integer", "minimum": 1, "maximum": 10 } |
size | 否 | { "description": "画面比例或 WIDTHxHEIGHT 尺寸。推荐值:1:1 / 3:2 / 2:3 / 4:3 / 3:4 / 16:9 / 9:16 / 21:9;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "1:1", "3:2", "2:3", "4:3", "3:4", "16:9", "9:16", "21:9" ] } |
response_format | 否 | { "description": "url 返回结果地址,b64_json 返回 Base64。", "type": "string", "enum": [ "url", "b64_json" ] } |
images | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 10 个。", "type": "array", "maxItems": 10 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 当前只说明同步调用。异步任务查询尚未取得本站完整适配证据,请勿传 async=true。
curl --max-time 600 https://api.yuqitoken.cn/v1/images/generations \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "doubao-seedream-5-0-flash", "prompt": "温暖的午后,阳光洒在窗台上。", "n": 1, "response_format": "url"}'
结果:data[].url or data[].b64_json。
doubao-seedream-5-0-pro
接口:POST /v1/images/generations; POST /v1/images/edits;模式:sync;计费单位:张。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 doubao-seedream-5-0-pro。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
n | 否 | { "description": "生成张数。最小 1。最大 1。", "type": "integer", "minimum": 1, "maximum": 1 } |
size | 否 | { "description": "画面比例或 WIDTHxHEIGHT 尺寸。推荐值:1:1 / 4:3 / 3:4 / 16:9 / 9:16 / 3:2 / 2:3 / 21:9;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3", "21:9" ] } |
output_format | 否 | { "description": "输出图片格式。支持值:jpeg / png。无法识别的值按未传处理。", "type": "string", "enum": [ "jpeg", "png" ] } |
response_format | 否 | { "description": "url 返回结果地址,b64_json 返回 Base64。", "type": "string", "enum": [ "url", "b64_json" ] } |
images | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 10 个。", "type": "array", "maxItems": 10 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 当前只说明同步调用。异步任务查询尚未取得本站完整适配证据,请勿传 async=true。
curl --max-time 600 https://api.yuqitoken.cn/v1/images/generations \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "doubao-seedream-5-0-pro", "prompt": "温暖的午后,阳光洒在窗台上。", "n": 1, "response_format": "url"}'
结果:data[].url or data[].b64_json。
gemini-3.8-flash
接口:POST /v1/chat/completions;模式:sync, stream;计费单位:Token。
| 计费项 |
|---|
| 输入 |
| 输出 |
| 缓存输入 |
| 创建缓存 |
| 音频输入 |
| 音频输出 |
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "请求使用本页公共名。", "type": "string", "enum": [ "gemini-3.8-flash" ] } |
messages | 是 | { "description": "消息数组。content 可以是字符串,也可以是文本与附件组成的数组。", "type": "array", "items": { "type": "object" } } |
stream | 否 | { "description": "是否流式返回。false 时一次返回完整回复;true 时按 SSE 增量推送。", "type": "boolean", "default": false } |
temperature | 否 | { "description": "采样温度。", "type": "number" } |
max_tokens | 否 | { "description": "最大输出 token。", "type": "integer" } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 本页仅说明 Chat Completions 文字与 SSE;不承诺未核的音频对话兼容口或原生 Gemini 入口。
- 文字按实际 usage 分量计费;不把倍率当成每次价格,输入、输出、缓存及组别以实时价格页和账单为准。
- 每100万Token金额按实际usage分量计费;缓存/音频分量只在实际支持并产生该usage时适用,不代表开放新的音频对话接口。
curl --max-time 600 https://api.yuqitoken.cn/v1/chat/completions \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "gemini-3.8-flash", "messages": [{"role": "user", "content": "用一句话介绍杭州"}]}'
结果:choices[].message.content; SSE choices[].delta.content, complete frame before success。
gemini-3.8-flash-high
接口:POST /v1/chat/completions;模式:sync, stream;计费单位:Token。
| 计费项 |
|---|
| 输入 |
| 输出 |
| 缓存输入 |
| 创建缓存 |
| 音频输入 |
| 音频输出 |
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "请求使用本页公共名。", "type": "string", "enum": [ "gemini-3.8-flash-high" ] } |
messages | 是 | { "description": "消息数组。content 可以是字符串,也可以是文本与附件组成的数组。", "type": "array", "items": { "type": "object" } } |
stream | 否 | { "description": "是否流式返回。false 时一次返回完整回复;true 时按 SSE 增量推送。", "type": "boolean", "default": false } |
temperature | 否 | { "description": "采样温度。", "type": "number" } |
max_tokens | 否 | { "description": "最大输出 token。", "type": "integer" } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 本页仅说明 Chat Completions 文字与 SSE;不承诺未核的音频对话兼容口或原生 Gemini 入口。
- 文字按实际 usage 分量计费;不把倍率当成每次价格,输入、输出、缓存及组别以实时价格页和账单为准。
- 每100万Token金额按实际usage分量计费;缓存/音频分量只在实际支持并产生该usage时适用,不代表开放新的音频对话接口。
curl --max-time 600 https://api.yuqitoken.cn/v1/chat/completions \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "gemini-3.8-flash-high", "messages": [{"role": "user", "content": "用一句话介绍杭州"}]}'
结果:choices[].message.content; SSE choices[].delta.content, complete frame before success。
gemini-4-argon
接口:POST /v1/chat/completions;模式:sync, stream;计费单位:Token。
| 计费项 |
|---|
| 输入 |
| 输出 |
| 缓存输入 |
| 创建缓存 |
| 音频输入 |
| 音频输出 |
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "请求使用本页公共名。", "type": "string", "enum": [ "gemini-4-argon" ] } |
messages | 是 | { "description": "消息数组。content 可以是字符串,也可以是文本与附件组成的数组。", "type": "array", "items": { "type": "object" } } |
stream | 否 | { "description": "是否流式返回。false 时一次返回完整回复;true 时按 SSE 增量推送。", "type": "boolean", "default": false } |
temperature | 否 | { "description": "采样温度。", "type": "number" } |
max_tokens | 否 | { "description": "最大输出 token。", "type": "integer" } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 本页仅说明 Chat Completions 文字与 SSE;不承诺未核的音频对话兼容口或原生 Gemini 入口。
- 文字按实际 usage 分量计费;不把倍率当成每次价格,输入、输出、缓存及组别以实时价格页和账单为准。
- 每100万Token金额按实际usage分量计费;缓存/音频分量只在实际支持并产生该usage时适用,不代表开放新的音频对话接口。
curl --max-time 600 https://api.yuqitoken.cn/v1/chat/completions \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "gemini-4-argon", "messages": [{"role": "user", "content": "用一句话介绍杭州"}]}'
结果:choices[].message.content; SSE choices[].delta.content, complete frame before success。
gemini-4-argon-high
接口:POST /v1/chat/completions;模式:sync, stream;计费单位:Token。
| 计费项 |
|---|
| 输入 |
| 输出 |
| 缓存输入 |
| 创建缓存 |
| 音频输入 |
| 音频输出 |
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "请求使用本页公共名。", "type": "string", "enum": [ "gemini-4-argon-high" ] } |
messages | 是 | { "description": "消息数组。content 可以是字符串,也可以是文本与附件组成的数组。", "type": "array", "items": { "type": "object" } } |
stream | 否 | { "description": "是否流式返回。false 时一次返回完整回复;true 时按 SSE 增量推送。", "type": "boolean", "default": false } |
temperature | 否 | { "description": "采样温度。", "type": "number" } |
max_tokens | 否 | { "description": "最大输出 token。", "type": "integer" } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 本页仅说明 Chat Completions 文字与 SSE;不承诺未核的音频对话兼容口或原生 Gemini 入口。
- 文字按实际 usage 分量计费;不把倍率当成每次价格,输入、输出、缓存及组别以实时价格页和账单为准。
- 每100万Token金额按实际usage分量计费;缓存/音频分量只在实际支持并产生该usage时适用,不代表开放新的音频对话接口。
curl --max-time 600 https://api.yuqitoken.cn/v1/chat/completions \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "gemini-4-argon-high", "messages": [{"role": "user", "content": "用一句话介绍杭州"}]}'
结果:choices[].message.content; SSE choices[].delta.content, complete frame before success。
gemini-stt
接口:POST /v1/audio/transcriptions;模式:sync;计费单位:分钟。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "请求使用本页公共名。", "type": "string", "enum": [ "gemini-stt" ] } |
file | 是 | { "description": "音频文件。multipart 字段名 file。", "type": "string" } |
language | 否 | { "description": "可选语种提示,例如 zh、en、ja。省略时自动识别。", "type": "string" } |
response_format | 否 | { "description": "json(默认)、text 或 verbose_json。", "type": "string", "enum": [ "json", "text", "verbose_json" ], "default": "json" } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 按音频分钟计费;同步 multipart 文件上传,不轮询。细分时长取整与最终扣额以实际账单为准。
curl --max-time 600 https://api.yuqitoken.cn/v1/audio/transcriptions \
-H "Authorization: Bearer $RELAY_API_KEY" \
-F "model=gemini-stt" \
-F "file=@audio.wav"
结果:text (or selected text response_format)。
gemini-tts
接口:POST /v1/audio/speech;模式:sync;计费单位:千字符。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 gemini-tts。", "type": "string" } |
input | 是 | { "description": "需要朗读的文本。", "type": "string" } |
voice | 否 | { "description": "朗读音色。推荐值:Capella / Ursa / Vega / Eclipse / Lyra / Orbit / Dipper / Nova / Pegasus;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "Capella", "Ursa", "Vega", "Eclipse", "Lyra", "Orbit", "Dipper", "Nova", "Pegasus" ] } |
response_format | 否 | { "description": "音频格式。推荐值:mp3 / opus / aac / flac / wav / pcm;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "mp3", "opus", "aac", "flac", "wav", "pcm" ] } |
speed | 否 | { "description": "朗读速度。最小 0.25。最大 4。", "type": "number", "minimum": 0.25, "maximum": 4 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 按千字符计费,不按输出音频时长;同步返回音频二进制,不轮询。字符取整与最终扣额以实际账单为准。
curl --max-time 600 https://api.yuqitoken.cn/v1/audio/speech \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"input": "你好,欢迎使用语音生成。", "model": "gemini-tts"}' --output speech.mp3
结果:audio binary。
grok-imagine-image
接口:POST /v1/images/generations; POST /v1/images/edits;模式:sync;计费单位:张。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 grok-imagine-image。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
n | 否 | { "description": "生成张数。最小 1。最大 1。", "type": "integer", "minimum": 1, "maximum": 1 } |
size | 否 | { "description": "画面比例或 WIDTHxHEIGHT 尺寸。推荐值:1024x1024 / 1024x1024 / 1792x1024 / 1792x1024 / 1024x1792 / 1024x1792 / 1:1 / 16:9 / 9:16 / 4:3 / 3:4 / 3:2 / 2:3 / 21:9;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "1024x1024", "1024x1024", "1792x1024", "1792x1024", "1024x1792", "1024x1792", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "21:9" ] } |
response_format | 否 | { "description": "url 返回结果地址,b64_json 返回 Base64。", "type": "string", "enum": [ "url", "b64_json" ] } |
images | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 8 个。", "type": "array", "maxItems": 8 } |
mask | 否 | { "description": "编辑请求的蒙版 HTTPS URL,最多 1 张。", "type": "string", "maxItems": 1 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 当前只说明同步调用。异步任务查询尚未取得本站完整适配证据,请勿传 async=true。
curl --max-time 600 https://api.yuqitoken.cn/v1/images/generations \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "grok-imagine-image", "prompt": "温暖的午后,阳光洒在窗台上。", "n": 1, "response_format": "url"}'
结果:data[].url or data[].b64_json。
grok-imagine-image-2.0
接口:POST /v1/images/generations; POST /v1/images/edits;模式:sync;计费单位:张。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 grok-imagine-image-2.0。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
n | 否 | { "description": "生成张数。最小 1。最大 1。", "type": "integer", "minimum": 1, "maximum": 1 } |
size | 否 | { "description": "画面比例或 WIDTHxHEIGHT 尺寸。推荐值:1024x1024 / 1024x1024 / 1792x1024 / 1792x1024 / 1024x1792 / 1024x1792 / 1:1 / 16:9 / 9:16 / 4:3 / 3:4 / 3:2 / 2:3 / 21:9;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "1024x1024", "1024x1024", "1792x1024", "1792x1024", "1024x1792", "1024x1792", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "21:9" ] } |
response_format | 否 | { "description": "url 返回结果地址,b64_json 返回 Base64。", "type": "string", "enum": [ "url", "b64_json" ] } |
images | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 8 个。", "type": "array", "maxItems": 8 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 当前只说明同步调用。异步任务查询尚未取得本站完整适配证据,请勿传 async=true。
- 不发送 mask;本站当前图片参数元数据未开放蒙版。
curl --max-time 600 https://api.yuqitoken.cn/v1/images/generations \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "grok-imagine-image-2.0", "prompt": "温暖的午后,阳光洒在窗台上。", "n": 1, "response_format": "url"}'
结果:data[].url or data[].b64_json。
lyria-3-pro
接口:POST /v1/music; GET /v1/music/{task_id};模式:async;计费单位:次。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 lyria-3-pro。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。最少 1 字符。最多 10000 字符。", "type": "string", "minLength": 1, "maxLength": 10000 } |
title | 否 | { "description": "曲名。最多 160 字符。", "type": "string", "maxLength": 160 } |
lyrics | 否 | { "description": "歌词。与提示词分开填写。最多 20000 字符。", "type": "string", "maxLength": 20000 } |
instrumental | 否 | { "description": "是否生成纯音乐。", "type": "boolean" } |
seed | 否 | { "description": "随机种子。最小 0。最大 2147483647。", "type": "integer", "minimum": 0, "maximum": 2147483647 } |
duration | 否 | { "role": "targetDuration", "description": "音乐时长,单位秒。最小 5。最大 300。", "type": "integer", "minimum": 5, "maximum": 300 } |
bpm | 否 | { "description": "节奏,每分钟节拍数。最小 30。最大 300。", "type": "integer", "minimum": 30, "maximum": 300 } |
audio_format | 否 | { "description": "音频格式。支持值:mp3 / wav / m4a。", "type": "string", "enum": [ "mp3", "wav", "m4a" ] } |
n | 否 | { "description": "生成数量。最小 1。最大 1。", "type": "integer", "minimum": 1, "maximum": 1 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- n 只能为 1;duration/BPM/歌词是生成提示,不能保证成片长度或节拍严格相同。
- music_url 是数组;下载结果地址不携带 API 令牌。
- 请求的时长字段:每次时长范围 5–300 秒;未公开默认秒数,请显式传 duration。按次计费;时长参数不代表改为按秒计费。长度提示不保证精确裁切;实际成品限制见使用说明。
- 适合用途|带歌词或纯器乐整曲创作;一次 1 首;成片最长约 184 秒;支持歌词、标题、BPM 与种子。
- 使用注意|duration 是长度提示,不代表可生成 300 秒;输出 MP3 / WAV / M4A;instrumental 开启后忽略歌词;任务提交后轮询。
curl --max-time 600 https://api.yuqitoken.cn/v1/music \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "lyria-3-pro", "prompt": "温暖的午后,阳光洒在窗台上。", "duration": 5}'
结果:music_url[]。
原任务轮询:{
"method": "GET",
"path": "/v1/music/{task_id}",
"auth": "same original Bearer token",
"task_id_jsonpath": "$.id",
"queued": [
"queued"
],
"running": [
"in_progress"
],
"success": [
"completed"
],
"failure": [
"failed"
],
"success_requires": "terminal completed plus usable result",
"interval_seconds": [
5,
10
],
"deadline_seconds": 1800,
"unknown": "preserve original id, stop blind retries, never create another POST"
}
。创建响应读取顶层id;只有completed加真实结果才成功,未知结果不得重提生成。
lyria-3.5
接口:POST /v1/music; GET /v1/music/{task_id};模式:async;计费单位:次。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 lyria-3.5。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。最少 1 字符。最多 10000 字符。", "type": "string", "minLength": 1, "maxLength": 10000 } |
title | 否 | { "description": "曲名。最多 160 字符。", "type": "string", "maxLength": 160 } |
lyrics | 否 | { "description": "歌词。与提示词分开填写。最多 20000 字符。", "type": "string", "maxLength": 20000 } |
instrumental | 否 | { "description": "是否生成纯音乐。", "type": "boolean" } |
seed | 否 | { "description": "随机种子。最小 0。最大 2147483647。", "type": "integer", "minimum": 0, "maximum": 2147483647 } |
duration | 否 | { "role": "targetDuration", "description": "音乐时长,单位秒。最小 5。最大 300。", "type": "integer", "minimum": 5, "maximum": 300 } |
bpm | 否 | { "description": "节奏,每分钟节拍数。最小 30。最大 300。", "type": "integer", "minimum": 30, "maximum": 300 } |
audio_format | 否 | { "description": "音频格式。支持值:mp3 / wav / m4a。", "type": "string", "enum": [ "mp3", "wav", "m4a" ] } |
n | 否 | { "description": "生成数量。最小 1。最大 1。", "type": "integer", "minimum": 1, "maximum": 1 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- n 只能为 1;duration/BPM/歌词是生成提示,不能保证成片长度或节拍严格相同。
- music_url 是数组;下载结果地址不携带 API 令牌。
- 请求的时长字段:每次时长范围 5–300 秒;未公开默认秒数,请显式传 duration。按次计费;时长参数不代表改为按秒计费。长度提示不保证精确裁切;实际成品限制见使用说明。
- 适合用途|带歌词或纯器乐整曲创作;一次 1 首;支持歌词、标题、BPM 与种子;输出 MP3 / WAV / M4A。
- 使用注意|duration 是长度提示,不保证精确裁切或补静音;生成约数分钟的整曲;instrumental 开启后忽略歌词;任务提交后轮询。
curl --max-time 600 https://api.yuqitoken.cn/v1/music \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "lyria-3.5", "prompt": "温暖的午后,阳光洒在窗台上。", "duration": 5}'
结果:music_url[]。
原任务轮询:{
"method": "GET",
"path": "/v1/music/{task_id}",
"auth": "same original Bearer token",
"task_id_jsonpath": "$.id",
"queued": [
"queued"
],
"running": [
"in_progress"
],
"success": [
"completed"
],
"failure": [
"failed"
],
"success_requires": "terminal completed plus usable result",
"interval_seconds": [
5,
10
],
"deadline_seconds": 1800,
"unknown": "preserve original id, stop blind retries, never create another POST"
}
。创建响应读取顶层id;只有completed加真实结果才成功,未知结果不得重提生成。
midjourney-1k
接口:POST /v1/images/generations; GET /v1/images/generations/{task_id}; POST /v1/images/edits; GET /v1/images/edits/{task_id};模式:sync, async;计费单位:次。
| 计费档 | 默认时长与合计 |
|---|---|
| relax | 按所选参数与该档单价计费 |
| fast | 按所选参数与该档单价计费 |
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 midjourney-1k。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
n | 否 | { "description": "生成张数。最小 1。最大 1。", "type": "integer", "minimum": 1, "maximum": 1 } |
size | 否 | { "description": "画面比例或 WIDTHxHEIGHT 尺寸。固定 1K 档位,不能请求其他分辨率档位。推荐值:1:2 / 1:2 / 6:11 / 6:11 / 9:16 / 9:16 / 2:3 / 2:3 / 3:4 / 3:4 / 4:5 / 4:5 / 5:6 / 5:6 / 1:1 / 1:1 / 2:1 / 2:1 / 11:6 / 11:6 / 16:9 / 16:9 / 3:2 / 3:2 / 4:3 / 4:3 / 5:4 / 5:4 / 6:5 / 6:5;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "1:2", "1:2", "6:11", "6:11", "9:16", "9:16", "2:3", "2:3", "3:4", "3:4", "4:5", "4:5", "5:6", "5:6", "1:1", "1:1", "2:1", "2:1", "11:6", "11:6", "16:9", "16:9", "3:2", "3:2", "4:3", "4:3", "5:4", "5:4", "6:5", "6:5" ] } |
speed | 否 | { "description": "生成速度。支持值:relax / fast。无法识别的值按未传处理。", "type": "string", "enum": [ "relax", "fast" ], "suggestedDefault": "relax" } |
reference | 否 | { "description": "参考方式。支持值:image / style / edit / moodboard / editor。无法识别的值按未传处理。", "type": "string", "enum": [ "image", "style", "edit", "moodboard", "editor" ], "suggestedDefault": "image" } |
response_format | 否 | { "description": "url 返回结果地址,b64_json 返回 Base64。", "type": "string", "enum": [ "url", "b64_json" ] } |
async | 否 | { "description": "true 创建异步任务;省略或 false 为同步等待。", "type": "boolean" } |
images | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 4 个。", "type": "array", "maxItems": 4 } |
mask | 否 | { "description": "编辑请求的蒙版 HTTPS URL,最多 1 张。", "type": "string", "maxItems": 1 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- n 默认且只能为 1;一次任务可能返回多张结果,仍按一次任务计费。
- speed=fast 或 prompt 含 --fast 使用 fast 档;否则 relax。无效 speed/reference 按未传处理。
- 同步等待最多约 5 分钟;HTTP 202 带原任务 id 时,按原创建路径查询,不再提交。
- mask 仅编辑端点接受,生成端点不发送;参考图最多 4 张 HTTPS URL。
curl --max-time 600 https://api.yuqitoken.cn/v1/images/generations \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "midjourney-1k", "prompt": "温暖的午后,阳光洒在窗台上。", "n": 1, "response_format": "url", "async": true}'
结果:data[].url or data[].b64_json。
原任务轮询:{
"method": "GET",
"path": "/v1/images/generations/{task_id}",
"auth": "same original Bearer token",
"task_id_jsonpath": "$.id",
"queued": [
"queued"
],
"running": [
"in_progress"
],
"success": [
"completed"
],
"failure": [
"failed"
],
"success_requires": "terminal completed plus usable result",
"interval_seconds": [
5,
10
],
"deadline_seconds": 1800,
"unknown": "preserve original id, stop blind retries, never create another POST"
}
。创建响应读取顶层id;只有completed加真实结果才成功,未知结果不得重提生成。
midjourney-2k
接口:POST /v1/images/generations; GET /v1/images/generations/{task_id}; POST /v1/images/edits; GET /v1/images/edits/{task_id};模式:sync, async;计费单位:次。
| 计费档 | 默认时长与合计 |
|---|---|
| relax | 按所选参数与该档单价计费 |
| fast | 按所选参数与该档单价计费 |
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 midjourney-2k。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
n | 否 | { "description": "生成张数。最小 1。最大 1。", "type": "integer", "minimum": 1, "maximum": 1 } |
size | 否 | { "description": "画面比例或 WIDTHxHEIGHT 尺寸。固定 2K 档位,不能请求其他分辨率档位。推荐值:1:2 / 1:2 / 6:11 / 6:11 / 9:16 / 9:16 / 2:3 / 2:3 / 3:4 / 3:4 / 4:5 / 4:5 / 5:6 / 5:6 / 1:1 / 1:1 / 2:1 / 2:1 / 11:6 / 11:6 / 16:9 / 16:9 / 3:2 / 3:2 / 4:3 / 4:3 / 5:4 / 5:4 / 6:5 / 6:5;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "1:2", "1:2", "6:11", "6:11", "9:16", "9:16", "2:3", "2:3", "3:4", "3:4", "4:5", "4:5", "5:6", "5:6", "1:1", "1:1", "2:1", "2:1", "11:6", "11:6", "16:9", "16:9", "3:2", "3:2", "4:3", "4:3", "5:4", "5:4", "6:5", "6:5" ] } |
speed | 否 | { "description": "生成速度。支持值:relax / fast。无法识别的值按未传处理。", "type": "string", "enum": [ "relax", "fast" ], "suggestedDefault": "relax" } |
reference | 否 | { "description": "参考方式。支持值:image / style / edit / moodboard / editor。无法识别的值按未传处理。", "type": "string", "enum": [ "image", "style", "edit", "moodboard", "editor" ], "suggestedDefault": "image" } |
response_format | 否 | { "description": "url 返回结果地址,b64_json 返回 Base64。", "type": "string", "enum": [ "url", "b64_json" ] } |
async | 否 | { "description": "true 创建异步任务;省略或 false 为同步等待。", "type": "boolean" } |
images | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 4 个。", "type": "array", "maxItems": 4 } |
mask | 否 | { "description": "编辑请求的蒙版 HTTPS URL,最多 1 张。", "type": "string", "maxItems": 1 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- n 默认且只能为 1;一次任务可能返回多张结果,仍按一次任务计费。
- speed=fast 或 prompt 含 --fast 使用 fast 档;否则 relax。无效 speed/reference 按未传处理。
- 同步等待最多约 5 分钟;HTTP 202 带原任务 id 时,按原创建路径查询,不再提交。
- mask 仅编辑端点接受,生成端点不发送;参考图最多 4 张 HTTPS URL。
curl --max-time 600 https://api.yuqitoken.cn/v1/images/generations \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "midjourney-2k", "prompt": "温暖的午后,阳光洒在窗台上。", "n": 1, "response_format": "url", "async": true}'
结果:data[].url or data[].b64_json。
原任务轮询:{
"method": "GET",
"path": "/v1/images/generations/{task_id}",
"auth": "same original Bearer token",
"task_id_jsonpath": "$.id",
"queued": [
"queued"
],
"running": [
"in_progress"
],
"success": [
"completed"
],
"failure": [
"failed"
],
"success_requires": "terminal completed plus usable result",
"interval_seconds": [
5,
10
],
"deadline_seconds": 1800,
"unknown": "preserve original id, stop blind retries, never create another POST"
}
。创建响应读取顶层id;只有completed加真实结果才成功,未知结果不得重提生成。
mm3-minimax-h3-2k
接口:POST /v1/videos; GET /v1/videos/{task_id};模式:async;计费单位:次。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 mm3-minimax-h3-2k。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
duration | 否 | { "role": "duration", "description": "视频时长,单位秒。最小 15。最大 15。", "type": "integer", "minimum": 15, "maximum": 15, "suggestedDefault": 15, "default": 15 } |
aspect_ratio | 否 | { "description": "画面比例。推荐值:1:1 / 16:9 / 9:16;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "1:1", "16:9", "9:16" ] } |
resolution | 否 | { "role": "resolution", "description": "输出分辨率。推荐值:2k;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "2k" ], "suggestedDefault": "2k" } |
reference_image_urls | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 9 个。", "type": "array", "maxItems": 9 } |
reference_videos | 否 | { "role": "referenceVideo", "description": "参考视频 HTTPS URL 数组,最多 3 个。", "type": "array", "maxItems": 3 } |
reference_audios | 否 | { "role": "referenceAudio", "description": "参考音频 HTTPS URL 数组,最多 3 个。", "type": "array", "maxItems": 3 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 按次,不乘秒数或像素倍率;n 只允许 1(可省略)。不支持 seed、首尾帧或 Remix。
- 参考视频优先传 {"url":"https://example.com/ref.mp4","duration":5.2};duration 是素材实际秒数,不是生成时长。
- 每次 15 秒;默认 15 秒。按次计费;时长参数不代表改为按秒计费。
- 适合用途|固定 2K 多模态短片;固定 15 秒;2K;最多 9 张参考图 / 3 段参考音频 / 3 段参考视频。
- 使用注意|不卡脸;参考视频每段须提供时长;不接首尾帧。
curl --max-time 600 https://api.yuqitoken.cn/v1/videos \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "mm3-minimax-h3-2k", "prompt": "温暖的午后,阳光洒在窗台上。", "duration": 15, "resolution": "2k"}'
结果:video_url or data[0].url。
原任务轮询:{
"method": "GET",
"path": "/v1/videos/{task_id}",
"auth": "same original Bearer token",
"task_id_jsonpath": "$.id",
"queued": [
"queued"
],
"running": [
"in_progress"
],
"success": [
"completed"
],
"failure": [
"failed"
],
"success_requires": "terminal completed plus usable result",
"interval_seconds": [
5,
10
],
"deadline_seconds": 1800,
"unknown": "preserve original id, stop blind retries, never create another POST"
}
。创建响应读取顶层id;只有completed加真实结果才成功,未知结果不得重提生成。
mm4-minimax-h3-2k
接口:POST /v1/videos; GET /v1/videos/{task_id};模式:async;计费单位:次。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 mm4-minimax-h3-2k。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
duration | 否 | { "role": "duration", "description": "视频时长,单位秒。最小 5。最大 15。", "type": "integer", "minimum": 5, "maximum": 15, "suggestedDefault": 5, "default": 5 } |
aspect_ratio | 否 | { "description": "画面比例。推荐值:21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "21:9", "16:9", "4:3", "1:1", "3:4", "9:16" ] } |
resolution | 否 | { "role": "resolution", "description": "输出分辨率。推荐值:2K;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "2K" ], "suggestedDefault": "2K" } |
reference_image_urls | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 9 个。", "type": "array", "maxItems": 9 } |
reference_videos | 否 | { "role": "referenceVideo", "description": "参考视频 HTTPS URL 数组,最多 3 个。", "type": "array", "maxItems": 3 } |
reference_audios | 否 | { "role": "referenceAudio", "description": "参考音频 HTTPS URL 数组,最多 3 个。", "type": "array", "maxItems": 3 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 按次,不乘秒数或像素倍率;n 只允许 1(可省略)。不支持 seed、首尾帧或 Remix。
- 参考视频优先传 {"url":"https://example.com/ref.mp4","duration":5.2};duration 是素材实际秒数,不是生成时长。
- 每次时长范围 5–15 秒;默认 5 秒。按次计费;时长参数不代表改为按秒计费。
- 适合用途|MiniMax 2K 多模态;5–15 秒;最多 9 张参考图 / 3 段参考音频 / 3 段参考视频。
- 使用注意|固定 2K;不接首尾帧。
curl --max-time 600 https://api.yuqitoken.cn/v1/videos \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "mm4-minimax-h3-2k", "prompt": "温暖的午后,阳光洒在窗台上。", "duration": 5, "resolution": "2K"}'
结果:video_url or data[0].url。
原任务轮询:{
"method": "GET",
"path": "/v1/videos/{task_id}",
"auth": "same original Bearer token",
"task_id_jsonpath": "$.id",
"queued": [
"queued"
],
"running": [
"in_progress"
],
"success": [
"completed"
],
"failure": [
"failed"
],
"success_requires": "terminal completed plus usable result",
"interval_seconds": [
5,
10
],
"deadline_seconds": 1800,
"unknown": "preserve original id, stop blind retries, never create another POST"
}
。创建响应读取顶层id;只有completed加真实结果才成功,未知结果不得重提生成。
sd16-seedance-2.0
接口:POST /v1/videos; GET /v1/videos/{task_id};模式:async;计费单位:次。
| 计费档 | 默认时长与合计 |
|---|---|
| 4k | 按所选参数与该档单价计费 |
| 1080p | 按所选参数与该档单价计费 |
| 720p | 按所选参数与该档单价计费 |
| 480p | 按所选参数与该档单价计费 |
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 sd16-seedance-2.0。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
duration | 否 | { "role": "duration", "description": "视频时长,单位秒。最小 4。最大 15。", "type": "integer", "minimum": 4, "maximum": 15, "suggestedDefault": 5, "default": 5 } |
aspect_ratio | 否 | { "description": "画面比例。推荐值:16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 21:9;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "16:9", "9:16", "1:1", "4:3", "3:4", "21:9" ] } |
resolution | 否 | { "role": "resolution", "description": "输出分辨率。推荐值:480p / 720p / 1080p / 4k;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "480p", "720p", "1080p", "4k" ], "suggestedDefault": "480p" } |
generate_audio | 否 | { "description": "是否生成音频。", "type": "boolean" } |
reference_image_urls | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 9 个。", "type": "array", "maxItems": 9 } |
reference_videos | 否 | { "role": "referenceVideo", "description": "参考视频 HTTPS URL 数组,最多 3 个。", "type": "array", "maxItems": 3 } |
reference_audios | 否 | { "role": "referenceAudio", "description": "参考音频 HTTPS URL 数组,最多 3 个。", "type": "array", "maxItems": 3 } |
first_image_url | 否 | { "role": "firstFrame", "description": "首帧图片 HTTPS URL。", "type": "string" } |
last_image_url | 否 | { "role": "lastFrame", "description": "尾帧图片 HTTPS URL。", "type": "string" } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 按一次任务和分辨率分档计费,不在档价上再乘 duration。只发送本型号字段;不同型号的素材与首尾帧限制不可混用。
- 每次时长范围 4–15 秒;默认 5 秒。按次计费;时长参数不代表改为按秒计费。
- 适合用途|高清多模态;4–15 秒;480p / 720p / 1080p / 4K;最多 9 张参考图 / 3 段参考音频 / 3 段参考视频。
- 使用注意|后台检查人脸,可能被拦截;首尾帧须成对。初始清晰度为 480p,高清档请主动指定。
curl --max-time 600 https://api.yuqitoken.cn/v1/videos \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "sd16-seedance-2.0", "prompt": "温暖的午后,阳光洒在窗台上。", "duration": 5, "resolution": "480p"}'
结果:video_url or data[0].url。
原任务轮询:{
"method": "GET",
"path": "/v1/videos/{task_id}",
"auth": "same original Bearer token",
"task_id_jsonpath": "$.id",
"queued": [
"queued"
],
"running": [
"in_progress"
],
"success": [
"completed"
],
"failure": [
"failed"
],
"success_requires": "terminal completed plus usable result",
"interval_seconds": [
5,
10
],
"deadline_seconds": 1800,
"unknown": "preserve original id, stop blind retries, never create another POST"
}
。创建响应读取顶层id;只有completed加真实结果才成功,未知结果不得重提生成。
sd16-seedance-2.0-fast
接口:POST /v1/videos; GET /v1/videos/{task_id};模式:async;计费单位:次。
| 计费档 | 默认时长与合计 |
|---|---|
| 720p | 按所选参数与该档单价计费 |
| 480p | 按所选参数与该档单价计费 |
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 sd16-seedance-2.0-fast。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
duration | 否 | { "role": "duration", "description": "视频时长,单位秒。最小 4。最大 15。", "type": "integer", "minimum": 4, "maximum": 15, "suggestedDefault": 5, "default": 5 } |
aspect_ratio | 否 | { "description": "画面比例。推荐值:16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 21:9;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "16:9", "9:16", "1:1", "4:3", "3:4", "21:9" ] } |
resolution | 否 | { "role": "resolution", "description": "输出分辨率。推荐值:480p / 720p;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "480p", "720p" ], "suggestedDefault": "480p" } |
generate_audio | 否 | { "description": "是否生成音频。", "type": "boolean" } |
reference_image_urls | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 9 个。", "type": "array", "maxItems": 9 } |
reference_videos | 否 | { "role": "referenceVideo", "description": "参考视频 HTTPS URL 数组,最多 3 个。", "type": "array", "maxItems": 3 } |
reference_audios | 否 | { "role": "referenceAudio", "description": "参考音频 HTTPS URL 数组,最多 3 个。", "type": "array", "maxItems": 3 } |
first_image_url | 否 | { "role": "firstFrame", "description": "首帧图片 HTTPS URL。", "type": "string" } |
last_image_url | 否 | { "role": "lastFrame", "description": "尾帧图片 HTTPS URL。", "type": "string" } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 按一次任务和分辨率分档计费,不在档价上再乘 duration。只发送本型号字段;不同型号的素材与首尾帧限制不可混用。
- 每次时长范围 4–15 秒;默认 5 秒。按次计费;时长参数不代表改为按秒计费。
- 适合用途|Fast 档多模态;4–15 秒;480p / 720p;最多 9 张参考图 / 3 段参考音频 / 3 段参考视频。
- 使用注意|后台检查人脸,可能被拦截;首尾帧须成对。初始清晰度为 480p,不提供 1080p / 4K 档。
curl --max-time 600 https://api.yuqitoken.cn/v1/videos \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "sd16-seedance-2.0-fast", "prompt": "温暖的午后,阳光洒在窗台上。", "duration": 5, "resolution": "480p"}'
结果:video_url or data[0].url。
原任务轮询:{
"method": "GET",
"path": "/v1/videos/{task_id}",
"auth": "same original Bearer token",
"task_id_jsonpath": "$.id",
"queued": [
"queued"
],
"running": [
"in_progress"
],
"success": [
"completed"
],
"failure": [
"failed"
],
"success_requires": "terminal completed plus usable result",
"interval_seconds": [
5,
10
],
"deadline_seconds": 1800,
"unknown": "preserve original id, stop blind retries, never create another POST"
}
。创建响应读取顶层id;只有completed加真实结果才成功,未知结果不得重提生成。
sd16-seedance-2.0-mini
接口:POST /v1/videos; GET /v1/videos/{task_id};模式:async;计费单位:次。
| 计费档 | 默认时长与合计 |
|---|---|
| 720p | 按所选参数与该档单价计费 |
| 480p | 按所选参数与该档单价计费 |
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 sd16-seedance-2.0-mini。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
duration | 否 | { "role": "duration", "description": "视频时长,单位秒。最小 4。最大 15。", "type": "integer", "minimum": 4, "maximum": 15, "suggestedDefault": 5, "default": 5 } |
aspect_ratio | 否 | { "description": "画面比例。推荐值:16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 21:9;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "16:9", "9:16", "1:1", "4:3", "3:4", "21:9" ] } |
resolution | 否 | { "role": "resolution", "description": "输出分辨率。推荐值:480p / 720p;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "480p", "720p" ], "suggestedDefault": "480p" } |
generate_audio | 否 | { "description": "是否生成音频。", "type": "boolean" } |
reference_image_urls | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 9 个。", "type": "array", "maxItems": 9 } |
reference_videos | 否 | { "role": "referenceVideo", "description": "参考视频 HTTPS URL 数组,最多 3 个。", "type": "array", "maxItems": 3 } |
reference_audios | 否 | { "role": "referenceAudio", "description": "参考音频 HTTPS URL 数组,最多 3 个。", "type": "array", "maxItems": 3 } |
first_image_url | 否 | { "role": "firstFrame", "description": "首帧图片 HTTPS URL。", "type": "string" } |
last_image_url | 否 | { "role": "lastFrame", "description": "尾帧图片 HTTPS URL。", "type": "string" } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 按一次任务和分辨率分档计费,不在档价上再乘 duration。只发送本型号字段;不同型号的素材与首尾帧限制不可混用。
- 每次时长范围 4–15 秒;默认 5 秒。按次计费;时长参数不代表改为按秒计费。
- 适合用途|Mini 档首尾帧;4–15 秒;480p / 720p;最多 9 张参考图 / 3 段参考音频 / 3 段参考视频。
- 使用注意|后台检查人脸,可能被拦截;首尾帧须成对。初始清晰度为 480p,不提供 1080p / 4K 档。
curl --max-time 600 https://api.yuqitoken.cn/v1/videos \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "sd16-seedance-2.0-mini", "prompt": "温暖的午后,阳光洒在窗台上。", "duration": 5, "resolution": "480p"}'
结果:video_url or data[0].url。
原任务轮询:{
"method": "GET",
"path": "/v1/videos/{task_id}",
"auth": "same original Bearer token",
"task_id_jsonpath": "$.id",
"queued": [
"queued"
],
"running": [
"in_progress"
],
"success": [
"completed"
],
"failure": [
"failed"
],
"success_requires": "terminal completed plus usable result",
"interval_seconds": [
5,
10
],
"deadline_seconds": 1800,
"unknown": "preserve original id, stop blind retries, never create another POST"
}
。创建响应读取顶层id;只有completed加真实结果才成功,未知结果不得重提生成。
sd17-seedance-2.0
接口:POST /v1/videos; GET /v1/videos/{task_id};模式:async;计费单位:次。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 sd17-seedance-2.0。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
duration | 否 | { "role": "duration", "description": "视频时长,单位秒。最小 5。最大 15。", "type": "integer", "minimum": 5, "maximum": 15, "suggestedDefault": 5, "default": 5 } |
aspect_ratio | 否 | { "description": "画面比例。推荐值:21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "21:9", "16:9", "4:3", "1:1", "3:4", "9:16" ] } |
resolution | 否 | { "role": "resolution", "description": "输出分辨率。推荐值:720P;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "720P" ], "suggestedDefault": "720P" } |
reference_image_urls | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 9 个。", "type": "array", "maxItems": 9 } |
reference_audios | 否 | { "role": "referenceAudio", "description": "参考音频 HTTPS URL 数组,最多 3 个。", "type": "array", "maxItems": 3 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 按一次任务和分辨率分档计费,不在档价上再乘 duration。只发送本型号字段;不同型号的素材与首尾帧限制不可混用。
- 每次时长范围 5–15 秒;默认 5 秒。按次计费;时长参数不代表改为按秒计费。
- 适合用途|人物短片;原生不卡脸;5–15 秒;720p;最多 9 张参考图 / 3 段参考音频。
- 使用注意|不接参考视频和首尾帧。
curl --max-time 600 https://api.yuqitoken.cn/v1/videos \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "sd17-seedance-2.0", "prompt": "温暖的午后,阳光洒在窗台上。", "duration": 5, "resolution": "720P"}'
结果:video_url or data[0].url。
原任务轮询:{
"method": "GET",
"path": "/v1/videos/{task_id}",
"auth": "same original Bearer token",
"task_id_jsonpath": "$.id",
"queued": [
"queued"
],
"running": [
"in_progress"
],
"success": [
"completed"
],
"failure": [
"failed"
],
"success_requires": "terminal completed plus usable result",
"interval_seconds": [
5,
10
],
"deadline_seconds": 1800,
"unknown": "preserve original id, stop blind retries, never create another POST"
}
。创建响应读取顶层id;只有completed加真实结果才成功,未知结果不得重提生成。
sd17-seedance-2.0-2
接口:POST /v1/videos; GET /v1/videos/{task_id};模式:async;计费单位:次。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 sd17-seedance-2.0-2。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
duration | 否 | { "role": "duration", "description": "视频时长,单位秒。最小 5。最大 15。", "type": "integer", "minimum": 5, "maximum": 15, "suggestedDefault": 5, "default": 5 } |
aspect_ratio | 否 | { "description": "画面比例。推荐值:21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "21:9", "16:9", "4:3", "1:1", "3:4", "9:16" ] } |
resolution | 否 | { "role": "resolution", "description": "输出分辨率。推荐值:720P;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "720P" ], "suggestedDefault": "720P" } |
reference_image_urls | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 9 个。", "type": "array", "maxItems": 9 } |
reference_audios | 否 | { "role": "referenceAudio", "description": "参考音频 HTTPS URL 数组,最多 3 个。", "type": "array", "maxItems": 3 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 按一次任务和分辨率分档计费,不在档价上再乘 duration。只发送本型号字段;不同型号的素材与首尾帧限制不可混用。
- 每次时长范围 5–15 秒;默认 5 秒。按次计费;时长参数不代表改为按秒计费。
- 适合用途|人物短片备选;原生不卡脸;5–15 秒;720p;最多 9 张参考图 / 3 段参考音频。
- 使用注意|不接参考视频和首尾帧;与基础款是独立线路,按实时价格和状态选择。
curl --max-time 600 https://api.yuqitoken.cn/v1/videos \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "sd17-seedance-2.0-2", "prompt": "温暖的午后,阳光洒在窗台上。", "duration": 5, "resolution": "720P"}'
结果:video_url or data[0].url。
原任务轮询:{
"method": "GET",
"path": "/v1/videos/{task_id}",
"auth": "same original Bearer token",
"task_id_jsonpath": "$.id",
"queued": [
"queued"
],
"running": [
"in_progress"
],
"success": [
"completed"
],
"failure": [
"failed"
],
"success_requires": "terminal completed plus usable result",
"interval_seconds": [
5,
10
],
"deadline_seconds": 1800,
"unknown": "preserve original id, stop blind retries, never create another POST"
}
。创建响应读取顶层id;只有completed加真实结果才成功,未知结果不得重提生成。
sd17-seedance-2.0-3
接口:POST /v1/videos; GET /v1/videos/{task_id};模式:async;计费单位:次。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 sd17-seedance-2.0-3。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
duration | 否 | { "role": "duration", "description": "视频时长,单位秒。最小 5。最大 15。", "type": "integer", "minimum": 5, "maximum": 15, "suggestedDefault": 5, "default": 5 } |
aspect_ratio | 否 | { "description": "画面比例。推荐值:21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "21:9", "16:9", "4:3", "1:1", "3:4", "9:16" ] } |
resolution | 否 | { "role": "resolution", "description": "输出分辨率。推荐值:720P;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "720P" ], "suggestedDefault": "720P" } |
reference_image_urls | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 9 个。", "type": "array", "maxItems": 9 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 按一次任务和分辨率分档计费,不在档价上再乘 duration。只发送本型号字段;不同型号的素材与首尾帧限制不可混用。
- 每次时长范围 5–15 秒;默认 5 秒。界面列出 5、10、15 秒。按次计费;时长参数不代表改为按秒计费。
- 适合用途|预算优先短片挂机;720p;5–15 秒,常用 5 / 10 / 15 秒;最多 9 张参考图。
- 使用注意|卡人脸;不接音频、视频和首尾帧,适合不赶交付的夜间批量任务。
curl --max-time 600 https://api.yuqitoken.cn/v1/videos \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "sd17-seedance-2.0-3", "prompt": "温暖的午后,阳光洒在窗台上。", "duration": 5, "resolution": "720P"}'
结果:video_url or data[0].url。
原任务轮询:{
"method": "GET",
"path": "/v1/videos/{task_id}",
"auth": "same original Bearer token",
"task_id_jsonpath": "$.id",
"queued": [
"queued"
],
"running": [
"in_progress"
],
"success": [
"completed"
],
"failure": [
"failed"
],
"success_requires": "terminal completed plus usable result",
"interval_seconds": [
5,
10
],
"deadline_seconds": 1800,
"unknown": "preserve original id, stop blind retries, never create another POST"
}
。创建响应读取顶层id;只有completed加真实结果才成功,未知结果不得重提生成。
sd17-seedance-2.5-2
接口:POST /v1/videos; GET /v1/videos/{task_id};模式:async;计费单位:次。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 sd17-seedance-2.5-2。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
duration | 否 | { "role": "duration", "description": "视频时长,单位秒。最小 10。最大 30。", "type": "integer", "minimum": 10, "maximum": 30, "suggestedDefault": 10, "default": 10 } |
aspect_ratio | 否 | { "description": "画面比例。推荐值:21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "21:9", "16:9", "4:3", "1:1", "3:4", "9:16" ] } |
resolution | 否 | { "role": "resolution", "description": "输出分辨率。推荐值:720P;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "720P" ], "suggestedDefault": "720P" } |
reference_image_urls | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 30 个。", "type": "array", "maxItems": 30 } |
reference_videos | 否 | { "role": "referenceVideo", "description": "参考视频 HTTPS URL 数组,最多 10 个。", "type": "array", "maxItems": 10 } |
reference_audios | 否 | { "role": "referenceAudio", "description": "参考音频 HTTPS URL 数组,最多 10 个。", "type": "array", "maxItems": 10 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 按一次任务和分辨率分档计费,不在档价上再乘 duration。只发送本型号字段;不同型号的素材与首尾帧限制不可混用。
- 每次时长范围 10–30 秒;默认 10 秒。按次计费;时长参数不代表改为按秒计费。
- 适合用途|高并发多模态;10–30 秒;720p;最多 30 张参考图 / 10 段参考音频 / 10 段参考视频。
- 使用注意|卡人脸;不接首尾帧。人物参考优先选原生不卡脸款。
curl --max-time 600 https://api.yuqitoken.cn/v1/videos \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "sd17-seedance-2.5-2", "prompt": "温暖的午后,阳光洒在窗台上。", "duration": 10, "resolution": "720P"}'
结果:video_url or data[0].url。
原任务轮询:{
"method": "GET",
"path": "/v1/videos/{task_id}",
"auth": "same original Bearer token",
"task_id_jsonpath": "$.id",
"queued": [
"queued"
],
"running": [
"in_progress"
],
"success": [
"completed"
],
"failure": [
"failed"
],
"success_requires": "terminal completed plus usable result",
"interval_seconds": [
5,
10
],
"deadline_seconds": 1800,
"unknown": "preserve original id, stop blind retries, never create another POST"
}
。创建响应读取顶层id;只有completed加真实结果才成功,未知结果不得重提生成。
seedream-5.0-pro-x
接口:POST /v1/images/generations; POST /v1/images/edits;模式:sync;计费单位:张。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 seedream-5.0-pro-x。", "type": "string" } |
prompt | 是 | { "description": "生成内容的描述。", "type": "string" } |
n | 否 | { "description": "生成张数。最小 1。最大 1。", "type": "integer", "minimum": 1, "maximum": 1 } |
size | 否 | { "description": "画面比例或 WIDTHxHEIGHT 尺寸。推荐值:1:1 / 4:3 / 3:4 / 16:9 / 9:16 / 3:2 / 2:3 / 21:9;推荐值不代表完整允许集合。", "type": "string", "suggestions": [ "1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3", "21:9" ] } |
response_format | 否 | { "description": "url 返回结果地址,b64_json 返回 Base64。", "type": "string", "enum": [ "url", "b64_json" ] } |
images | 否 | { "role": "referenceImage", "description": "参考图 HTTPS URL 数组,最多 10 个。", "type": "array", "maxItems": 10 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- 当前只说明同步调用。异步任务查询尚未取得本站完整适配证据,请勿传 async=true。
curl --max-time 600 https://api.yuqitoken.cn/v1/images/generations \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "seedream-5.0-pro-x", "prompt": "温暖的午后,阳光洒在窗台上。", "n": 1, "response_format": "url"}'
结果:data[].url or data[].b64_json。
suno
接口:POST /v1/music; GET /v1/music/{task_id};模式:async;计费单位:次。
价格请查看本站价格页。
价格见本站价格页。
| 字段 | 必填 | 类型、范围与说明 |
|---|---|---|
model | 是 | { "description": "固定传 suno。", "type": "string" } |
prompt | 是 | { "description": "歌曲描述,1–520000个Unicode字符。", "type": "string", "minLength": 1, "maxLength": 520000 } |
lyrics | 否 | { "description": "歌词。与提示词分开填写。最多 520000 字符。", "type": "string", "maxLength": 520000 } |
style_text | 否 | { "description": "音乐风格。与提示词和歌词分开填写。最多 520000 字符。", "type": "string", "maxLength": 520000 } |
n | 否 | { "description": "生成数量。最小 1。最大 1。", "type": "integer", "minimum": 1, "maximum": 1 } |
- 仅核对现售目录、接口资料及已审核本服务适配合同;示例未发送,未做付费生成验证。
- prompt、lyrics、style_text 分别最多520000个Unicode字符,n只能为1。
- 不接受指定时长、纯器乐开关或参考音频。
- 一次请求可能返回多首音频;完整读取 music_url 数组,按一次生成任务计费。
- 不支持指定时长;实际成品秒数未公开,不承诺固定秒数。
- 适合用途|用提示词、歌词和风格生成歌曲;一次请求 n=1,可能返回多段音频。
- 使用注意|不支持参考音频、续写、纯器乐开关或指定时长;轮询完成前不要重复提交。
curl --max-time 600 https://api.yuqitoken.cn/v1/music \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model": "suno", "prompt": "温暖、轻快的民谣歌曲", "lyrics": "清晨的风,吹向远方", "style_text": "轻快民谣,原声吉他", "n": 1}'
结果:music_url[]。
原任务轮询:{
"method": "GET",
"path": "/v1/music/{task_id}",
"auth": "same original Bearer token",
"task_id_jsonpath": "$.id",
"queued": [
"queued"
],
"running": [
"in_progress"
],
"success": [
"completed"
],
"failure": [
"failed"
],
"success_requires": "terminal completed plus usable result",
"interval_seconds": [
5,
10
],
"deadline_seconds": 1800,
"unknown": "preserve original id, stop blind retries, never create another POST"
}
。创建响应读取顶层id;只有completed加真实结果才成功,未知结果不得重提生成。
以下组当前无在售型号:happyhorse, wan-video。
错误、超时与取图取片
只发送一次生成POST。超时、断网或未知结果保留原任务id,不补单。安全GET按Retry-After退避查询原任务;异步等待至少30分钟,同步请求至少600秒。HTTP200或进度100不单独代表成功。只取原任务结果,不向结果CDN转发API令牌。最终计费与退款以账单核查为准。
Python 与 OpenAI SDK
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.yuqitoken.cn/v1",
)
completion = client.chat.completions.create(
model="gpt-5.6-terra",
messages=[{"role": "user", "content": "写一段产品更新说明。"}],
)
print(completion.choices[0].message.content)
Node.js、Postman、Cherry Studio、LobeChat 等客户端可复用相同的 Base URL 与 Bearer Key;文字模型可使用 OpenAI Chat/Responses 兼容调用。可灵不属于 Chat 模型,客户端必须额外支持异步 /v1/videos 提交与轮询。密钥建议以环境变量或客户端的私密凭据区保存。
错误排查与安全
| 现象 | 优先检查 |
|---|---|
401 Invalid token | 确认使用控制台新建的 Key,鉴权头为 Bearer 加密钥,且没有多余空格。 |
401 Incorrect API key provided,错误信息出现 api.openai.com 或 platform.openai.com | 请求仍发往 OpenAI 官方,本服务 Key 不会被官方接受。不要反复更换 Key;把客户端 Base URL 精确设置为 https://api.yuqitoken.cn/v1,并确认实际请求 Host 只属于 yuqitoken.cn。 |
404,实际路径出现 /v1/v1/... | OpenAI 兼容 SDK 的 Base URL 已经以 /v1 结尾,SDK 会继续追加资源路径,不要再手工追加第二个 /v1。直接 HTTP 请求则使用本页给出的完整 /v1/... 路径。Claude Code 的 Base URL 不带 /v1。 |
503 服务暂时不可用 | 先到模型广场核对完整模型名并保存 Request ID;只有确认原请求没有创建任务后才能重新提交,不得换错误端点或盲目重试。 |
| 客户端显示“模型服务额度不足”,但服务端没有可灵请求 | 这是客户端的泛化错误,不代表真实余额不足。确认实际请求为 POST https://api.yuqitoken.cn/v1/videos,模型名为本页列出的可灵型号,并让客户端保留原始 HTTP 状态、错误 JSON 与 Request ID;若只调用 Chat/Responses,必须改造为异步视频任务流程。 |
给 2.6/3.0 增加 image_url 后失败 | 当前公开合同只保证 5 秒文生视频,图生视频扩展未开放。删除未公开字段;不要把其它能力的字段套入这两个模型。 |
| GPT Image 请求路径错误 | GPT Image 2 tier models 文生图使用异步 /v1/videos 并轮询;上传参考图的图生图使用 multipart /v1/images/edits,每张文件都必须使用精确字段 image[]。单数 image 只属于独立的同步 image2 合同。 |
| 千问 Pro 提示尺寸与计费档不匹配 | qwen-image-3.0-pro-1K 固定使用 1K 档,qwen-image-3.0-pro 固定使用 2K 档。请保持 size 与精确模型名一致,或改用标准版 qwen-image-3.0。 |
| Nano 请求立即报错或路径错误 | 确认提交地址是 POST /v1/videos,查询地址是 GET /v1/videos/{task_id}。 |
| 图片或视频结果无法显示 | 先保存响应中的结果数据或 URL;确认客户端没有拦截大响应体,并保存响应头或 JSON 中的 Request ID。结果 URL 可能是临时地址,应立即下载。 |
| 额度消耗异常 | 核对模型、分辨率、质量、并发和重试策略。图片/视频失败重试前应先确认是否已创建任务。 |
- 每个应用或环境使用独立 Key,便于随时单独停用。
- 禁止把 Key 放在浏览器前端、移动端安装包、公开仓库和截图中。
- 服务端记录接口返回的请求 ID,提交工单时提供请求时间、模型名、接口和请求 ID,不要发送完整 Key。
- 模型广场用于确认型号与客户价格;生产可用性还必须结合鉴权、服务状态和真实请求的 Request ID 判断,不能只看“已上架”。