跳转到主要内容
POST
Generation submission placeholder / 生成提交预览
当前为 API 预览。生成接口尚未接入供应商,成功认证后仍可能返回 503;不会创建任务或扣积分。

请求参数

真实接入后的受理契约

真实执行启用后,受理成功会原子记录父操作、结果项、冻结积分和持久调度记录。HTTP 202 表示已受理,不表示模型已经完成。 output_count=4 返回一个包含四个稳定结果项的 task_id。Worker 在账户和供应商限制内调度,不保证四项同时开始。
当前建设阶段尚未连接真实供应商。接口不能伪造生成成功或已完成的付费结果。

计划中的幂等受理

真实任务受理启用后,提交 Idempotency-Key 并与输入一起保存。当前 POST /v1/tasks 在创建操作前拒绝真实执行,尚不会因该请求头产生存储操作。同键同输入引用原操作;改变数量、fallback 或费用上限应返回冲突。主动重新生成需新幂等键和新付费操作。 错误与恢复

授权

Authorization
string
header
必填

API key beginning as_. Keep on the server. Scope permissions are checked separately.

请求头

Idempotency-Key
string

Reserved for live acceptance. No task is currently created or deduplicated by this header.

请求体

application/json
model
string
必填
Minimum string length: 1
示例:

"prism-image-2"

input
object
必填

Current preview input. Supported fields vary by modality and exact catalog model. No live provider mapping is implied.

output_count
integer
默认值:1

Target result count. Images/videos accept 1–4; music and LLM must remain 1. Not a concurrency guarantee. / 目标结果数,非同时并发保证。

必填范围: 1 <= x <= 4
fallback
boolean
默认值:false

Authorizes a higher-priced compatible official fallback after an eligible confirmed failure. Live execution is disabled in this build.

max_credits
integer

Whole-request reservation cap. Reject the entire request when max_reserved_credits exceeds it.

必填范围: x >= 0

响应

Invalid or unsupported input

error
object
必填