使用原生登录 access_token 直接扣减本人钱包创建标准异步视频任务。断线后通过 /pg/requests/by-intent 获取 task_status_url(/pg/videos/{task_id})继续轮询,不得重复 POST。
POST
/pg/videosAuthorizations
AuthorizationstringrequiredUse a native login access_token (required access: Native access token) with owner isolation and trusted browser Origin; generation writes use wallet billing while reads do not precharge; inference API Keys (sk-…) and PATs (nap_…) are rejected.
Authorization: Bearer $ONEASTER_ACCESS_TOKEN
Parameters
Idempotency-Keystringheader · 每次新发起的 /pg 生成提交建议由前端生成并持久化稳定的 1–100 位无空格可打印 ASCII 标识(推荐 UUID),断线重试保持原标识与原请求字节。同账号跨所有 /pg POST 协议共用一个命名空间;省略时后端兼容生成并通过 X-OneAster-Intent-ID 返回,但若响应头丢失将无法按意图恢复。
Body · application/json
modelstringrequired目录中的视频模型调用 ID(model_name)
promptstringrequiredsecondsstringsizestringJSON Schema
{
"type": "object",
"required": [
"model",
"prompt"
],
"properties": {
"model": {
"type": "string",
"description": "目录中的视频模型调用 ID(model_name)"
},
"prompt": {
"type": "string"
},
"seconds": {
"type": "string"
},
"size": {
"type": "string"
}
},
"additionalProperties": true
}Body · multipart/form-data
See the complete schema below.
JSON Schema
{
"type": "object",
"additionalProperties": true,
"description": "Model-specific native multipart fields and file references"
}