{
"contentType": "application/json",
"properties": {
"contents": {
"items": {
"properties": {
"parts": {
"items": {
"properties": {
"inline_data": {
"description": "图片内嵌数据",
"properties": {
"data": {
"description": "图片 base64 追多支持传入 14 张图片",
"type": "string",
"x-i18n": {
"en-US": {
"description": "Image base64 supports incoming 14 images."
}
}
},
"mime_type": {
"description": "图片MIME类型",
"type": "string",
"x-i18n": {
"en-US": {
"description": "Image MIME type"
}
}
}
},
"required": [
"mime_type",
"data"
],
"type": "object",
"x-i18n": {
"en-US": {
"description": "Image embedded data"
}
}
},
"text": {
"description": "提示词",
"type": "string",
"x-i18n": {
"en-US": {
"description": "Prompt"
}
}
}
},
"required": [
"text"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"parts"
],
"type": "object"
},
"type": "array"
},
"generationConfig": {
"description": "生成配置",
"properties": {
"imageConfig": {
"description": "图片配置",
"properties": {
"aspectRatio": {
"description": "宽高比:\n1:1、2:3、3:2、3:4、4:3、4:5、5:4、9:16、16:9、21:9 支持所有模型\n1:4、1:8、4:1、8:1 这几个仅支持Gemini 3.1模型",
"type": "string",
"x-i18n": {
"en-US": {
"description": "Aspect ratio:\n1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 support all models\n1:4, 1:8, 4:1, and 8:1 only support Gemini 3.1 models."
}
}
},
"imageSize": {
"description": "分辨率:\n0.5K、1K、2K、4K\n默认值:1K\n注意:Gemini 2.5只支持1K,0.5K仅支持Gemini 3.1模型,值须填“512”",
"type": "string",
"x-i18n": {
"en-US": {
"description": "Resolution:\n0.5K, 1K, 2K, 4K\nDefault: 1K\nNote: Gemini 2.5 only supports 1K, 0.5K only supports Gemini 3.1 model, the value must be filled in \"512\""
}
}
}
},
"type": "object",
"x-i18n": {
"en-US": {
"description": "Picture configuration"
}
}
},
"responseModalities": {
"description": "响应模式:\nText、Image\n默认:[\"Text\", \"Image\"]",
"items": {
"type": "string"
},
"type": "array",
"x-i18n": {
"en-US": {
"description": "Response mode:\nText, Image\nDefault: [\"Text\", \"Image\"]"
}
}
}
},
"type": "object",
"x-i18n": {
"en-US": {
"description": "Generate configuration"
}
}
},
"response_format": {
"description": "填url返回url,不填默认base64",
"type": "string",
"x-i18n": {
"en-US": {
"description": "Fill in the url and return the url, if not fill in the default base64"
}
}
}
},
"required": [
"contents"
]
}{
"contents": [
{
"parts": [
{
"text": "Hi, can you create a 3d rendered image of a pig with wings and a top hat flying over a happy futuristic scifi city with lots of greenery?"
}
],
"role": "user"
}
],
"generationConfig": {
"responseModalities": [
"IMAGE"
]
},
"response_format": "url"
}{
"contents": [
{
"parts": [
{
"text": "HA [style] sticker of a [subject], featuring [key characteristics] and a [color palette]. The design should have [line style] and [shading style]. The background must be transparent."
}
],
"role": "user"
}
],
"generationConfig": {
"imageConfig": {
"aspectRatio": "9:16",
"imageSize": "1K"
},
"responseModalities": [
"IMAGE"
]
}
}{
"contents": [
{
"parts": [
{
"text": "Turn this rough [medium] sketch of a [subject] into a [style description] photo. Keep the [specific features] from the sketch but add [new details/materials]."
},
{
"inline_data": {
"data": "image_base64",
"mime_type": "image/jpeg"
}
}
],
"role": "user"
}
],
"generationConfig": {
"imageConfig": {
"aspectRatio": "9:16",
"imageSize": "1K"
},
"responseModalities": [
"IMAGE"
]
}
}{
"contents": [
{
"parts": [
{
"text": "Using the provided images, place [element from image 2] onto [element from image 1]. Ensure that the features of [element from image 1] remain completely unchanged. The added element should [description of how the element should integrate]."
},
{
"inline_data": {
"data": "image_base64_1",
"mime_type": "image/jpeg"
}
},
{
"inline_data": {
"data": "image_base64_2",
"mime_type": "image/jpeg"
}
}
],
"role": "user"
}
],
"generationConfig": {
"imageConfig": {
"aspectRatio": "9:16",
"imageSize": "1K"
},
"responseModalities": [
"IMAGE"
]
}
}