> ## Documentation Index
> Fetch the complete documentation index at: https://metrion.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Proxy Endpoints

> Complete reference for Metrion's proxy endpoints.

Metrion acts as a transparent proxy between your application and AI providers. All proxy endpoints accept the same request body as the original provider API — Metrion forwards your request and returns the original response unchanged.

## Endpoints

| Provider           | Method | Endpoint                                                        | SDK base URL                                |
| ------------------ | ------ | --------------------------------------------------------------- | ------------------------------------------- |
| Anthropic (SDK)    | POST   | `https://www.metrion.dev/api/proxy/v1/messages`                 | `https://www.metrion.dev/api/proxy`         |
| Anthropic (direct) | POST   | `https://www.metrion.dev/api/proxy/messages`                    | — for curl / direct HTTP requests           |
| OpenAI             | POST   | `https://www.metrion.dev/api/proxy/openai/v1/chat/completions`  | `https://www.metrion.dev/api/proxy/openai`  |
| Google Gemini      | POST   | `https://www.metrion.dev/api/proxy/gemini/v1/chat/completions`  | `https://www.metrion.dev/api/proxy/gemini`  |
| Mistral            | POST   | `https://www.metrion.dev/api/proxy/mistral/v1/chat/completions` | `https://www.metrion.dev/api/proxy/mistral` |
| Grok (xAI)         | POST   | `https://www.metrion.dev/api/proxy/grok/v1/chat/completions`    | `https://www.metrion.dev/api/proxy/grok`    |

## Request body

Send the same request body you would send directly to the provider. Metrion does not modify your request payload.

```json theme={null}
// Anthropic example
{
  "model": "claude-opus-4-6",
  "max_tokens": 1024,
  "messages": [{ "role": "user", "content": "Hello" }]
}
```

```json theme={null}
// OpenAI-compatible example (OpenAI, Gemini, Mistral, Grok)
{
  "model": "gpt-4o",
  "messages": [{ "role": "user", "content": "Hello" }]
}
```

## Response body

<Note>
  The response body is identical to what the provider returns. Metrion only reads usage metadata (token counts, latency) from the response — it does not alter the response structure or content.
</Note>

## Streaming

Streaming is supported for all providers. Pass `stream: true` in the request body exactly as you would with the provider's API directly — no additional configuration is needed.

```json theme={null}
{
  "model": "gpt-4o",
  "stream": true,
  "messages": [{ "role": "user", "content": "Hello" }]
}
```

## Limits

| Parameter             | Value                                      |
| --------------------- | ------------------------------------------ |
| Rate limit            | 100 requests per minute, per Metrion token |
| Timeout               | 30 seconds                                 |
| Free plan monthly cap | 10,000 requests per month                  |

If you exceed the monthly cap on the Free plan, the proxy returns a `429 Too Many Requests` response. Your counter resets on the first of each month. To remove the monthly cap, upgrade to Pro.
