---
title: "Create image from text - Nano Banana Pro"
method: POST
path: "/v1/ai/text-to-image/nano-banana-pro"
tags: ["text-to-image"]
---

# Create image from text - Nano Banana Pro

`POST /v1/ai/text-to-image/nano-banana-pro`

## Request

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

Generate high-quality images from text descriptions using Google's Nano Banana Pro model (Gemini 3).

**Key Features:**
- Advanced image generation with complex compositions
- Support for reference images for guided generation
- Multiple aspect ratios and resolutions
- High-quality output up to 4K resolution

**Best for:**
- High-quality image generation
- Complex scene compositions
- Reference-guided generation
- Professional visual content

## Request body

- TtiNanoBananaProRequest
  - `prompt` string, required: Text prompt describing the image you want to generate. **Tips:** - Be specific about visual details, composition, and style - Nano Banana Pro excels at complex compositions and detailed scenes - Describe lighting, atmosphere, and camera angles for best results **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_url` string, 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.
  - `reference_images` TtiNanoBananaProRequestReferenceImagesInner[]: Optional reference images for guided generation. Each image can include associated text and mime type. **Image requirements:** - Maximum 14 images - Supported formats: PNG, JPEG, WebP - Publicly accessible URLs or GCS format
    - `image` string, required: Image URL (publicly accessible URL or GCS format)
    - `text` string: Optional text description to attach to the reference image
    - `mime_type` 'image/png' | 'image/jpeg' | 'image/webp', required: MIME type of the image
  - `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 - `2K`: Standard resolution, balanced quality/speed (default) - `4K`: High resolution, best quality

## Response `200`

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

- GetStyleTransferTaskStatus200Response
  - `data` TaskDetail, required
    - `task_id` string, uuid, required: Task identifier
    - `status` 'CREATED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED', required: Task status
    - `generated` string[], required

## Other responses

- `400`: Bad Request - The server could not understand the request due to invalid syntax.
- `401`: Unauthorized - The client must authenticate itself to get the requested response.
- `500`: Internal Server Error - The server has encountered a situation it doesn't know how to handle.
- `503`: Service Unavailable

---

[API](https://skmtc.dev/magnific/apis/magnific-api.md) · [All operations](https://skmtc.dev/magnific/apis/magnific-api/llms.txt) · [OpenAPI document](https://skmtc.dev/magnific/apis/magnific-api/revisions/60711fb082c7?raw)
