Guide
A start-to-finish path through the Pareta SDK, from your first install to running it async in production. Read it in order the first time; come back to any page on its own later.
The throughline: you send every request to model="auto" (Pareta plans, routes to benchmark-proven open specialists, verifies, and falls back to a frontier model when needed), and you prove it wins on your data with an eval before you commit. There is nothing to deploy and no model to pick. Inference and evals are metered against your org balance.
Almost every example builds the client with Pareta.from_env(), which reads PARETA_API_KEY and an optional PARETA_BASE_URL.
- Installation & authentication — install
pareta(pip/uv/poetry), authenticate with apareta_sk_key viaPareta.from_env()orapi_key=, and make a first metered OpenAI-compatible call. - Quickstart —
model="auto"end to end in about a dozen lines, with streaming, metering, and benchmarking it against frontier models on your data. - Core concepts — tasks and capabilities, how auto plans/routes/verifies, frontier baselines, hidden hardware, and balance metering.
- Running inference —
chat.completions.createwithmodel="auto": completions, streaming chunks, passthrough params,models.list, async, metering errors, and pointing theopenaiSDK atbase_url. - Evaluating on your own data — benchmark
"auto"against frontier baselines on your own rows withevals.setsandevals.runs, reading per-contender quality/CIs/cost and the metered run total. - Errors, retries & timeouts — the
ParetaErrorhierarchy and status-to-class mapping, which errors to catch (402/404/503/429), automatic retries with backoff, and request vs eval-wait timeouts. - Async usage —
AsyncPareta:async with/acloselifecycle, awaiting every method,async foron chat streams, and fanning out work concurrently withasyncio.gather. - Configuration — building the client:
api_key,base_url(prod vs staging),timeout,max_retries, injecting your ownhttpxclient, env vars, and lifecycle. - The
paretaCLI — the same surface as a shell command (pip install "pareta[cli]"):chat/tasks/models/evals/auto/audio, with--jsoneverywhere. - MCP server — expose Pareta to an AI agent (Claude Code, Codex, Claude Desktop, Cursor) as tools (
pip install "pareta[mcp]"); set it up withuvx/pipx. - The
/paretaskill — aSKILL.mdthat drives the CLI as a slash command in Claude Code and Codex (same file works in both). - Connect OpenClaw to Pareta — point an OpenClaw agent at
/agent/v1as its primary model: open-fleet turns with native tool calls, frontier escalation only when a turn earns it.