Skip to content

inference.nano-banana.txt2img.v2

View markdown

The inference.nano-banana.txt2img.v2 job generates an image from a text prompt using Gemini 2.5 Flash Image (Nano Banana).

{
"type": "inference.nano-banana.txt2img.v2",
"config": {
"prompt": "a serene mountain landscape at golden hour"
}
}

Additional configuration:

  • aspect_ratio (string; one of 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9; default 1:1)
  • include_messages (boolean; default False)

This job type is also available under its partner alias inference.partner.nano-banana.txt2img.v2.

{
"type": "object",
"required": [
"type",
"config"
],
"additionalProperties": false,
"properties": {
"type": {
"type": "string"
},
"config": {
"type": "object",
"additionalProperties": false,
"required": [
"prompt"
],
"properties": {
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 2500,
"examples": [
"puppies in a cloud, 4k"
],
"description": "A description of the desired output image."
},
"aspect_ratio": {
"type": "string",
"default": "1:1",
"enum": [
"1:1",
"2:3",
"3:2",
"3:4",
"4:3",
"4:5",
"5:4",
"9:16",
"16:9",
"21:9"
],
"description": "Aspect ratio of output."
},
"include_messages": {
"type": "boolean",
"default": false,
"description": "Enable to include the model's messages in the output as message.txt files."
}
}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}