> ## Documentation Index
> Fetch the complete documentation index at: https://doc.xihuyun.com.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 图像生成 Images

> 文本生成图像接口

**POST** `/v1/images/generations`

## 请求参数

| 参数                | 类型      | 必填 | 说明                         |
| ----------------- | ------- | -- | -------------------------- |
| `model`           | string  | 是  | 如 `dall-e-3`、`gpt-image-1` |
| `prompt`          | string  | 是  | 图像描述                       |
| `n`               | integer | 否  | 生成数量                       |
| `size`            | string  | 否  | `1024x1024`、`1792x1024` 等  |
| `quality`         | string  | 否  | `standard` 或 `hd`          |
| `response_format` | string  | 否  | `url` 或 `b64_json`         |

## 示例

```bash theme={null}
curl https://your-domain.com/v1/images/generations \
  -H "Authorization: Bearer sk-xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dall-e-3",
    "prompt": "一只在月球上的猫",
    "size": "1024x1024"
  }'
```
