Skip to main content
The Verlon SDK provides a unified interface for AI capabilities across multiple providers. Use one SDK to access chat, image generation, embeddings, text-to-speech, video generation, and OCR.

Installation

Quick Start

Configuration

Initialize the Client

Never commit API keys to version control. Use environment variables.

Get Your API Key

  1. Sign up at verlon.ai/signup
  2. Get your API key from the Dashboard
  3. Store it in an environment variable
.env

Available Methods

The SDK provides methods for different AI capabilities:

Chat

Text generation with streaming, vision, and function calling

Images

Generate images from text prompts

Video

Create videos from text descriptions

Embeddings

Generate vector embeddings for text

Audio

Convert text to speech

OCR

Extract text from images

Response Structure

All SDK methods return a VerlonResponse object:

Error Handling

Wrap SDK calls in try-catch blocks:

Common Error Messages

TypeScript Support

The SDK is fully typed:

Environment Variables

Best practice for managing credentials:

Next Steps

Explore specific capabilities:

Chat

Images

Video

Embeddings

Audio

OCR

Or learn about core concepts:

Gates & Routing

How Verlon routes requests to models

Creating Gates

Configure gates in the dashboard