Skip to content

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/messages

Authentication

Bearer auth works:

http
Authorization: Bearer sk_your_key_here

Anthropic-style headers are also accepted by the route:

http
x-api-key: sk_your_key_here
anthropic-version: 2023-06-01

Request

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

TopicBehavior
modelUse an exact model ID available to your account.
messagesAnthropic-style messages are converted internally.
ImagesImage blocks are converted when the selected model supports vision input.
StreamingAnthropic-style streaming is supported when requested by the client.
Tool useTool 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.

API documentation for rout.my.