Skip to main content

Getting Started

The Venice AI Python SDK is a production-ready, fully-typed async client for Venice.ai.

Install

pip install venice-ai
export VENICE_API_KEY="your-api-key-here"

Python 3.13+ is required.

Your first chat completion

The SDK resolves models dynamically — you never hardcode a model ID.

import asyncio
from venice_ai import VeniceClient, UserMessage

async def main() -> None:
async with VeniceClient() as client:
model = await client.models.resolve_chat()
response = await client.chat.completions.create(
model=model,
messages=[UserMessage("Hello, Venice!")],
)
print(response.text)

asyncio.run(main())

Prefer a synchronous client? Use SyncVeniceClient with a plain with block.

Next steps

  • The Guides cover migration, the CLI, advanced configuration, and rate-limiting.
  • The API Reference documents every resource, type, and exception.