仅当前有效登录会话;无需创建或选择 API Key。复用账号分组、钱包预留、原价格与唯一结算。未知结果保留占款,查询原意图。已受理执行不因退出登录取消。
POST
/core/v1/playground/media-tasksAuthorizations
AuthorizationstringrequiredUse an account session; required access: Account session.
Authorization: Bearer $ONEASTER_SESSION_TOKEN
Parameters
Idempotency-Keystringrequiredheader · 一次用户意图的稳定标识;网络重试保持原键和输入。
Body · multipart/form-data
taskoneOfrequiredimagestringrequiredFully decoded PNG, dimensions 1..4096; image task JSON <=256 KiB; video task JSON <=16 KiB.
JSON Schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"task": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"kind": {
"const": "video"
},
"model": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"input": {
"type": "object",
"additionalProperties": false,
"properties": {
"prompt": {
"type": "string",
"maxLength": 20480
},
"resolution": {
"enum": [
"480p",
"720p",
"1080p",
"4k"
]
},
"duration": {
"type": "integer",
"minimum": 1,
"maximum": 30
},
"image_asset_id": {
"type": "string",
"format": "uuid"
},
"reference_size": {
"type": "string",
"enum": [
"854x480",
"480x854",
"640x480",
"480x640",
"480x480",
"1120x480",
"480x1120",
"1280x720",
"720x1280",
"960x720",
"720x960",
"720x720",
"1680x720",
"720x1680",
"1920x1080",
"1080x1920",
"1440x1080",
"1080x1440",
"1080x1080",
"2520x1080",
"1080x2520",
"576x720",
"900x720",
"864x1080",
"1350x1080",
"3840x2160",
"2160x3840",
"2160x2160",
"2880x2160",
"2160x2880",
"5040x2160",
"720x480",
"480x720",
"1080x720",
"720x1080",
"1620x1080",
"1080x1620"
],
"description": "可选的PNG参考尺寸意图;仅带实际PNG字节时接受,比例须匹配,参与不可变输入快照与幂等哈希。"
},
"generate_audio": {
"type": "boolean"
},
"video_task_id": {
"type": "string",
"format": "uuid"
},
"character_orientation": {
"enum": [
"video",
"image"
]
},
"aspect_ratio": {
"type": "string"
},
"video_asset_id": {
"type": "string",
"format": "uuid",
"description": "服务端根据标准视频multipart字节生成,仅输入快照;JSON不能单独传此字段。"
}
},
"required": [
"prompt",
"image_asset_id",
"resolution",
"duration"
]
}
},
"required": [
"kind",
"model",
"input"
],
"description": "Trusted Node media bridge only: PNG bytes must accompany the asset UUID in multipart. Not accepted on public JSON task submission."
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"kind": {
"const": "image"
},
"model": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"input": {
"type": "object",
"additionalProperties": false,
"properties": {
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 20000
},
"aspect_ratio": {
"type": "string",
"description": "新KIE型号默认1:1;受型号及分辨率限制,读取task-models.specifications。旧z-image/MiniMax仍必须明确传既有比例。"
},
"resolution": {
"enum": [
"1K",
"1.5K",
"2K",
"4K"
],
"description": "新KIE型号默认第一个支持规格;旧z-image/MiniMax不接受此字段。"
},
"image_asset_id": {
"type": "string",
"format": "uuid"
}
},
"required": [
"prompt",
"image_asset_id"
]
}
},
"required": [
"kind",
"model",
"input"
],
"description": "依管理员配置的上游及规格校验。新KIE提示词按型号限长,旧型号1000;数量1,不接受任意图片URL。"
}
]
},
"image": {
"type": "string",
"format": "binary",
"maxLength": 10485760,
"description": "Fully decoded PNG, dimensions 1..4096; image task JSON <=256 KiB; video task JSON <=16 KiB."
}
},
"required": [
"task",
"image"
]
}Media encoding
{
"task": {
"contentType": "application/json"
},
"image": {
"contentType": "image/png"
}
}