返回首页
DeepClaude Logo

DeepClaude Pro API 文档

集成DeepClaude的强大AI能力,通过一个简单灵活的统一API。

基础 URL (Base URL)

托管 API

使用我们的托管 API 端点进行最快的设置:

https://deepclaudepro.com/

本地部署

对于本地部署,在 config.toml 中配置您的端点:

http://{host}:{port}/

默认配置:

  • host: 127.0.0.1
  • port: 3000

认证 (Authentication)

复制远程访问密钥,将它作为访问密钥

错误响应 (Error Responses)

当发生错误时,API 返回适当的 HTTP 状态代码和 JSON 响应体,其中包含错误详细信息:

{
  "error": {
    "message": string,    // 人类可读的错误消息
    "type": string,       // 错误类型标识符
    "param": string?,     // 导致错误的可选参数
    "code": string?       // 可选错误代码
  }
}

Common Error Types

400bad_request

请求参数无效或格式错误

400missing_header

缺少必需的 API 令牌头

400invalid_system_prompt

系统提示在根和消息中提供

502deepseek_error

DeepSeek API 错误

502anthropic_error

Anthropic API 错误

500internal_error

内部服务器错误

非流式 API 请求方式

发送一个请求并接收一个完整的响应。这对于不需要实时更新的简单查询非常有用。

curl -X POST "https://deepclaudepro.com/v1/chat/completions"   -H "Authorization: Bearer dp-Fr6tdRjT5TzMV3WAD(复制的dp开头密钥)"   -H "Content-Type: application/json"   -d '{
    "model": "deepclaude",
    "messages": [
        {"role": "user", "content": "你是谁"}
    ]
}'
{
	"id": "ac331c5a-d9a6-493a-b907-ca62f84974f9",
	"object": "chat.completion",
	"created": 1743756102,
	"model": "deepseek-ai/DeepSeek-R1_deepseek-ai/DeepSeek-V3",
	"choices": [{
		"index": 0,
		"message": {
			"role": "assistant",
			"content": "您好!我是DeepSeek-R1,一个由深度求索(DeepSeek)公司打造的AI助手。我可以回答各种问题、提供信息帮助、协助创作或学习等。如果有任何需要,随时告诉我哦!😊",
			"reasoning_content": "您好!我是由中国的深度求索(DeepSeek)公司开发的智能助手DeepSeek-R1。如您有任何任何问题,我会尽我所能为您提供帮助。"
		},
		"finish_reason": "stop"
	}],
	"usage": {
		"prompt_tokens": 46,
		"completion_tokens": 50,
		"total_tokens": 96
	}
}

流式 API 请求方式

接收实时生成的响应。非常适合聊天界面和实时交互。

流式功能由服务器发送事件(SSE)提供支持,实现高效的服务器到客户端实时数据传输。 了解更多关于 SSE →

curl -X POST "https://deepclaudepro.com/v1/chat/completions"   -H "Authorization: Bearer dp-Fr6tdRjT5Tz(复制的dp开头密钥)"   -H "Content-Type: application/json"   -d '{
    "model": "deepclaude",
    "messages": [
        {"role": "user", "content": "你是谁"}
    ],
    "stream": true
}'
event: start
data{
	"choices": [{
		"content_filter_results": {
			"hate": {
				"filtered": false
			},
			"self_harm": {
				"filtered": false
			},
			"sexual": {
				"filtered": false
			},
			"violence": {
				"filtered": false
			}
		},
		"delta": {},
		"finish_reason": "stop",
		"index": 0
	}],
	"created": 1743776618,
	"id": "6c57b1ab-d98d-44bf-830c-2f72a3cacdb4",
	"model": "deepseek-ai/DeepSeek-V3",
	"object": "chat.completion.chunk",
	"system_fingerprint": "",
	"usage": {
		"completion_tokens": 115,
		"prompt_tokens": 0,
		"total_tokens": 115
	}
}

data: [DONE]