Chat GPT
收藏数据集概述:Chat GPT API
基本信息
- API名称: Chat GPT
- 类别: Artificial Intelligence/Machine Learning
- 子类别: Chat GPT
- API提供者: Swift API
- 订阅者数量: 2420
- API评分: 9.9 Popularity
- 服务等级: 100% Service Level
- 延迟: 2661ms
- 测试通过率: 86%
订阅计划
- BASIC: $0.00 / mo
- PRO: $5.00 / mo
- ULTRA: $25.00 / mo
- MEGA: $50.00 / mo
API版本
- 当前版本: v1
功能概述
- 模型: GPT-4.1 (2025 OpenAI模型)
- 特点:
- 改进的推理和准确性
- 更快的响应时间
- 更低的每次调用成本
- 高可用性: 支持无限调用
端点
- POST /Chat Completion: 用于聊天补全任务。
主要功能
-
聊天补全:
- 输入: 消息列表
- 输出: 模型生成的消息
- 支持单轮和多轮对话任务。
-
函数调用:
- 允许模型智能选择输出JSON对象,包含调用函数的参数。
- 支持多种用例,如调用外部API、自然语言转API调用、结构化数据提取等。
示例
聊天补全示例
json { "messages": [ { "role": "user", "content": "Hello" }, { "role": "assistant", "content": "Hi, How can I assist you?" }, { "role": "user", "content": "What is the result of 5 + 5?" } ] }
函数调用示例
-
步骤1: 调用模型 json { "messages": [ {"role": "user", "content": "What is the weather like in Boston?"} ], "functions": [ { "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"] } } ] }
-
步骤2: 调用API json { "temperature": 22, "unit": "celsius", "description": "Sunny" }
-
步骤3: 模型总结 json { "messages": [ {"role": "user", "content": "What is the weather like in Boston?"}, {"role": "assistant", "content": null, "function_call": {"name": "get_current_weather", "arguments": "{ "location": "Boston, MA"}"}}, {"role": "function", "name": "get_current_weather", "content": "{"temperature": "22", "unit": "celsius", "description": "Sunny"}"} ], "functions": [ { "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"] } } ] }
提供者信息
- API创建者: Swift API
- 资源:



