API ReferenceImages APINano Banana
Native Gemini Format
Last updated:
Images — Nano Banana
POST /v1beta/models/gemini-3-pro-image-preview:generateContent
Authentication
Store your API key in AICENTOS_API_KEY; the shell examples expand it in the Authorization: Bearer header.
The API Key obtained under "Token Management" in the console
Location: header
Request Body
application/json
TypeScript type definition
Use the request body type in TypeScript
Response Body
application/json
export AICENTOS_API_KEY="sk-your-aicentos-api-key"
curl -X POST "https://aicentos.com/v1beta/models/gemini-3-pro-image-preview:generateContent" \
-H "Authorization: Bearer $AICENTOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "contents": [ { "role": "user", "parts": [ { "text": "A capybara in a spacesuit floating in space" } ] } ], "generationConfig": { "responseModalities": [ "IMAGE" ] } }'{
"candidates": [
{
"content": {
"role": "string",
"parts": [
{
"text": "string",
"inlineData": {
"mimeType": "string",
"data": "string"
}
}
]
},
"finishReason": "string",
"index": 0
}
],
"usageMetadata": {
"promptTokenCount": 0,
"candidatesTokenCount": 0,
"totalTokenCount": 0
},
"modelVersion": "string"
}