# Pareta

> Pareta is one OpenAI-compatible endpoint with one model id: `"auto"`. Each request is planned, routed to benchmark-proven open specialists, verified, and falls back to a frontier model when that's the right call — one request, one bill. Its SDKs also let you benchmark `"auto"` against frontier models on your own data, read your auto traffic metrics, and find the grading contract that scores your eval data (`tasks.match`). Authenticate with a `pareta_sk_` key from the dashboard or the `PARETA_API_KEY` environment variable.

Pareta ships one SDK per language, all sharing these docs and the same `/v1` HTTP API: Python (`pip install pareta`, `from pareta import Pareta`); TypeScript/JavaScript (`npm install pareta`, `import { Pareta } from "pareta"`).


## Guide

- [Installation & authentication](https://docs.pareta.ai/guide/installation): The `pareta` package is the official client for Pareta, available for **Python** (`pip install pareta`) and **TypeScript/JavaScript** (`npm install pareta`). It runs metered OpenAI-compatible…
- [Quickstart](https://docs.pareta.ai/guide/quickstart): Pareta is one endpoint. Send any request with `model="auto"` and Pareta plans it, routes each part to the cheapest model that holds frontier-grade quality, verifies, and answers — billed as one…
- [Core concepts](https://docs.pareta.ai/guide/core-concepts): Pareta is one OpenAI-compatible endpoint with one model id: **`"auto"`**. This page covers the handful of ideas the rest of the SDK assumes you understand: the **routing brain** behind…
- [Running inference](https://docs.pareta.ai/guide/inference): You run inference through `chat.completions.create`, which has the same shape as the OpenAI chat completions API. Pass `model="auto"`, a list of messages, and you get a `ChatCompletion` back. Set…
- [Evaluating on your own data](https://docs.pareta.ai/guide/evaluation): Benchmarks tell you which model wins on someone else's data. This page is about the only number that matters: how `model="auto"` scores on *your* rows.
- [Errors, retries & timeouts](https://docs.pareta.ai/guide/errors-and-retries): Every failure the SDK can raise is a subclass of `ParetaError`, so one `except` clause catches everything, and a more specific clause catches exactly the case you care about. The client also…
- [Async usage](https://docs.pareta.ai/guide/async): `AsyncPareta` is the asyncio-native client. It mirrors the synchronous `Pareta` client method-for-method: same constructor, same resource namespaces (`chat`, `models`, `tasks`, `evals`, `auto`,…
- [Configuration](https://docs.pareta.ai/guide/configuration): Every Pareta call goes through one client object. Configuration is just how you build that client: which API key it sends, which environment it points at, how patient it is on slow or flaky…
- [The `pareta` CLI](https://docs.pareta.ai/guide/cli): The `pareta` command is the SDK in your shell: call `model="auto"`, match a task, run an eval on your own data, and read auto's metrics — each as one command, rendered as a table or, with…
- [MCP server](https://docs.pareta.ai/guide/mcp): `pareta-mcp` is a Model Context Protocol server that exposes Pareta to an AI agent (Claude Desktop, Cursor, …) as tools — so the agent can call `model="auto"`, match a task, run an eval on your…
- [The `/pareta` skill](https://docs.pareta.ai/guide/skill): A Pareta skill teaches an AI coding agent to drive the `pareta` CLI as a slash command — run metered inference against `model="auto"`, match plain-language intent to a benchmarked task, and…
- [Connect OpenClaw to Pareta](https://docs.pareta.ai/guide/agent-openclaw): Pareta's Agent Auto endpoint is OpenAI-compatible on the wire. Point OpenClaw — or any agent runtime that speaks the OpenAI chat completions API — at it, set the model to `auto`, and Pareta…

## Examples

- [Medical coding (ICD-10)](https://docs.pareta.ai/examples/icd-coding): Turn a clinical discharge summary into ICD-10-CM codes with one chat call. The summary goes to `model="auto"` as plain text; the prompt pins the output to a strict JSON array of `{"code",…
- [Retrieval: reranking and embeddings](https://docs.pareta.ai/examples/retrieval): Build search over a small support knowledge base three ways: rerank a candidate list with `pa.rerank(...)`, semantic-search it with `pa.embeddings(...)`, and compose the two into the classic…
- [Extraction: documents and contracts](https://docs.pareta.ai/examples/extraction): Pull structured fields out of documents — a scanned invoice, a PDF, a contract — and get JSON back. You'll extract vendor/total/line-items from a real invoice image, then key legal fields from a…
- [Text classification](https://docs.pareta.ai/examples/text-classification): Turn `model="auto"` into a production text classifier: a closed label set in the system prompt, a few labeled examples, `temperature=0`, and a one-word answer your code can branch on. This page…
- [Summarization](https://docs.pareta.ai/examples/summarization): Turn a raw meeting transcript into a three-sentence executive summary plus an owner — item — due action-items list, with one call to `model="auto"`. The output format lives entirely in the prompt,…
- [Text to speech](https://docs.pareta.ai/examples/text-to-speech): Turn a line of text into spoken audio and write it to a `.wav` file — one call in, one file out. You'll synthesize a short customer notification with `pa.audio.speech(...)`, save the returned…
- [Speech to text](https://docs.pareta.ai/examples/speech-to-text): Turn a recorded audio clip into text with `pa.audio.transcriptions(...)`. One call sends the clip to `POST /v1/audio/transcriptions` and returns the transcript, the detected language, and the…
- [Benchmark `"auto"` on your own data](https://docs.pareta.ai/examples/evaluate-on-your-data): A public benchmark tells you how `model="auto"` performs on someone else's data. It does not tell you how it performs on *yours*. This page shows how to take your own labeled rows, score `"auto"`…
- [Document extraction (PDF/image)](https://docs.pareta.ai/examples/document-extraction): Pull structured fields out of PDFs and scanned images with `model="auto"` — and prove, on your own documents, that the routing holds frontier quality at a fraction of the cost.
- [Streaming chat completions](https://docs.pareta.ai/examples/streaming-chat): Stream tokens as the model generates them instead of waiting for the whole response. Pass `stream=True` to `chat.completions.create(...)` and you get an iterator of `ChatCompletionChunk` objects,…
- [Concurrent calls with AsyncPareta](https://docs.pareta.ai/examples/concurrent-async): `AsyncPareta` lets you fire many requests at once instead of one at a time. When you have a batch of inference prompts to score, or several eval runs to kick off, running them concurrently turns a…
- [Cost & quality monitoring](https://docs.pareta.ai/examples/cost-and-metrics): Every dollar you spend on Pareta runs through one org balance, and every `model="auto"` request your org sends gets rolled up for you. This page is about reading both: what a call or an eval run…
- [Migrating from the OpenAI SDK](https://docs.pareta.ai/examples/migrate-from-openai): Pareta inference is OpenAI-compatible. If you already call `chat.completions.create(...)` through the `openai` SDK, you do not have to rewrite that code to run on Pareta. Point the OpenAI client…

## Reference

- [Client (`Pareta`, `AsyncPareta`)](https://docs.pareta.ai/reference/client): The client is the one object you build and the only thing that talks to the network. It holds your API key, the environment URL, the timeout and retry policy, and an HTTP connection pool. Every…
- [chat.completions](https://docs.pareta.ai/reference/chat): Run inference on Pareta. `chat.completions.create(...)` is the one call you make to get tokens out. It has the same shape as the OpenAI chat completions API: pass `model="auto"`, a list of…
- [models](https://docs.pareta.ai/reference/models): `client.models` is the OpenAI-compatible model index: `GET /v1/models`. On Pareta it returns exactly one entry — **`"auto"`** — because there is only one model id to call. The resource exists so…
- [tasks](https://docs.pareta.ai/reference/tasks): `client.tasks` is the **grading-contract directory** for evals. A task names how a dataset is scored: the input/output shape your rows must follow and the scorer that grades outputs against your…
- [`evals`: evaluate models on your own data](https://docs.pareta.ai/reference/evals): `client.evals` runs the only benchmark that matters: how `model="auto"` scores on **your** rows. You hand Pareta a task — the grading contract that names your rows' shape and scorer (`tasks.match`…
- [audio](https://docs.pareta.ai/reference/audio): `client.audio` is the Speech surface: turn recorded audio into text, and turn text into spoken audio. It exposes the two general **capability lanes** that are not chat — `asr` (speech-to-text) and…
- [images](https://docs.pareta.ai/reference/images): `client.images` is the image surface: turn a text prompt into a PNG, or edit an existing image with a plain-language instruction. It exposes the `image-gen` **capability lane** as two methods:
- [rerank](https://docs.pareta.ai/reference/rerank): `client.rerank` is the Retrieval surface: rank a list of candidate documents by relevance to a query. It exposes the `rerank` **capability lane** — the Cohere-shaped workload behind search, RAG…
- [embeddings](https://docs.pareta.ai/reference/embeddings): `client.embeddings` is the Retrieval surface's recall lane: turn text into vectors for semantic search and RAG. It exposes the `embed` **capability lane** as a single callable:
- [Exceptions](https://docs.pareta.ai/reference/exceptions): Every error the Pareta SDK raises is a subclass of `ParetaError`. That single base class is the contract: one `except ParetaError` catches anything the SDK can throw, and a narrower `except…
- [Response types](https://docs.pareta.ai/reference/types): Every method that talks to the API hands you back a typed object, not a bare dict. These objects give you attribute access and autocomplete over the shapes the API returns: a chat completion's…
- [Underlying HTTP API](https://docs.pareta.ai/reference/http-api): The Pareta SDKs (Python and TypeScript) are thin, typed wrappers over a plain JSON-over-HTTPS API served at `https://api.pareta.ai` under the `/v1/` prefix. Every method you call maps to exactly…
- [Agent API (`/agent/v1`) — OpenClaw and agent runtimes](https://docs.pareta.ai/reference/agent-api): The wire reference for Pareta's agent surface: an OpenAI-compatible chat completions endpoint built for multi-turn tool loops. If you want the narrative version — what the lane does per turn and…

## Optional

- [OpenAPI spec](https://docs.pareta.ai/openapi.json): machine-readable contract for the underlying /v1 HTTP API the SDKs wrap.
- [llms-full.txt](https://docs.pareta.ai/llms-full.txt): the entire docs in one file.
