Anthropic Messages API
Use the Anthropic-compatible Messages request, response, tools, and streaming events supported by CHUA ONE.
POST /v1/messages
curl 'https://chuaone.si/v1/messages' \
-H "x-api-key: $CHUA_API_KEY" \
-H 'anthropic-version: 2023-06-01' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: YOUR_UNIQUE_REQUEST_ID' \
-d '{"model":"YOUR_ALLOWED_MODEL","max_tokens":256,"messages":[{"role":"user","content":"Hello"}]}'Headers and fields
x-api-key- Accepted instead of Authorization Bearer.
anthropic-version- Required header.
messages- Required non-empty array. Text, image, tool_use, and tool_result content are supported within the documented role constraints.
max_tokens- Required integer 1–131,072 and within model limits.
stop_sequences / service_tier- Not supported.
Response
Non-streaming responses contain content blocks, stop_reason, and usage. Streaming uses message_start, content block events, message_delta, and message_stop. Errors use the Anthropic-compatible error envelope.