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 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","model_id": "imagen-4.0-ultra","aspect_ratio": "1:1","samples": "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 | Enter Prompt for image generation. Maximum input tokens: 480 tokens |
| Model | model_id | Model |
| Aspect Ratio | aspect_ratio | 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 |
| samples | samples | Number of images to generate (1-4) |
