🎉 New Year Sale: Get 20% OFF on all plans — Use code NEWYEAR2026.

Upgrade now
Imagen 4 thumbnail

Google/Imagen 4

imagen-4
Google/Imagen 4LLMs.txt
Advanced image generator producing photorealistic images up to 2K resolution with diverse styles and fast rendering.
API PlaygroundAPI Documentation

API Endpoint URL

Base URL for all API requests to this endpoint.

https://modelslab.com/api/v7/images/text-to-image

API Authentication

Authentication requires a valid API key included in the request. Generate and manage your API keys from your developer dashboard. Include the key in the key parameter for all API requests.

Integration Examples

Production-ready code samples for API integration

{
"prompt": "a regal knight in ornate, reflective golden armor with intricate blue accents, wearing a deep royal blue cape adorned with gold embroidery, sitting proudly on a majestic white horse. the knight’s helmet features a tall blue plume. the horse is also dressed in elaborate golden and blue tack, standing gracefully on a stone step partially surrounded by water. in the background, there is a grand palace with classical columns, arches, and marble statues, evoking renaissance or baroque architecture. lush greenery frames the scene, adding a serene, enchanted garden ambiance. the lighting is bright and natural, casting soft reflections in the water below",
"model_id": "imagen-4",
"aspect_ratio": "1:1",
"key": "YOUR_API_KEY"
}

SDKs

Official SDKs

Production-ready SDKs and client libraries for all major programming languages

API Parameters

Technical specifications for API request parameters.

Field NameParameterTechnical Description
promptpromptprompt
Modelmodel_idModel
Aspect Ratioaspect_ratiot 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