ChatPlus API
  1. ChatPlus API
ChatPlus API
  • 发送测试请求
  • HTTP状态码含义
  • ChatPlus API
    • 文字对话聊天
      POST
    • 文字转换语音
      POST
    • 语音转换文字
      POST
    • 语音翻译英文
      POST
    • 文字转换图片
      POST
    • 图片内容识别
      POST
    • gpt-4逆向画图
      POST
    • 谷歌gemini-pro
      POST
    • SunoAI音乐生成
      POST
    • Midjourney绘图
      POST
    • Midjourney查询
      POST
  1. ChatPlus API

文字转换图片

POST
/v1/images/generations
根据提示信息模型将生成新图像。
支持的模型:dall-e-2、dall-e-3

请求参数

Header 参数

Body 参数application/json

示例
{
  "model": "dall-e-3",
  "prompt": "puppy dog, catching butterflies, garden",
  "n": 1,
  "size": "1024x1024",
  "response_format": "url"
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://chatplusapi.cn/v1/images/generations' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "dall-e-3",
  "prompt": "puppy dog, catching butterflies, garden",
  "n": 1,
  "size": "1024x1024",
  "response_format": "url"
}'

返回响应

🟢200成功
application/json
Body

示例
{
    "created": 1715096616,
    "data": [
        {
            "revised_prompt": "A playful puppy dog in a lush garden, actively leaping towards colorful butterflies fluttering around. The scene captures the puppy in mid-jump, with its eyes fixed on a butterfly. The garden is vibrant with various flowers like roses and daisies, and the sun casts soft shadows on the green grass. The atmosphere is cheerful and lively, embodying a warm, sunny day.",
            "url": "https://filesystem.site/cdn/20240507/hI9c5Bt2skBMyiuFgacvQZ9rQDYU2f.webp"
        }
    ]
}
🟠403失败
修改于 2024-05-10 20:56:13
上一页
语音翻译英文
下一页
图片内容识别
Built with