Python SDK Overview
Python SDK
Official Python SDK for Mesh API, an AI model gateway that gives you instant access to 300+ LLMs through a single OpenAI-compatible API.
Python 3.9+. Built on httpx and Pydantic v2. Sync and async clients with first-class type hints.
Install
Authentication
All requests require a Mesh API key (prefixed with rsk_). You can get your key at meshapi.ai.
This single key provides access to all available resources, including chat, embeddings, images, files, batches, models, and templates.
Type hints
Every request and response is a Pydantic v2 model. Import what you need: