Anthropic-compatible API
rout.my exposes an Anthropic Messages-compatible endpoint for clients that send Anthropic request shapes.
text
POST https://api.rout.my/v1/messages
POST https://api.rout.my/anthropic/v1/messagesAuthentication
Bearer auth works:
http
Authorization: Bearer sk_your_key_hereAnthropic-style headers are also accepted by the route:
http
x-api-key: sk_your_key_here
anthropic-version: 2023-06-01Request
bash
curl https://api.rout.my/v1/messages \
-H "x-api-key: $ROUTMY_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "provider/model-id",
"max_tokens": 256,
"messages": [
{ "role": "user", "content": "Write one short sentence." }
]
}'Notes
| Topic | Behavior |
|---|---|
model | Use an exact model ID available to your account. |
messages | Anthropic-style messages are converted internally. |
| Images | Image blocks are converted when the selected model supports vision input. |
| Streaming | Anthropic-style streaming is supported when requested by the client. |
| Tool use | Tool fields are translated where compatible with the selected provider. |
Use this route when a client specifically expects Anthropic Messages. For OpenAI-compatible SDKs, prefer /v1/chat/completions.