{
"contents": [
{
"parts": [
{
"text": "'Create a new picture as this pic'"
},
{
"inline_data": {
"mime_type": "image/jpeg",
"data": "$IMG_BASE64"
}
}
]
}
]
}curl --location -g --request POST 'http://api.example.com/v1beta/models/gemini-3-pro-image-preview:generateContent' \
--header 'x-goog-api-key: sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [
{
"parts": [
{
"text": "'\''Create a new picture as this pic'\''"
},
{
"inline_data": {
"mime_type": "image/jpeg",
"data": "$IMG_BASE64"
}
}
]
}
]
}'{
"candidates": [
{
"content": {
"parts": [
{
"inlineData": {
"mimeType": "image/jpeg",
"data": "{base64_data}"
}
}
],
"role": "model"
},
"finishReason": "STOP",
"index": 0
}
],
"usageMetadata": {
"promptTokenCount": 54,
"candidatesTokenCount": 1230,
"totalTokenCount": 1456,
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 54
}
],
"candidatesTokensDetails": [
{
"modality": "IMAGE",
"tokenCount": 1120
}
],
"thoughtsTokenCount": 172
},
"modelVersion": "gemini-3-pro-image-preview",
"responseId": "EfEqaf-7E4uwjMcPq4qk-AY"
}