Skip to main content
Venice AI is a drop-in replacement for OpenAI. Same SDK, same code — just change two lines. Get privacy-first inference, uncensored models, and competitive pricing.

The 2-Line Migration

Generate a key from venice.ai/settings/api or follow the API key guide.

Environment variables

Many libraries and tools read OPENAI_API_KEY and OPENAI_BASE_URL automatically. Updating these env vars may be all you need. Some tools still use OPENAI_API_BASE for the same URL.

Models

Pass a Venice model ID, a trait such as default or most_uncensored, or, for chat and embedding models, a familiar OpenAI-style name. Venice maps OpenAI chat and embedding model names through compatibility mapping; other endpoints, including audio, need Venice model IDs. Traits always resolve to the current model for that role — see model traits. Browse the live catalog on Text models and Pricing. For a first-request walkthrough, see the Quickstart.

Feature compatibility

For native image options beyond the OpenAI-compatible endpoint, see Image generation.

Streaming format

Chat Completions streams use the OpenAI chunk format and end with data: [DONE]. Two details differ:
  • Usage chunk. Every stream ends with a usage chunk before [DONE], even when stream_options.include_usage is false. Its choices array is empty and it carries usage and a cost object. Clients that read choices[0] on every chunk should skip chunks with no choices.
  • Errors after the stream starts. The HTTP status is already 200, so the error arrives as a data: event with an error object (message, type, code), followed by data: [DONE]. When the model is overloaded, the object also includes retry_after in seconds.

Venice-only features

Pass Venice-specific options through extra_body as venice_parameters. Built-in web search is the usual first extra:
Unknown keys inside venice_parameters are ignored rather than rejected, so check the spelling of each key against the API reference. The same pattern covers web scraping, citations, and Characters. If a client cannot change the request body, append a model feature suffix such as default:enable_web_search=auto. Venice also has native video, music, web retrieval, and x402 APIs alongside the OpenAI-compatible surface.

Frameworks

Most AI frameworks work with Venice by changing the base URL:

LangChain

base_url in ChatOpenAI; check_embedding_ctx_length=False on OpenAIEmbeddings

Vercel AI SDK

baseURL in createOpenAI

LlamaIndex

api_base on the OpenAI-compatible client

CrewAI

OPENAI_API_BASE env var

PydanticAI

OpenAI-compatible model with Venice base URL

Cursor

Custom API endpoint in settings

Claude Code

Route Claude Code through Venice

Codex CLI

config.toml model provider

Aider

OPENAI_API_BASE env var
More coding agents and tools are listed in AI Agents.

Uncensored models

Venice’s private uncensored models have no content filtering, making them suitable for:
  • Creative writing without guardrails
  • Security research and red teaming
  • Honest analysis without refusal patterns
  • Medical and legal information without extra disclaimers
Use the most_uncensored trait or a current uncensored model ID from Text models.

Get Your API Key

Generate a Venice API key and start migrating in minutes