Skip to main content
Verlon AI provides an Anthropic-compatible API. You can use the official Anthropic SDK by pointing it to Verlon’s base URL instead of Anthropic’s.

Quick Start

Prerequisites

  • Verlon AI account (sign up)
  • An API key (it starts with sk-vrln-) from your Dashboard
  • An endpoint: a named model setup your app calls, with a model, fallback models and parameter defaults. Create one on the Endpoints page, or with verlon endpoint create --name support-summarizer --model claude-sonnet-4-6. For a coding agent, follow the step-by-step setup at verlon.ai/setup.

Installation

Configuration

Point your Anthropic client at Verlon:

Making Requests

Put your endpoint’s name in model. The endpoint’s model serves, with its fallback models and parameter defaults.
A plain string, so there are no TypeScript errors and your existing code stays as it is.
No Verlon header is needed. The answer’s x-verlon-served-model header names the model that answered. A model that names none of your endpoints is refused with 404 no_endpoint_named; the message lists your endpoints and links to create one. Until launch in early December 2026, a known model id (for example gpt-5.4-mini) is also served directly, through an endpoint Verlon makes for it on first use; from launch, the model field takes an endpoint name. Older integrations that send an endpoint’s id or the X-Verlon-Gate-Id header keep working.

Streaming Example

Streaming works exactly like the standard Anthropic SDK:

What’s Supported

Full support for stream: true with identical behavior to Anthropic
Works across all providers - Verlon handles format conversion
Image inputs in messages fully supported
System prompts, user, and assistant messages all supported
temperature, max_tokens, top_p, and other Anthropic parameters
Standard response.usage with token counts. Verlon adds x-verlon-* response headers (the served model, the route reason, and what was translated, emulated or dropped); each call’s cost is recorded in the request log (dashboard Logs, GET /v1/logs).

Language Examples

Migration Guide

Follow these steps to migrate an existing Anthropic application:

1. Update Client Initialization

Find where you initialize the Anthropic client and update it:

2. Call your endpoint by name

Create an endpoint with the model you use today, then put its name where the model was. From then on the endpoint decides which model serves, so you can change it in the dashboard without a deploy:

3. Update Environment Variables

.env

4. Test & Deploy

  1. Test in development
  2. Verify requests appear in Verlon dashboard
  3. Check cost tracking is working
  4. Deploy to production
Easy Rollback: If anything breaks, revert the 3 changes (baseURL, apiKey and model) - takes 30 seconds.

Advanced Usage

Multiple Endpoints

Use a different endpoint for each kind of work, each with its own model and defaults:

Environment-Specific Configuration

Error Handling

How It Works

  1. You send → Anthropic SDK request to https://api.verlon.ai/v1/messages
  2. Verlon receives → Finds the endpoint named in model, applies its parameter defaults
  3. Verlon sends → Sends to the endpoint’s model (Claude, GPT, Gemini, etc.), or to its fallback models if that fails
  4. Provider responds → Returns response in provider’s format
  5. Verlon normalizes → Converts back to Anthropic format
  6. You receive → Standard Anthropic response, with x-verlon-* headers added: x-verlon-served-model names the model that answered
Your code doesn’t know the difference.

FAQ

Barely. Change baseURL and apiKey in the Anthropic client initialization, and set model to your endpoint’s name.
Yes. Just revert baseURL, apiKey and model to Anthropic values.
Yes. stream: true works exactly like Anthropic.
Yes. Set your endpoint’s model to any model — your code stays the same.
Fully supported. Verlon handles the conversion across all providers.

Next Steps

Create an Endpoint

Choose its model, fallback models and defaults

View Request Logs

Monitor your API usage and costs

Configure Fallbacks

Learn about fallback strategies

Trace your agent

See every run with standard OpenTelemetry