ModelsLab/Z Image Turbo Image To Image
z-image-turboZ-Image Turbo Model transform an existing image into a new version using a text prompt, rather than generating a picture from scratch. You upload a source image and then describe how you want it changed
API Endpoint URL
Base URL for all API requests to this endpoint.
https://modelslab.com/api/v6/images/img2img
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
{"init_image": "https://assets.modelslab.com/generations/6506705e-79a8-4c87-84ee-3450ea51b793.jpg","prompt": "Young woman in red Hanfu, intricate embroidery. Impeccable makeup, red floral forehead pattern. Elaborate high bun, golden phoenix headdress, red flowers, beads. Holds round folding fan with lady, trees, bird. Neon lightning-bolt lamp, bright yellow glow, above extended left palm. Soft-lit outdoor night background, silhouetted tiered pagoda, blurred colorful distant lights.","width": "1024","height": "1024","samples": "1","model_id": "z-image-turbo","strength": "0.7","guidance_scale": "3","enhance_prompt": true,"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 |
|---|---|---|
| Reference Image | init_image | Please upload the reference image you want to edit. |
| Prompt | prompt | Enter the text for the image you want to generate |
| Width | width | Max width supported is 1488 |
| Height | height | Max height supported is 1488 |
| Number of Images | samples | Number of images that can be generated in a single request Max samples - 2 |
| Model | model_id | Model selected for generating the image. Each model generate different image. |
| strength | strength | Prompt strength when using the initial image. 1.0 corresponds to full destruction of information in the initial image. Required range: 0.7 <= x <= 1 default- 0.7 |
| guidance_scale | guidance_scale | Guidance scale Required range: 1 <= x <= 10 |
| enhance_prompt | enhance_prompt | If true, the prompt will be enhanced for better results. Default is (true). |