text-to-image

Create image from text - Nano Banana Pro Flash

Generate images from text descriptions using Google's Nano Banana Pro Flash model (Gemini 3.1 Flash), a faster variant of Nano Banana Pro optimized for quick image generation.

Key Features:

  • Fast image generation with Gemini 3.1 Flash
  • Google Search grounding for real-world accuracy
  • Support for reference images for guided generation
  • Multiple aspect ratios and resolutions up to 4K

Best for:

  • Rapid image generation with shorter wait times
  • Grounded image generation using Google Search
  • Reference-guided generation
  • Iterative creative workflows where speed matters
post/v1/ai/text-to-image/nano-banana-pro-flash

Request

  • Base URL: https://api.magnific.com
  • URL: https://api.magnific.com/v1/ai/text-to-image/nano-banana-pro-flash
  • Auth: API key in header x-magnific-api-key

Request body

promptstring required

Text prompt describing the image you want to generate.

Tips:

  • Be specific about visual details, composition, and style
  • Nano Banana Pro Flash is optimized for speed while maintaining quality
  • Enable Google Search grounding for images that need real-world accuracy

Examples:

  • Simple: "A suited raccoon smoking a pipe"
  • Detailed: "A suited raccoon smoking a pipe in a vintage study room, warm lighting, leather armchair, bookshelves in background"
webhook_urlstring uri

Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.

aspect_ratio'auto' | '1:1' | '2:3' | '3:2' | '4:3' | '3:4' | '5:4' | '4:5' | '16:9' | '9:16' | '21:9'

Aspect ratio for the generated image.

Available ratios:

  • auto: Derived from the reference images, preserving ratios outside this list (for example a 900x1050 reference returns 960x1120). With no reference images the model picks the ratio itself.
  • 1:1: Square (default)
  • 2:3, 3:2: Portrait/Landscape
  • 4:3, 3:4: Standard
  • 5:4, 4:5: Photo print
  • 16:9, 9:16: Widescreen/Social stories
  • 21:9: Ultra-wide cinematic
resolution'1K' | '2K' | '4K' | 'low' | 'medium' | 'high'

Resolution quality for the generated image.

Available resolutions:

  • 1K: Lower resolution, faster generation (default)
  • 2K: Standard resolution, balanced quality/speed
  • 4K: High resolution, best quality
use_google_search_toolboolean

Enable Google Search grounding during image generation. When enabled, the model uses Google Search to ground its output with real-world information, improving accuracy for prompts that reference real places, people, brands, or current events.

Note: When enabled, the task response may include grounding metadata with source information.

Example request

{
  "prompt": "A suited raccoon smoking a pipe in a vintage study room",
  "webhook_url": "https://www.example.com/webhook",
  "reference_images": [
    {
      "image": "https://example.com/reference.jpg",
      "text": "Reference style",
      "mime_type": "image/jpeg"
    }
  ],
  "aspect_ratio": "1:1",
  "resolution": "1K"
}

Response

OK - The request has succeeded and the Nano Banana Pro Flash process has started.

Example response

{
  "data": {
    "generated": [
      "https://openapi-generator.tech",
      "https://openapi-generator.tech"
    ],
    "task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "status": "CREATED"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.