快马AI接口文档
    • 快马API接口
    • 新手体验教程
    • Gemini各模型能力说明
    • ⌨️接口用例
    • 🍌生图用例
      • 宣传海报
      • 代码名片
      • 复古BP机
      • 巨型狗狗
      • 城市宣传【使用参考图】
      • -
    • 常见问题
      • 图片里无法生成中文怎么办
      • 联系客服
    • Gemini聊天【也可以生成图片】
      POST
    • 【流式】Gemini聊天
      POST
    • ChatGPT聊天
      POST
    • ChatGPT文生图 暂不支持
      POST
    • ChatGPT图生图 暂不支持
      POST
    • ChatGPT补全
      POST

      ChatGPT聊天

      POST
      /v1/chat/completions

      请求参数

      Header 参数

      Body 参数application/json必填

      示例
      {
        "model": "gpt-5.4",
        "messages": [
          {
            "role": "user",
            "content": [
              {
                "type": "input_text",
                "text": "给图派。是矿养团对段感。选花些。",
              },
              {
                "type": "input_image",
                "image_url": {
                  "url": "https://gummy-singing.org/xxx.jpeg"
                }
              }
            ]
          }
        ],
        "stream": true,
        "tools": [
          {
            "type": "function",
            "function": {
              "name": "get_current_weather",
              "description": "Get the current weather in a given location",
              "parameters": {
                "type": "object",
                "properties": {
                  "location": {
                    "type": "string",
                    "description": "The city and state, e.g. San Francisco, CA"
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "celsius",
                      "fahrenheit"
                    ]
                  }
                },
                "required": [
                  "location"
                ]
              }
            }
          },
          {
            "type": "function",
            "function": {
              "name": "get_current_weather",
              "description": "Get the current weather in a given location",
              "parameters": {
                "type": "object",
                "properties": {
                  "location": {
                    "type": "string",
                    "description": "The city and state, e.g. San Francisco, CA"
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "celsius",
                      "fahrenheit"
                    ]
                  }
                },
                "required": [
                  "location"
                ]
              }
            }
          }
        ],
        "tool_choice": "auto"
      }

      请求示例代码

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      请求示例请求示例
      Shell
      JavaScript
      Java
      Swift
      curl --location 'https://ai.szkmjb.com/v1/chat/completions' \
      --header 'Authorization: Bearer {{API_KEY}}' \
      --header 'Authorization: Bearer {{API_KEY}}' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "gpt-5.4",
        "messages": [
          {
            "role": "user",
            "content": [
              {
                "type": "input_text",
                "text": "给图派。是矿养团对段感。选花些。",
              },
              {
                "type": "input_image",
                "image_url": {
                  "url": "https://gummy-singing.org/xxx.jpeg"
                }
              }
            ]
          }
        ],
        "stream": true,
        "tools": [
          {
            "type": "function",
            "function": {
              "name": "get_current_weather",
              "description": "Get the current weather in a given location",
              "parameters": {
                "type": "object",
                "properties": {
                  "location": {
                    "type": "string",
                    "description": "The city and state, e.g. San Francisco, CA"
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "celsius",
                      "fahrenheit"
                    ]
                  }
                },
                "required": [
                  "location"
                ]
              }
            }
          },
          {
            "type": "function",
            "function": {
              "name": "get_current_weather",
              "description": "Get the current weather in a given location",
              "parameters": {
                "type": "object",
                "properties": {
                  "location": {
                    "type": "string",
                    "description": "The city and state, e.g. San Francisco, CA"
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "celsius",
                      "fahrenheit"
                    ]
                  }
                },
                "required": [
                  "location"
                ]
              }
            }
          }
        ],
        "tool_choice": "auto"
      }'

      返回响应

      🟢200成功
      application/json
      Bodyapplication/json

      示例
      {}
      修改于 2026-05-12 09:16:49
      上一页
      【流式】Gemini聊天
      下一页
      ChatGPT文生图 暂不支持
      Built with