身份要求
账户会话. 会话/管理写操作不在公共 Playground 执行。
接口
curl --request GET 'https://api.oneaster.ai/core/v1/keys/1/task-models' \ --header 'Authorization: Bearer '"$ONEASTER_SESSION_TOKEN"
参数
- id (path, 必填): {"type":"string","pattern":"^[0-9]+$"}
- kind (query, 可选): {"enum":["image","video"]}
响应
200
本人有效Key可用任务目录;按Key模型范围、账户组和渠道过滤
{
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"success": {
"const": true
},
"data": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9]+$"
},
"model": {
"type": "string"
},
"kind": {
"const": "image"
},
"unit": {
"const": "image"
},
"unit_price_micro": {
"type": "string",
"pattern": "^[0-9]+$",
"description": "整数账务单位;1 积分 = 10000 单位,1 USD = 100 积分。前端用 BigInt。"
},
"version": {
"type": "integer",
"minimum": 0
},
"enabled": {
"type": "boolean"
},
"upstream_model": {
"enum": [
"z-image",
"image-01"
]
},
"quantity": {
"const": 1
},
"aspect_ratios": {
"type": "array",
"items": {
"type": "string"
}
},
"provider_id": {
"type": "string",
"pattern": "^[0-9]+$"
},
"prompt_max_length": {
"const": 1000
},
"media_type": {
"const": "image/png"
},
"max_artifact_bytes": {
"const": 20971520
}
},
"required": [
"id",
"model",
"kind",
"unit",
"unit_price_micro",
"version",
"enabled",
"upstream_model",
"quantity",
"aspect_ratios"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9]+$"
},
"model": {
"type": "string"
},
"kind": {
"const": "video"
},
"unit": {
"const": "second"
},
"video_prices": {
"type": "object",
"minProperties": 1,
"maxProperties": 3,
"additionalProperties": false,
"properties": {
"480p": {
"type": "string",
"pattern": "^[1-9][0-9]{0,14}$",
"description": "Explicit gateway integer units per second, at most 100000000000000; unconfigured resolutions cannot be submitted."
},
"720p": {
"type": "string",
"pattern": "^[1-9][0-9]{0,14}$",
"description": "Explicit gateway integer units per second, at most 100000000000000; unconfigured resolutions cannot be submitted."
},
"1080p": {
"type": "string",
"pattern": "^[1-9][0-9]{0,14}$",
"description": "Explicit gateway integer units per second, at most 100000000000000; unconfigured resolutions cannot be submitted."
}
}
},
"version": {
"type": "integer",
"minimum": 0
},
"enabled": {
"type": "boolean"
},
"upstream_model": {
"enum": [
"bytedance/v1-lite-text-to-video",
"runway",
"bytedance/seedance-2-5"
]
},
"quantity": {
"const": 1
},
"aspect_ratios": {
"type": "array",
"items": {
"type": "string"
}
},
"resolutions": {
"type": "array",
"items": {
"type": "string"
}
},
"durations": {
"type": "array",
"items": {
"enum": [
5,
10
]
}
},
"input_modes": {
"type": "array",
"items": {
"enum": [
"text_to_video",
"image_to_video"
]
}
},
"reference_image": {
"type": "object",
"additionalProperties": false,
"properties": {
"source": {
"const": "settled_core_image_task"
},
"sources": {
"type": "array",
"items": {
"enum": [
"settled_core_image_task",
"node_media"
]
}
},
"node_media_requires_bridge": {
"const": true
},
"same_key": {
"const": true
},
"media_types": {
"type": "array",
"items": {
"const": "image/png"
}
},
"max_bytes": {
"const": 10485760
},
"aspect_ratio_from_image": {
"const": true
}
},
"required": [
"source",
"sources",
"node_media_requires_bridge",
"same_key",
"media_types",
"max_bytes",
"aspect_ratio_from_image"
]
},
"specifications": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"resolution": {
"enum": [
"480p",
"720p",
"1080p"
]
},
"durations": {
"type": "array",
"items": {
"enum": [
5,
10
]
}
}
},
"required": [
"resolution",
"durations"
]
}
},
"prompt_max_length": {
"enum": [
1800,
10000,
20480
]
},
"preview_supported": {
"const": true
},
"output_delivery": {
"const": "provider_url"
},
"provider_retention_days": {
"const": 14
},
"media_type": {
"const": "video/mp4"
},
"archived": {
"const": false
},
"camera_fixed": {
"type": "boolean"
},
"safety_checker": {
"type": "boolean",
"description": "Whether Core sends an explicit safety-checker input. Runway does not expose this input; false does not describe provider moderation."
},
"provider_id": {
"type": "string",
"pattern": "^[0-9]+$"
}
},
"required": [
"id",
"model",
"kind",
"unit",
"video_prices",
"version",
"enabled",
"upstream_model",
"quantity",
"aspect_ratios",
"resolutions",
"durations",
"input_modes",
"specifications",
"prompt_max_length",
"preview_supported",
"output_delivery",
"provider_retention_days",
"media_type",
"archived",
"camera_fixed",
"safety_checker"
]
}
]
}
}
},
"required": [
"success",
"data"
]
}
}
}
default
错误代码见 core-api.md;供应商/数据库错误已隐藏。
{
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"success": {
"const": false
},
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"type": {
"const": "oneaster_error"
}
},
"required": [
"code",
"message",
"type"
]
},
"data": {
"type": "null"
}
},
"required": [
"success",
"error",
"data"
]
}
}
}