# Imagen 4 Ultra > Generates ultra-realistic images up to 2K resolution with precise prompt interpretation, enhanced detail, lighting, and texture for professional-grade visuals. ## Overview - **Model ID**: `imagen-4.0-ultra` - **Category**: image - **Provider**: google - **Status**: model_ready - **Screenshot**: `https://assets.modelslab.com/generations/fa0f0f0c-14a1-487d-9247-b17f150bbebb.webp` ## API Information This model can be used via our HTTP API. See the API documentation and usage examples below. ### Endpoint - **URL**: `https://modelslab.com/api/v7/images/text-to-image` - **Method**: POST ### Parameters - **`prompt`** (required): Enter Prompt for image generation. Maximum input tokens: 480 tokens - Type: textarea - **`model_id`** (optional): Model - Type: text - **`aspect_ratio`** (required): It tells you the shape of an image by comparing its width to its height. For example, 1:1 is square, 3:4 and 4:3 are slightly tall or wide, 9:16 is vertical, and 16:9 is wide - Type: select (options: 1:1, 3:4, 4:3, 9:16, 16:9) - **`samples`** (optional): - Type: number (range: 1-4) ## Usage Examples ### cURL ```bash curl --request POST \ --url https://modelslab.com/api/v7/images/text-to-image \ --header "Content-Type: application/json" \ --data '{ "key": "YOUR_API_KEY", "model_id": "imagen-4.0-ultra", "prompt": "A professional office woman sitting at a modern desk, wearing a smart business suit, confident posture, natural makeup, neat hairstyle, working on a laptop in a bright corporate office environment with large windows, minimalistic interior design, soft lighting, realistic style", "aspect_ratio": "1:1", "samples": "1" }' ``` ### Python ```python import requests response = requests.post( "https://modelslab.com/api/v7/images/text-to-image", headers={ "Content-Type": "application/json" }, json={ "key": "YOUR_API_KEY", "model_id": "imagen-4.0-ultra", "prompt": "A professional office woman sitting at a modern desk, wearing a smart business suit, confident posture, natural makeup, neat hairstyle, working on a laptop in a bright corporate office environment with large windows, minimalistic interior design, soft lighting, realistic style", "aspect_ratio": "1:1", "samples": "1" } ) print(response.json()) ``` ### JavaScript ```javascript fetch("https://modelslab.com/api/v7/images/text-to-image", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "key": "YOUR_API_KEY", "model_id": "imagen-4.0-ultra", "prompt": "A professional office woman sitting at a modern desk, wearing a smart business suit, confident posture, natural makeup, neat hairstyle, working on a laptop in a bright corporate office environment with large windows, minimalistic interior design, soft lighting, realistic style", "aspect_ratio": "1:1", "samples": "1" }) }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Links - [Model Playground](https://modelslab.com/models/text-to-image-ultra/imagen-4.0-ultra) - [API Documentation](https://docs.modelslab.com) - [ModelsLab Platform](https://modelslab.com)