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

# 图像生成

使用你的 API Key 调用 POST /v1/images/generations。请将 model 替换为「模型」页面展示的生图模型 ID。

```bash theme={null}
curl https://api.cloudsome-inc.ai/v1/images/generations \
  -H "Authorization: Bearer sk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "YOUR_IMAGE_MODEL_ID",
    "prompt": "A futuristic city floating above a sea of clouds",
    "n": 1,
    "resolution": "1080P",
    "ratio": "1:1",
    "response_format": "url"
  }'
```

常用参数：model 和 prompt 为必填项；n 控制生成数量；resolution 和 ratio 控制输出尺寸；response\_format 可选择返回 url 或 b64\_json。

> 你也可以传入所选模型上游接口支持的其他参数。扩展参数的名称、取值和限制因模型而异，请参考该模型对应上游服务商的原始文档。


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