/v1/messages endpoint provides direct compatibility with the native Anthropic Messages API. If your codebase or agentic framework is built around the @anthropic-ai/sdk (Node.js) or anthropic (Python) SDKs, you can connect directly to Routeway by changing only the base_url and API key.
Quickstart
- Python (Anthropic SDK)
- Node.js (Anthropic SDK)
- cURL
Request Parameters
Streaming
Streaming responses use Anthropic’s native Server-Sent Events (SSE) event types (message_start, content_block_delta, message_delta, message_stop):
Automatic Prompt Caching
Routeway automatically attachescache_control breakpoints to long Claude prompts and messages that exceed the 2,048 token threshold, saving up to 90% on input costs without manual configuration. Learn more in Prompt Caching.