Uses the registered generic task route and an administrator-configured public model ID; source plugin declarations do not prove production enablement or pricing. Preserve the returned gateway task ID; use task status and protected artifacts, never automatically repeat generation after an uncertain result. Exact model constraints and billing evidence are described in the gateway guide.
/pg/tasks/minimax-image身份验证
Authorizationstring必填使用登录取得的 native access_token(身份要求:登录 access_token),按路由校验本人归属与受信任浏览器 Origin;生成写入按钱包规则扣费,只读查询不重新预扣;不得使用推理 API Key(sk-…)或 PAT(nap_…)。
Authorization: Bearer $ONEASTER_ACCESS_TOKEN
参数
Idempotency-Keystringheader · 每次新发起的 /pg 生成提交建议由前端生成并持久化稳定的 1–100 位无空格可打印 ASCII 标识(推荐 UUID),断线重试保持原标识与原请求字节。同账号跨所有 /pg POST 协议共用一个命名空间;省略时后端兼容生成并通过 X-OneAster-Intent-ID 返回,但若响应头丢失将无法按意图恢复。
请求正文 · application/json
modelstring必填Administrator-configured public callable model ID
promptstring必填Nonblank; at most 32000 Unicode characters
nintegerresolutionstringareastringAlias of resolution; when both are supplied they must agree
aspect_ratiostringresponse_formatstringThe plugin requests URL upstream; base64 output is not guaranteed
streamobjectJSON Schema
{
"type": "object",
"additionalProperties": false,
"required": [
"model",
"prompt"
],
"properties": {
"model": {
"type": "string",
"description": "Administrator-configured public callable model ID"
},
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 32000,
"description": "Nonblank; at most 32000 Unicode characters"
},
"n": {
"type": "integer",
"minimum": 1,
"maximum": 10,
"default": 1
},
"resolution": {
"type": "string",
"enum": [
"1K",
"2K",
"4K"
],
"default": "1K"
},
"area": {
"type": "string",
"enum": [
"1K",
"2K",
"4K"
],
"description": "Alias of resolution; when both are supplied they must agree"
},
"aspect_ratio": {
"type": "string",
"enum": [
"1:1",
"4:3",
"3:4",
"16:9",
"9:16",
"21:9",
"9:21",
"3:2",
"2:3"
],
"default": "1:1"
},
"response_format": {
"type": "string",
"enum": [
"url",
"b64_json"
],
"description": "The plugin requests URL upstream; base64 output is not guaranteed"
},
"stream": {
"const": false
}
}
}