claude-opus-4-6
claude-opus-4-6
पाठClaudeClaudeclaude-opus-4-6
Claude Opus 4.6 是更强的高阶推理模型,适合复杂业务决策、深度研究报告、跨文档综合分析、复杂代码工程和高要求内容生成。相比轻量模型,它更适合处理需要稳定推理深度和结果质量的任务。
प्रमाणीकरण
- Base URL
https://api.dreamtoai.com- Authorization
Authorization: Bearer YOUR_API_KEY- Content-Type
application/json- मॉडल नाम (model)
claude-opus-4-6
इंटीग्रेशन प्रोटोकॉल
यह प्रोटोकॉल क्यों चुनें
适合原本使用 Claude SDK 或 Anthropic Messages API 的用户直接迁移。
एंडपॉइंट URL
POST/v1/messages
Authorization: Bearer YOUR_API_KEYContent-Type: application/jsonanthropic-version: 2023-06-01रिक्वेस्ट / रिस्पॉन्स JSON
रिक्वेस्ट
{
"model": "claude-opus-4-6",
"max_tokens": 4096,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "你好,世界"
}
]
}
]
}प्रतिक्रिया
{
"id": "msg_example",
"type": "message",
"role": "assistant",
"model": "claude-opus-4-6",
"content": [
{
"type": "text",
"text": "Hello from Mix API"
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 8,
"output_tokens": 16
}
}रिक्वेस्ट / रिस्पॉन्स फ़ील्ड
रिक्वेस्ट फ़ील्ड
| फ़ील्ड | प्रकार | आवश्यक |
|---|---|---|
| model | string | Y |
| max_tokens | integer | Y |
| messages | array | Y |
| messages[] | object | Y |
| messages[].role | string | Y |
| messages[].content | array | Y |
| messages[].content[] | object | Y |
| messages[].content[].type | string | Y |
| messages[].content[].text | string | Y |
रिस्पॉन्स फ़ील्ड
| फ़ील्ड | प्रकार | आवश्यक |
|---|---|---|
| output.text | string | N |
कोड उदाहरण
cURLrequest.sh
curl -X POST "https://api.dreamtoai.com/v1/messages" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-opus-4-6",
"max_tokens": 4096,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "你好,世界"
}
]
}
]
}'