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 gpt-5.4-mini. For a coding agent, follow the step-by-step setup at verlon.ai/setup.
Installation
Configuration
Point your OpenAI client at Verlon:Making Requests
Put your endpoint’s name inmodel. The endpoint’s model serves, with its fallback models and parameter defaults.
- Endpoint
- Job
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.
Responses API
Verlon also serves OpenAI’s newer Responses API at/v1/responses — the same client setup, then openai.responses.create():
reasoning items through verbatim, including encrypted_content, so multi-turn tool loops replay correctly.
Two things to know:
- Every provider. An endpoint whose model is on another provider gets the request translated to its API and the answer back as a Responses body; OpenAI’s
reasoningitems have no equivalent elsewhere and are named inx-verlon-dropped. See Any SDK, any model. - Stateless.
store: true,previous_response_idanditem_referenceinput items are rejected with a400naming the fix — send the previous response’soutputitems back ininputeach turn, exactly as you would against a stateless upstream. Verlon returns reasoning with itsencrypted_content, so it replays in full.
Streaming Example
Streaming works exactly like the standard OpenAI SDK:What’s Supported
Streaming
Streaming
Full support for
stream: true with identical behavior to OpenAITool/Function Calling
Tool/Function Calling
Works across all providers - Verlon handles format conversion
Vision
Vision
Image inputs in messages fully supported
All Message Types
All Message Types
System, user, assistant, and tool messages all supported
Standard Parameters
Standard Parameters
temperature, max_tokens, top_p, and other OpenAI parametersUsage & Cost Tracking
Usage & Cost Tracking
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 OpenAI application:1. Update Client Initialization
Find where you initialize the OpenAI 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
- Test in development
- Verify requests appear in Verlon dashboard
- Check cost tracking is working
- 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
- You send → OpenAI SDK request to
https://api.verlon.ai/v1/chat/completions - Verlon receives → Finds the endpoint named in
model, applies its parameter defaults - Verlon sends → Sends to the endpoint’s model (GPT, Claude, Gemini, etc.), or to its fallback models if that fails
- Provider responds → Returns response in provider’s format
- Verlon normalizes → Converts back to OpenAI format
- You receive → Standard OpenAI response, with
x-verlon-*headers added:x-verlon-served-modelnames the model that answered
FAQ
Do I need to change my code?
Do I need to change my code?
Barely. Change
baseURL and apiKey in the OpenAI client initialization, and set model to your endpoint’s name.Can I still use OpenAI directly?
Can I still use OpenAI directly?
Yes. Just revert
baseURL, apiKey and model to OpenAI values.Does streaming work?
Does streaming work?
Yes.
stream: true works exactly like OpenAI.Can I use Claude or Gemini?
Can I use Claude or Gemini?
Yes. Set your endpoint’s model to any model — your code stays the same.
What about function calling?
What about function calling?
Fully supported. Verlon handles the conversion across all providers.
Does this work with Vercel AI SDK?
Does this work with Vercel AI SDK?
Yes. The Vercel AI SDK’s OpenAI adapter works with Verlon’s OpenAI-compatible API. On the Responses API (
openai.responses(...)), set providerOptions: { openai: { store: false } }. By default the SDK sends earlier assistant turns back as references to items stored at OpenAI, which a stateless API can’t resolve: any request that replays a previous answer, a tool loop or a multi-turn chat, gets a 400. With store: false on a reasoning model, the SDK asks for reasoning.encrypted_content itself, so reasoning still replays in full.Tracing your agent
To see each run of an agent as a trace — its model calls, tools, and sub-agents — and to control each call site’s model from the dashboard, add standard OpenTelemetry to this setup. There is no Verlon package to install; see Agent endpoints. Endpoints, logging, and cost tracking need nothing beyond this guide’s client setup. Video generation is served drop-in too — the async Videos surface (openai.videos.create() / retrieve() / downloadContent()) works against
/v1/videos, and OCR against /mistral/v1/ocr.
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

