{"contents":[{"parts":[{"text":"'Create a picture of my cat eating a nano-banana in a fancy restaurant under the Gemini constellation"},{"inline_data":{"mime_type":"image/jpeg","data":"$IMG_BASE64"}}]}]}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.302.ai/google/v1/models/gemini-2.5-flash-image-preview?response_format' \
--header'Authorization: Bearer sk-mfYQzy0XTFfz4P16vRE4gFrKK1Nly4TozsMqbbb9PSiJUvFO' \
--header'Content-Type: application/json' \
--data-raw'{
"contents": [
{
"parts": [
{
"text": "'\''Create a picture of my cat eating a nano-bananain a fancy restaurant under the Gemini constellation"
},
{
"inline_data": {
"mime_type": "image/jpeg",
"data": "$IMG_BASE64"
}
}
]
}
]
}'