curl --request POST \
--url https://api.omniall.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'anthropic-version: <anthropic-version>' \
--data '
{
"model": "claude-sonnet-4",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Hello, Claude"
}
]
}
'{
"id": "<string>",
"type": "message",
"role": "assistant",
"model": "<string>",
"content": [
{
"type": "<string>",
"text": "<string>",
"name": "<string>",
"input": {}
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 123,
"output_tokens": 123
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "无效的令牌 (request id: ...)",
"type": "new_api_error",
"code": ""
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}Claude Messages
Anthropic Messages API relayed by Omniall AI.
Base path: POST https://api.omniall.ai/v1/messages
Send anthropic-version (recommended: 2023-06-01). Auth via Authorization: Bearer sk-... or x-api-key.
Scenarios
- Vision: image content blocks
- Documents:
documentblocks (PDF) - Web search: server tool
web_search_*when enabled for the model/channel - Agent: Claude
tools+tool_choice - Thinking:
thinking: { type: enabled, budget_tokens }
Official reference: https://docs.anthropic.com/en/api/messages
curl --request POST \
--url https://api.omniall.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'anthropic-version: <anthropic-version>' \
--data '
{
"model": "claude-sonnet-4",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Hello, Claude"
}
]
}
'{
"id": "<string>",
"type": "message",
"role": "assistant",
"model": "<string>",
"content": [
{
"type": "<string>",
"text": "<string>",
"name": "<string>",
"input": {}
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 123,
"output_tokens": 123
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "无效的令牌 (request id: ...)",
"type": "new_api_error",
"code": ""
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}Authorizations
Use Authorization: Bearer sk-... from https://omniall.ai/dashboard
Headers
Anthropic API version header.
"2023-06-01"
Optional Anthropic-style key (also accepted as Bearer).
Body
Anthropic Messages request (POST /v1/messages). model, messages, and max_tokens are required.
Claude model id from Model Square.
"claude-sonnet-4"
Conversation turns with roles user / assistant. Content may be a string or content blocks (text, image, document, tool_use, tool_result).
Show child attributes
Show child attributes
Maximum tokens Claude may generate. Required by Anthropic; also acts as a cost/latency control.
x >= 1System prompt (string or content blocks). Sets overall behavior.
Randomness (0–1 for Claude).
0 <= x <= 1Nucleus sampling.
Top-K sampling.
If true, stream SSE events.
Custom stop strings.
Claude tools: custom tools and/or server tools such as web_search when enabled for the model/channel.
Tool selection policy.
Show child attributes
Show child attributes
Extended thinking controls.
Show child attributes
Show child attributes
MCP server definitions when using Claude MCP features.
Request metadata passthrough.
Context management options (provider-specific).
Output configuration (e.g. effort), when supported.
Structured output format controls.
Prompt caching controls when supported.
Response
Claude message response (or SSE stream).
Anthropic Messages response.
Message id.
Usually message.
"message"
Usually assistant.
"assistant"
Model used.
Content blocks (text, tool_use, etc.). Concatenate text blocks for the visible answer.
Show child attributes
Show child attributes
Why Claude stopped: end_turn, max_tokens, stop_sequence, tool_use, etc.
end_turn, max_tokens, stop_sequence, tool_use Token usage.
Show child attributes
Show child attributes