Skip to main content
POST
Create image
本頁使用與 建立圖像 相同的 images/generations 操作,上方 playground 已預先填入通用的 OpenAI 風格圖像結構(promptmodelsize 等)。以下說明 wanx-v1 類模型的 Qwen 專用請求格式。
Qwen 圖像模型接受另一種請求格式:將 prompt 包在 input.messages 中,而不是使用頂層 prompt 欄位。若要使用這種格式,請在 playground 的請求本文中同時提供 modelinput

Qwen 專用請求欄位

與 playground 中顯示的標準 promptsizequality 欄位不同,Qwen 的 wanx-v1 模型會從 input.messages[].content 讀取 prompt。像 nresponse_format 這類其他頂層欄位,並不適用於此格式。

範例:生成圖像

回應欄位

回應遵循標準圖像生成結構:
integer
建立時間戳。
array
生成圖像條目。

回應範例

200

授權

Authorization
string
header
必填

Your DGrid API key. All endpoints use Authorization: Bearer <DGRID_API_KEY>.

主體

application/json
prompt
string
必填

Image prompt.

model
string
預設值:dall-e-2

Model such as dall-e-2 or dall-e-3.

n
integer
預設值:1

Number of images to generate.

quality
enum<string>
預設值:standard
可用選項:
standard,
hd
response_format
enum<string>
預設值:url
可用選項:
url,
b64_json
size
string
預設值:1024x1024

Output size.

style
enum<string>
預設值:vivid
可用選項:
vivid,
natural
user
string

End-user identifier.

回應

Generated images.

created
integer

Creation timestamp.

data
object[]

Generated image entries.

usage
object