Adam API
  1. 聊天模型
Adam API
  • 聊天模型
    • 聊天接口
      POST
    • gpt-4-all(分析图片)
      POST
    • gpt-4-all(生成图片)
      POST
    • gpt-4v测试
      POST
    • midjourney
      POST
    • gpts
      POST
    • gpt-4-vision-preview
      POST
    • mj-chat
      POST
  • 模型
    • 列出模型
      GET
  • 自动补全接口
    • 内容补全接口
      POST
  • 图像接口
    • 创建图像
      POST
  • 向量生成
    • 创建嵌入
      POST
  • 音频接入
    • TTS文本转语音
      POST
    • 创建转录
      POST
    • 创建翻译
      GET
  • 查询接口
    • 获取总额度
      GET
    • 获取使用的额度
      GET
    • 根据key查询使用日志
      GET
  1. 聊天模型

gpt-4-vision-preview

POST
https://api.adamchatbot.chat/v1/chat/completions

请求参数

Header 参数

Body 参数application/json

示例
{
  "model": "gpt-4-vision-preview",
  "stream": false,
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "这张图片有什么"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://github.com/dianping/cat/raw/master/cat-home/src/main/webapp/images/logo/cat_logo03.png"
          }
        }
      ]
    }
  ],
  "max_tokens": 400
}

请求示例代码

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://api.adamchatbot.chat/v1/chat/completions' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "gpt-4-vision-preview",
  "stream": false,
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "这张图片有什么"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://github.com/dianping/cat/raw/master/cat-home/src/main/webapp/images/logo/cat_logo03.png"
          }
        }
      ]
    }
  ],
  "max_tokens": 400
}'

返回响应

🟢200成功
application/json
Body

示例
{
    "id": "string",
    "object": "string",
    "created": 0,
    "model": "string",
    "usage": {
        "prompt_tokens": 0,
        "completion_tokens": 0,
        "total_tokens": 0
    },
    "choices": [
        {
            "message": {
                "role": "string",
                "content": "string"
            },
            "finish_reason": "string",
            "index": 0
        }
    ]
}
修改于 2024-01-29 11:46:04
上一页
gpts
下一页
mj-chat
Built with