查看原始 JSON
{
"type": "object",
"required": [],
"properties": {
"body": {
"oneOf": [
{
"type": "object",
"required": [
"model",
"prompt"
],
"properties": {
"n": {
"type": "integer",
"default": 1,
"maximum": 9,
"minimum": 1,
"description": "图像数量。类型: 整数; 默认值: 1; 最小值: 1; 最大值: 9"
},
"seed": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"description": "随机种子。类型: 整数; 最小值: -9007199254740991; 最大值: 9007199254740991"
},
"model": {
"type": "string",
"const": "image-01",
"description": "生成模型。类型: 字符串; 固定值: \"image-01\""
},
"width": {
"type": "integer",
"maximum": 2048,
"minimum": 512,
"description": "图像宽度(像素)。类型: 整数; 最小值: 512; 最大值: 2048"
},
"height": {
"type": "integer",
"maximum": 2048,
"minimum": 512,
"description": "图像高度(像素)。类型: 整数; 最小值: 512; 最大值: 2048"
},
"prompt": {
"type": "string",
"maxLength": 1500,
"minLength": 1,
"description": "生成描述。类型: 字符串; 最短长度: 1; 最长长度: 1500"
},
"aspect_ratio": {
"enum": [
"1:1",
"16:9",
"4:3",
"3:2",
"2:3",
"3:4",
"9:16",
"21:9"
],
"type": "string",
"default": "1:1",
"description": "宽高比。类型: 字符串; 默认值: \"1:1\"; 允许值: [\"1:1\",\"16:9\",\"4:3\",\"3:2\",\"2:3\",\"3:4\",\"9:16\",\"21:9\"]"
},
"response_format": {
"enum": [
"url",
"base64"
],
"type": "string",
"default": "url",
"description": "图像返回格式。类型: 字符串; 默认值: \"url\"; 允许值: [\"url\",\"base64\"]"
},
"prompt_optimizer": {
"type": "boolean",
"default": false,
"description": "提示词优化。类型: 布尔值; 默认值: false"
},
"subject_reference": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"image_file"
],
"properties": {
"type": {
"type": "string",
"const": "character",
"description": "来源类型。类型: 字符串; 固定值: \"character\""
},
"image_file": {
"type": "string",
"minLength": 1,
"description": "参考图 URL 或 data URL。类型: 字符串; 最短长度: 1"
}
},
"additionalProperties": false
},
"maxItems": 1,
"minItems": 1,
"description": "人像参考。类型: 数组; 最少元素: 1; 最多元素: 1"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"model",
"prompt",
"subject_reference"
],
"properties": {
"n": {
"type": "integer",
"default": 1,
"maximum": 9,
"minimum": 1,
"description": "图像数量。类型: 整数; 默认值: 1; 最小值: 1; 最大值: 9"
},
"seed": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"description": "随机种子。类型: 整数; 最小值: -9007199254740991; 最大值: 9007199254740991"
},
"model": {
"type": "string",
"const": "image-01-live",
"description": "生成模型。类型: 字符串; 固定值: \"image-01-live\""
},
"prompt": {
"type": "string",
"maxLength": 1500,
"minLength": 1,
"description": "生成描述。类型: 字符串; 最短长度: 1; 最长长度: 1500"
},
"aspect_ratio": {
"enum": [
"1:1",
"16:9",
"4:3",
"3:2",
"2:3",
"3:4",
"9:16",
"21:9"
],
"type": "string",
"default": "1:1",
"description": "宽高比。类型: 字符串; 默认值: \"1:1\"; 允许值: [\"1:1\",\"16:9\",\"4:3\",\"3:2\",\"2:3\",\"3:4\",\"9:16\",\"21:9\"]"
},
"response_format": {
"enum": [
"url",
"base64"
],
"type": "string",
"default": "url",
"description": "图像返回格式。类型: 字符串; 默认值: \"url\"; 允许值: [\"url\",\"base64\"]"
},
"prompt_optimizer": {
"type": "boolean",
"default": false,
"description": "提示词优化。类型: 布尔值; 默认值: false"
},
"subject_reference": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"image_file"
],
"properties": {
"type": {
"type": "string",
"const": "character",
"description": "来源类型。类型: 字符串; 固定值: \"character\""
},
"image_file": {
"type": "string",
"minLength": 1,
"description": "参考图 URL 或 data URL。类型: 字符串; 最短长度: 1"
}
},
"additionalProperties": false
},
"maxItems": 1,
"minItems": 1,
"description": "人像参考。类型: 数组; 最少元素: 1; 最多元素: 1"
}
},
"additionalProperties": false
}
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"~standard": {
"vendor": "zod",
"version": 1,
"jsonSchema": {}
}
}
},
"additionalProperties": false
}