Generate an Image

了解如何使用 VTSTG233-API 生成图像。

根据文本提示生成图像。

post

使用模型根据提示生成图像,通常利用 DALL-E 等生成式 AI 模型从文本描述进行图像合成。

请求体
any of可选
one of可选
响应
post
/images/generations
POST /images/generations HTTP/1.1
Host: api.aimlapi.com
Content-Type: application/json
Accept: */*
Content-Length: 142

{
  "provider": "openai",
  "prompt": "text",
  "model": "dall-e-2",
  "n": 1,
  "quality": "standard",
  "response_format": "url",
  "size": "1024x1024",
  "style": "vivid"
}
201成功
{
  "created": 1,
  "data": [
    {
      "b64_json": "text",
      "revised_prompt": "text",
      "url": "text"
    }
  ]
}

最后更新于