{
"type": "message",
"content": [
{
"type": "text",
"text": "<string>",
"citations": [
{
"type": "web_search_result_location",
"cited_text": "<string>",
"url": "<string>",
"title": "<string>",
"encrypted_index": "<string>"
}
]
}
],
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"iterations": [
{
"type": "compaction",
"input_tokens": 123,
"output_tokens": 123
}
]
},
"id": "<string>",
"role": "assistant",
"model": "<string>",
"stop_reason": "<string>",
"stop_sequence": "<string>",
"container": {
"expires_at": "<string>",
"id": "<string>",
"skills": [
{
"type": "anthropic",
"skill_id": "<string>",
"version": "<string>"
}
]
},
"context_management": {
"applied_edits": [
"<unknown>"
]
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}Anthropic Messages
Create a message
Create a message using the Anthropic-compatible API. Supports tool use and sseStreaming.
POST
/
anthropic
/
v1
/
messages
{
"type": "message",
"content": [
{
"type": "text",
"text": "<string>",
"citations": [
{
"type": "web_search_result_location",
"cited_text": "<string>",
"url": "<string>",
"title": "<string>",
"encrypted_index": "<string>"
}
]
}
],
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"iterations": [
{
"type": "compaction",
"input_tokens": 123,
"output_tokens": 123
}
]
},
"id": "<string>",
"role": "assistant",
"model": "<string>",
"stop_reason": "<string>",
"stop_sequence": "<string>",
"container": {
"expires_at": "<string>",
"id": "<string>",
"skills": [
{
"type": "anthropic",
"skill_id": "<string>",
"version": "<string>"
}
]
},
"context_management": {
"applied_edits": [
"<unknown>"
]
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}Otorisasi
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Minimum array length:
1Show child attributes
Show child attributes
Rentang yang diperlukan:
0 <= x <= 1Rentang yang diperlukan:
0 <= x <= 1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Opsi yang tersedia:
low, medium, high, max Opsi yang tersedia:
fast, standard Show child attributes
Show child attributes
Show child attributes
Show child attributes
Respons
Successful response or SSE stream
Allowed value:
"message"- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Opsi yang tersedia:
assistant, null Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I