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 dramatic scene with a large, menacing dragon and a cloaked figure. The dragon, with its intricate scales and sharp horns, dominates the background, its wings partially spread and its mouth slightly open, revealing sharp teeth. Its scales are a mix of dark red and gray, adding to its intimidating presence. In the foreground, a person stands with their back to the viewer, wearing a detailed, medieval-style cloak and armor. The cloak is deep red with intricate patterns, and the armor is metallic, with a weathered appearance. The setting is a rugged, mountainous landscape with snow-covered peaks and a cloudy sky, enhancing the epic and mystical atmosphere of the scene.","model_id": "nano-banana-pro","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 Name | Parameter | Technical Description |
|---|---|---|
| Prompt | prompt | Describe in text how the image that need to be generated should appear. |
| Model | model_id | Model id |
| Aspect ratio | aspect_ratio | Select the aspect ratio |
