Build with Nano Banana 2.1
Make your first request
Use your Sorceress API key on your server. The playground uses your signed-in account; your application uses the same model with an API key.
curl -X POST 'https://sorceress.games/api/v1/tools/image_generate' \
-H 'Authorization: Bearer $SORCERESS_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"aspectRatio": "auto",
"params": {
"resolution": "1K"
},
"prompt": "<prompt>",
"model": "nano-banana-2-1"
}'Inputs & settings
promptstringRequiredDescribe what you would like to create.
aspectRatiostringOptions: auto, 16:9, 1:1, 9:16, 21:9, 4:3, 3:4, 3:2, 2:3, 4:1, 1:4, 8:1, 1:8, 5:4, 4:5
paramsobjectrefImagesarrayUpload a file or enter one public HTTPS URL per line.
Full input schema
{
"required": [
"prompt"
],
"properties": {
"prompt": {
"type": "string",
"title": "Prompt",
"description": "Describe what you would like to create."
},
"aspectRatio": {
"type": "string",
"title": "Aspect ratio",
"enum": [
"auto",
"16:9",
"1:1",
"9:16",
"21:9",
"4:3",
"3:4",
"3:2",
"2:3",
"4:1",
"1:4",
"8:1",
"1:8",
"5:4",
"4:5"
],
"default": "auto"
},
"params": {
"type": "object",
"title": "Settings",
"properties": {
"resolution": {
"type": "string",
"title": "Resolution",
"default": "1K",
"enum": [
"1K",
"2K",
"4K"
]
}
}
},
"refImages": {
"type": "array",
"title": "Reference images",
"items": {
"type": "string",
"format": "uri"
},
"maxItems": 10,
"description": "Upload a file or enter one public HTTPS URL per line."
}
}
}Results, saved runs & billing
Media requests return a job ID. Poll GET /api/v1/jobs/:id until it succeeds or fails; keep the same ID while it is processing. Long chat requests can also return a saved job to poll. Completed outputs are stored in your account, and successful work is billed using your model's current rates.
A multi-step workflow may include separately billed successful actions. If a connection drops, check your saved run before submitting it again.






