> ## Documentation Index
> Fetch the complete documentation index at: https://studio-docs.thezet.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Z-Image Turbo

> 빠르고 부담 없는 이미지 모델이에요

| 항목 | 내용 |
| - | - |
| 모델 ID | `z-image-turbo` |
| 종류 | 이미지 |
| 만든 곳 | Alibaba |
| 최대 해상도 | 1K |

## 입력

| 필드 | 설명 |
| - | - |
| `prompt` | 필수 |

## 옵션

`params`에 넣어요. 빼면 기본값을 쓰고, 표에 없는 값은 400으로 거절해요.

| 키 | 뜻 | 기본값 | 값 |
| - | - | - | - |
| `aspect` | 화면 비율 | `1:1` | `1:1`, `16:9`, `9:16`, `4:3`, `3:4` |
| `count` | 개수 | `1` | 1\~4 |

## 가격

옵션에 따라 달라져요. 보내기 전에 [`POST /estimate`](https://studio-docs.thezet.io/pricing)로 정확한 금액을 확인할 수 있고, 전체 가격표는 [가격 페이지](https://studio.thezet.io/pricing)에 있어요.

## 예시

```bash cURL theme={null}
curl -X POST https://api.studio.thezet.io/v1/generations \
  -H "Authorization: Bearer $ZET_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "z-image-turbo",
  "prompt": "A red paper boat on a calm lake, soft morning light",
  "params": {
    "aspect": "1:1"
  }
}'
```

```typescript TypeScript theme={null}
const API = "https://api.studio.thezet.io/v1";
const headers = { Authorization: `Bearer ${process.env.ZET_API_KEY}` };

// 다시 시도할 때 같은 키를 보내면 두 번 청구되지 않아요.
const started = await fetch(`${API}/generations`, {
  method: "POST",
  headers: { ...headers, "Content-Type": "application/json", "Idempotency-Key": crypto.randomUUID() },
  body: JSON.stringify({
    "model": "z-image-turbo",
    "prompt": "A red paper boat on a calm lake, soft morning light",
    "params": {
      "aspect": "1:1"
    }
  }),
});
let job = await started.json();
if (!started.ok) throw new Error(job.error.message);

while (!job.terminal) {
  await new Promise((resolve) => setTimeout(resolve, 3000));
  job = await (await fetch(`${API}/generations/${job.id}`, { headers })).json();
}
console.log(job.status === "succeeded" ? job.outputs[0].url : job.error);
```

```python Python theme={null}
import os, time, uuid
import requests

API = "https://api.studio.thezet.io/v1"
headers = {"Authorization": f"Bearer {os.environ['ZET_API_KEY']}"}

# 다시 시도할 때 같은 키를 보내면 두 번 청구되지 않아요.
started = requests.post(
    f"{API}/generations",
    headers={**headers, "Idempotency-Key": str(uuid.uuid4())},
    json={
        "model": "z-image-turbo",
        "prompt": "A red paper boat on a calm lake, soft morning light",
        "params": {
            "aspect": "1:1"
        }
    },
)
job = started.json()
if not started.ok:
    raise RuntimeError(job["error"]["message"])

while not job["terminal"]:
    time.sleep(3)
    job = requests.get(f"{API}/generations/{job['id']}", headers=headers).json()

print(job["outputs"][0]["url"] if job["status"] == "succeeded" else job["error"])
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.