Skip to main content

Base URL

Quick setup

Do not use your Anthropic API key. The gateway authenticates with MetrixLLM keys (sk-metrix-* prefix), then uses its own provider keys (or your BYOK keys) to call Anthropic.

Request Headers

Every request supports these headers for authentication, tracing, and metadata: Session Tracing Custom Properties Attach up to 10 custom metadata properties per request: Example: metrix-property-team: engineering, metrix-property-environment: production IP Detection

Supported models

Routing mode

Control how the gateway authenticates with Anthropic using the mode parameter:
When mode is omitted (or "auto"), the gateway prefers your BYOK key if one is configured. If your workspace has insufficient credits and you have a BYOK key, the gateway automatically uses it instead of failing with a payment error.

Web search mode (default)

Add "web_search": true to your request. The gateway performs a web search, generates optimized search queries, and injects the results into your system prompt.
Parameters:

Native mode

Set "web_search": "native" to use Anthropic’s built-in web search. The gateway adds the web_search_20250305 tool to your request.
Native-specific parameters:
In native mode, Anthropic handles search internally using its own web_search_20250305 tool. The gateway adds this tool to your tools array automatically — you don’t need to define it yourself.

Extended thinking

Claude supports extended thinking for complex reasoning tasks:

Tool use

Streaming

Prompt management

Reference a stored prompt template by ID:

Custom properties

Attach metadata for analytics and rate limit targeting:

Response headers

Every response includes these headers: On cache HIT responses, only Content-Type and X-Metrix-Cache-Status: HIT are returned. On rate limited responses (429 Too Many Requests):