Anthropic offers 15 models through Lava’s AI Gateway, supporting Chat Completions (Native). Authentication uses x-api-key. See the Anthropic API docs for provider-specific parameters.
Supports both managed API keys (from Lava) and BYOK mode.
Quick Start
const response = await fetch('https://api.lavapayments.com/v1/forward?u=https%3A%2F%2Fapi.anthropic.com%2Fv1%2Fmessages', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': forwardToken,
'anthropic-version': '2023-06-01',
},
body: JSON.stringify({
model: 'claude-sonnet-4-6',
messages: [{ role: "user", content: "Hello!" }],
}),
});
Chat Completions (Native)
Target URL: https://api.anthropic.com/v1/messages
| |
|---|
| Content Type | application/json |
| Streaming | Yes (set stream: true in request body) |
| Model | Input / 1M tokens | Output / 1M tokens |
|---|
| claude-opus-4-1 | $15.00 | $75.00 |
| claude-opus-4-1-20250805 | $15.00 | $75.00 |
| claude-opus-4-0 | $15.00 | $75.00 |
| claude-opus-4-20250514 | $15.00 | $75.00 |
| claude-opus-4-6 | $5.00 | $25.00 |
| claude-opus-4-5 | $5.00 | $25.00 |
| claude-opus-4-5-20251101 | $5.00 | $25.00 |
| claude-sonnet-4-6 | $3.00 | $15.00 |
| claude-sonnet-4-5 | $3.00 | $15.00 |
| claude-sonnet-4-5-20250929 | $3.00 | $15.00 |
| claude-sonnet-4-0 | $3.00 | $15.00 |
| claude-sonnet-4-20250514 | $3.00 | $15.00 |
| claude-haiku-4-5 | $1.00 | $5.00 |
| claude-haiku-4-5-20251001 | $1.00 | $5.00 |
| claude-3-haiku-20240307 | $0.25 | $1.25 |
Next Steps