Skip to main content
Every Claude model — Opus, Sonnet, and Haiku across the 3.5, 4, 4.5, 4.6, 4.7, and 4.8 generations — is routable through Verlon with your existing Anthropic SDK unchanged. Just point baseURL at Verlon and swap the API key.

Chat models

Model IDTypeContext
claude-3-5-sonnetchat200K
claude-3-5-sonnet-20241022chat200K
claude-3-haiku-20250307chat200K
claude-3-opus-20250219chat200K
claude-haiku-4-5-20251001chat200K
claude-opus-4chat200K
claude-opus-4-1-20250805chat200K
claude-opus-4-20250514chat200K
claude-opus-4-5-20251101chat200K
claude-opus-4-6chat1000K
claude-opus-4-7chat1000K
claude-opus-4-8chat1000K
claude-sonnet-4chat200K
claude-sonnet-4-20250514chat1000K
claude-sonnet-4-5-20250929chat1000K
claude-sonnet-4-6chat1000K
This table is auto-generated from the Verlon model registry on every sync — see the live registry for pricing, benchmarks, and deprecation dates.

Other modalities

No non-chat models.

Quickstart

First time? Create a gate and grab an API key — the examples below need a GATE_ID and VERLON_API_KEY.
The fastest path — Verlon SDK, one call:
import { Verlon } from '@verlon-ai/sdk';

const verlon = new Verlon({ apiKey: process.env.VERLON_API_KEY });

const response = await verlon.chat({
  gateId: process.env.GATE_ID,
  model: 'claude-sonnet-4-6', // optional — overrides the gate's configured model
  data: {
    messages: [{ role: 'user', content: 'Hello!' }],
  },
});

console.log(response.content);
Any chat model from the table above works — swap claude-sonnet-4-6 for claude-opus-4-8, claude-haiku-4-5-20251001, or any other ID.

SDK compatibility

Verlon exposes an Anthropic-compatible endpoint. The official Anthropic SDK works unchanged — swap two lines and every model in the table above becomes callable through the SDK you already know.

Configuration — just two lines

import Anthropic from '@anthropic-ai/sdk';

const anthropic = new Anthropic({
  apiKey: process.env.ANTHROPIC_API_KEY,
});
import Anthropic from '@anthropic-ai/sdk';

const anthropic = new Anthropic({
  baseURL: 'https://api.verlon.ai', // ← add this
  apiKey: process.env.VERLON_API_KEY, // ← change this
});

Specifying your gate

Verlon supports three ways to point a request at a gate:

Streaming

Identical behavior to the Anthropic SDK — stream: true returns an async iterable of MessageStreamEvent objects.
const stream = await anthropic.messages.create({
  gateId: process.env.GATE_ID,
  max_tokens: 1024,
  messages: [{ role: 'user', content: 'Tell me a joke.' }],
  stream: true,
});

for await (const event of stream) {
  if (event.type === 'content_block_delta' && event.delta.type === 'text_delta') {
    process.stdout.write(event.delta.text);
  }
}

Language coverage

import Anthropic from '@anthropic-ai/sdk';

const anthropic = new Anthropic({
  baseURL: 'https://api.verlon.ai',
  apiKey: process.env.VERLON_API_KEY,
});

const response = await anthropic.messages.create({
  gateId: process.env.GATE_ID,
  max_tokens: 1024,
  messages: [{ role: 'user', content: 'Hello!' }],
});

console.log(response.content[0].text);
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.verlon.ai",
    api_key=os.environ["VERLON_API_KEY"],
)

response = client.messages.create(
    model=os.environ["GATE_ID"],
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello!"}],
)

print(response.content[0].text)
curl https://api.verlon.ai/v1/messages \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $VERLON_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "gateId": "'"$GATE_ID"'",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

What’s supported

Full support for stream: true, identical semantics to Anthropic’s SDK.
Fully supported. Verlon translates across providers if your gate routes to a non-Claude model.
Image inputs in messages work with any vision-capable model.
System prompts, user, assistant, and tool_result blocks all pass through.
temperature, max_tokens, top_p, top_k, stop_sequences, and the rest — all passed through.
Standard response.usage with token counts, plus Verlon’s cost field with per-call dollar amount.

Migrating an existing Anthropic app

1

Update client initialization

Swap baseURL + apiKey. Two lines.
2

Add a gate reference

Pass gateId (or set the default header). max_tokens, messages, and everything else stay the same.
3

Test in development

Verify requests appear in the Verlon dashboard and cost tracking works.
4

Deploy

Ship. If anything breaks, revert the two-line diff — takes 30 seconds.

How it works

  1. You send an Anthropic-format request to https://api.verlon.ai/v1/messages
  2. Verlon receives — validates the gate, applies routing rules
  3. Verlon routes to whichever model your gate points at (Claude, GPT, Gemini, Mistral, or anything else in the registry)
  4. The provider responds in its native format
  5. Verlon normalizes back to Anthropic format
  6. You receive a standard Anthropic response with an added cost field
Your code doesn’t know the difference.

Errors

Errors come back Anthropic-shaped — { "type": "error", "error": { "type", "message" } } — so the Anthropic SDK’s error classes work unchanged.
StatusMeaningWhat to check
400Invalid requestMalformed body or missing gateId
401Invalid API keyYour VERLON_API_KEY value and the Authorization: Bearer header
404Gate not foundYour GATE_ID — the error message names the offending ID
429Rate limit exceededBack off and retry; the body includes reset_at, and every response carries X-RateLimit-* headers
try {
  const response = await anthropic.messages.create({
    gateId: process.env.GATE_ID,
    max_tokens: 1024,
    messages: [{ role: 'user', content: 'Hello!' }],
  });
} catch (error) {
  if (error.status === 404) {
    console.error('Gate not found — check GATE_ID');
  } else if (error.status === 429) {
    console.error('Rate limited — retry after the reset');
  } else {
    throw error;
  }
}

FAQ

No. Change baseURL + apiKey in the client. The messages.create calls stay identical.
Yes. Revert baseURL + apiKey to Anthropic values and you’re back on their API.
Yes — that’s the point. Configure your gate to route to any model in the registry and your Anthropic SDK code stays the same.
No. This whole guide uses only the Anthropic SDK.

Full non-chat model list

This provider is chat-only — see the table above.