---
title: "Create image from text - Z-Image"
method: POST
path: "/v1/ai/text-to-image/z-image"
tags: ["text-to-image"]
---

# Create image from text - Z-Image

`POST /v1/ai/text-to-image/z-image`

## Request

- Base URL: `https://api.magnific.com`
- URL: `https://api.magnific.com/v1/ai/text-to-image/z-image`
- Auth: API key in header `x-magnific-api-key`

Generate high-quality images from text descriptions using the Z-Image turbo model.

**Key Features:**
- Superior speed with turbo architecture
- High-quality image generation
- Flexible image size configuration
- Supports LoRA and ControlNet variants

**Best for:**
- Fast prototyping and iteration
- High-volume image generation
- Cost-effective production workloads

## Request body

- TtiziRequestContent
  - `prompt` string, required: Text description of the image you want to generate. **Tips:** - Be specific about visual details, composition, and style - Z-Image excels at fast, high-quality image generation - Works well with detailed scene descriptions **Examples:** - Simple: "A suited raccoon smoking a cigar" - Detailed: "A cyberpunk city street at night, neon signs reflecting on wet pavement, flying cars in the distance"
  - `webhook_url` string, uri: Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.
  - `image_size` 'square' | 'square_hd' | 'portrait_3_4' | 'portrait_9_16' | 'landscape_4_3' | 'landscape_16_9': The aspect ratio and size of the generated image. If not specified, defaults to `square_hd` (1024x1024). **Available sizes:** - `square`: 512x512 pixels - `square_hd`: 1024x1024 pixels (default) - `portrait_3_4`: 768x1024 pixels - `portrait_9_16`: 576x1024 pixels - `landscape_4_3`: 1024x768 pixels - `landscape_16_9`: 1024x576 pixels
  - `num_inference_steps` integer: The number of inference steps to perform. Higher values may produce more detailed images but take longer. For Z-Image turbo, 8 steps is recommended for optimal speed/quality balance.
  - `seed` integer: Random seed for reproducibility. Using the same seed with identical parameters produces the same image. Useful for iterating on a design or creating variations.
  - `output_format` 'jpeg' | 'png': The format of the generated image. - `png`: Lossless format, best for images with text or sharp edges - `jpeg`: Compressed format, smaller file size
  - `enable_safety_checker` boolean: Whether to enable the content safety checker. When enabled, the model filters potentially unsafe content.

## Response `200`

OK - The request has succeeded and the Z-Image process has started.

- GetStyleTransferTaskStatus200Response
  - `data` TaskDetail, required
    - `task_id` string, uuid, required: Task identifier
    - `status` 'CREATED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED', required: Task status
    - `generated` string[], required

## Other responses

- `400`: Bad Request - The server could not understand the request due to invalid syntax.
- `401`: Unauthorized - The client must authenticate itself to get the requested response.
- `500`: Internal Server Error - The server has encountered a situation it doesn't know how to handle.
- `503`: Service Unavailable

---

[API](https://skmtc.dev/magnific/apis/magnific-api.md) · [All operations](https://skmtc.dev/magnific/apis/magnific-api/llms.txt) · [OpenAPI document](https://skmtc.dev/magnific/apis/magnific-api/revisions/60711fb082c7?raw)
