API接口文档
  1. Anthropic原生格式
API接口文档
  • JuheNext
  • OpenAI兼容格式
    • 普通对话
      POST
    • 识图模型
      POST
    • 流式输出
      POST
    • 结构化输出
      POST
    • Fouctions调用
      POST
    • 嵌入模型
      POST
    • 审查模型
      POST
    • tts文本转语音
      POST
    • 文生图(绘图格式)
      POST
    • 图生图(绘图格式)
      POST
    • 图生图(对话格式)
      POST
    • 文生图(对话格式)
      POST
    • 新response端点o3-pro
      POST
    • Gemini视频识别
      POST
    • GeminiPDF文件识别
      POST
  • Gemini原生格式
    • 普通对话
      POST
    • 图像生成
      POST
    • 音频生成
      POST
    • 结构化输出
      POST
    • 思考设置
      POST
    • 函数调用
      POST
    • PDF文件识别
      POST
    • 图像识别
      POST
    • 视频识别
      POST
    • 流式响应
      POST
  • Anthropic原生格式
    • 普通对话
      POST
    • 图像识别
      POST
    • 函数调用
      POST
    • Web search tool
      POST
  • Midjourney绘图
    • 任务提交
      • 文生图 - Imagine
      • 关联按钮动作 - Action
      • 图生文 - Describe
      • 图像混合 - Blend
      • 局部重绘 - Modal
    • 任务查询
      • 多任务查询 - ListByCondition
      • 单任务查询 - FetchFromTask
      • Seed查询 - ImageSeed
  • 列出支持的模型
    GET
  1. Anthropic原生格式

函数调用

POST
https://api.juheai.top/v1/messages

请求参数

Header 参数

Body 参数application/json

示例
{
    "model": "claude-3-7-sonnet-20250219",
    "max_tokens": 1024,
    "messages": [
        {
            "role": "user",
            "content": "查一下加利福尼亚·洛杉矶今天的天气?"
        }
    ],
    "tools": [
        {
            "description": "Get the current weather in a given location",
            "input_schema": {
                "properties": {
                    "location": {
                        "description": "The city and state, e.g. San Francisco, CA",
                        "type": "string"
                    },
                    "unit": {
                        "description": "Unit for the output - one of (celsius, fahrenheit)",
                        "type": "string"
                    }
                },
                "required": [
                    "location"
                ],
                "type": "object"
            },
            "name": "get_weather"
        }
    ]
}

示例代码

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.juheai.top/v1/messages' \
--header 'x-api-key;' \
--header 'anthropic-version: 2023-06-01' \
--header 'content-type: application/json' \
--data-raw '{
    "model": "claude-3-7-sonnet-20250219",
    "max_tokens": 1024,
    "messages": [
        {
            "role": "user",
            "content": "查一下加利福尼亚·洛杉矶今天的天气?"
        }
    ],
    "tools": [
        {
            "description": "Get the current weather in a given location",
            "input_schema": {
                "properties": {
                    "location": {
                        "description": "The city and state, e.g. San Francisco, CA",
                        "type": "string"
                    },
                    "unit": {
                        "description": "Unit for the output - one of (celsius, fahrenheit)",
                        "type": "string"
                    }
                },
                "required": [
                    "location"
                ],
                "type": "object"
            },
            "name": "get_weather"
        }
    ]
}'

返回响应

🟢200成功
application/json
Body

示例
{}
修改于 2025-07-12 13:19:47
上一页
图像识别
下一页
Web search tool
Built with