{
"contents": [
{
"parts": [
{
"text": "1 dog"
}
]
}
],
"generationConfig": {
"responseModalities": [
"Image"
],
"imageConfig": {
"aspectRatio": "16:9",
"imageSize": "2K"
}
}
}curl --location --request POST 'https://one.api4gpt.com/v1beta/models/gemini-3-pro-image-preview:generateContent' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [
{
"parts": [
{
"text": "1 dog"
}
]
}
],
"generationConfig": {
"responseModalities": [
"Image"
],
"imageConfig": {
"aspectRatio": "16:9",
"imageSize": "2K"
}
}
}'{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"inlineData": {
"mimeType": "image/jpeg",
"data": "BASE64编码"
}
}
]
},
"finishReason": "STOP",
"index": 0,
"safetyRatings": null
}
],
"promptFeedback": {
"safetyRatings": null
},
"usageMetadata": {
"promptTokenCount": 3,
"candidatesTokenCount": 2071,
"totalTokenCount": 2196,
"thoughtsTokenCount": 122,
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 3
}
]
}
}