> ## 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.