Skip to main content
POST
Generation submission placeholder / 生成提交预览
API preview: generation providers are not connected. An authenticated request can return 503 without creating a task or charging credits.

Request body

Planned live acceptance

When live execution is enabled, successful acceptance atomically records the operation, result items, credit reservation, and durable scheduling record. HTTP 202 means work is accepted, not that a model has finished. With output_count=4, you receive one task ID containing four stable items. The worker schedules each item within account and provider limits. There is no guarantee that all four start simultaneously.
During this build, real provider execution is not connected. A request must not manufacture a successful model output or a completed paid generation.

Planned idempotent acceptance

Once live task acceptance is enabled, send Idempotency-Key and retain it with the input. In this build, POST /v1/tasks rejects live execution before creating an operation, so the header does not yet produce a stored operation. Reusing it with the same input refers to the original operation; changing quantity, fallback, or the credit cap should return a conflict. Deliberately generating again requires a new key and a new paid operation. Errors and recovery

Authorizations

Authorization
string
header
required

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

Headers

Idempotency-Key
string

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

Body

application/json
model
string
required
Minimum string length: 1
Example:

"prism-image-2"

input
object
required

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

output_count
integer
default:1

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

Required range: 1 <= x <= 4
fallback
boolean
default: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.

Required range: x >= 0

Response

Invalid or unsupported input

error
object
required