Generate Image (Flash)
POST/v1beta/models/gemini-2.5-flash-image:generateContent
VerifiedPublished by Nano Banana
curl -X POST https://api.orthogonal.com/v1/run \
-H 'Authorization: Bearer orth_live_••••' \
-H 'Content-Type: application/json' \
-d '{
"api": "nano-banana",
"path": "/v1beta/models/gemini-2.5-flash-image:generateContent",
"method": "POST",
"body": {
"contents": [
{
"parts": [
{
"text": ""
}
]
}
]
}
}'
$0.05per call
Every call costs the same.
You aren't charged for failed calls. A wallet payment for a failed call is refunded.
About this endpoint
Generate images from text prompts. Also supports image editing (pass source image + edit instructions) and multi-image composition (up to 3 images). Returns base64-encoded images.
Body parameters
contentsrequiredarrayArray with one object containing parts. Example: [{"parts": [{"text": "A cute cat"}]}]. For editing, add inlineData: [{"parts": [{"text": "Add a hat"}, {"inlineData": {"mimeType": "image/jpeg", "data": "base64..."}}]}]generationConfigobjectOptional config. Set responseModalities: ["IMAGE"] for image-only output, or ["TEXT", "IMAGE"] for both. Set imageConfig.aspectRatio to: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, or 21:9