claude-opus-4-7-aws
claude-opus-4-7-aws
TextClaudeClaude AWSclaude-opus-4-7-aws
AWS官方版本,服务稳定
Authentifizierung
- Base URL
https://api.dreamtoai.com- Authorization
Authorization: Bearer YOUR_API_KEY- Content-Type
application/json- Modellname (model)
claude-opus-4-7-aws
Integrationsprotokoll
Warum dieses Protokoll
适合原本使用 Claude SDK 或 Anthropic Messages API 的用户直接迁移。
Endpunkt-URL
POST/v1/messages
Authorization: Bearer YOUR_API_KEYContent-Type: application/jsonanthropic-version: 2023-06-01Request- / Response-JSON
Anfrage
{
"model": "claude-opus-4-7-aws",
"max_tokens": 4096,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "你好,世界"
}
]
}
]
}Antwort
{
"id": "msg_example",
"type": "message",
"role": "assistant",
"model": "claude-opus-4-7-aws",
"content": [
{
"type": "text",
"text": "Hello from Mix API"
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 8,
"output_tokens": 16
}
}Request- / Response-Felder
Request-Felder
| Feld | Typ | Erforderlich |
|---|---|---|
| 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 |
Response-Felder
| Feld | Typ | Erforderlich |
|---|---|---|
| output.text | string | N |
Codebeispiele
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-7-aws",
"max_tokens": 4096,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "你好,世界"
}
]
}
]
}'