Skip to main content
Verlon AI provides an Anthropic-compatible API endpoint. 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)
  • Verlon API key from your Dashboard
  • A configured gate (gate UUID)

Installation

Configuration

Update your Anthropic client initialization - just 2 lines:

Making Requests

Verlon supports three ways to specify your gate:

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, plus Verlon’s cost field

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. Add Gate ID

Add gateId to your message calls:

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 2 changes (baseURL + apiKey) - takes 30 seconds.

Advanced Usage

Multiple Gates

Use different gates based on the task:

Environment-Specific Configuration

Error Handling

How It Works

  1. You send → Anthropic SDK request to https://api.verlon.ai/v1/messages
  2. Verlon receives → Validates gate, applies routing rules
  3. Verlon routes → Sends to the model configured in your gate (Claude, GPT, Gemini, etc.)
  4. Provider responds → Returns response in provider’s format
  5. Verlon normalizes → Converts back to Anthropic format
  6. You receive → Standard Anthropic response with added cost/metadata
Your code doesn’t know the difference.

FAQ

No. Just change baseURL and apiKey in the Anthropic client initialization.
Yes. Just revert baseURL and apiKey to Anthropic values.
Yes. stream: true works exactly like Anthropic.
Yes. Configure your gate to use any model — your code stays the same.
Fully supported. Verlon handles the conversion across all providers.
No. This approach uses only the Anthropic SDK.

Comparison: Anthropic SDK vs Verlon SDK

Recommendation:
  • Existing Anthropic apps → Use Anthropic SDK + Verlon (this guide)
  • New projects → Use Verlon SDK for full feature set

Next Steps

Create a Gate

Set up routing rules and configure models

View Request Logs

Monitor your API usage and costs

Configure Fallbacks

Learn about fallback strategies

Verlon SDK

Explore the full-featured Verlon SDK