Skip to main content

pareta

PyPI Python versions License

Python client for Pareta — deploy open-weights endpoints, run metered inference, browse the benchmark catalog, and eval models on your own data.

pip install pareta        # or: uv add pareta / poetry add pareta
from pareta import Pareta

pa = Pareta.from_env()                       # reads PARETA_API_KEY
# or: Pareta(api_key="pareta_sk_…", base_url="https://api.pareta.ai")

# OpenAI-compatible inference against a deployed endpoint
resp = pa.chat.completions.create(
    model="ep_…",                            # an endpoint id (see pa.models.list())
    messages=[{"role": "user", "content": "Extract the total from this invoice: …"}],
)
print(resp.choices[0].message.content)

# Streaming
for chunk in pa.chat.completions.create(model="ep_…", messages=[...], stream=True):
    print(chunk.choices[0].delta.content or "", end="")

# List the models (endpoints) your org can call
for m in pa.models.list():
    print(m.id)

Async mirrors the sync client:

from pareta import AsyncPareta

async with AsyncPareta.from_env() as pa:
    resp = await pa.chat.completions.create(model="ep_…", messages=[...])

Auth

Mint a pareta_sk_ key in the dashboard (key management is browser-only) and pass it as api_key= or via PARETA_API_KEY. The SDK only ever consumes a key; it never creates, lists, or revokes them.

Inference is OpenAI-compatible

You don't even need this SDK to call a deployed endpoint — point the openai client at base_url + your key:

from openai import OpenAI
client = OpenAI(api_key="pareta_sk_…", base_url="https://api.pareta.ai/v1")

This SDK's unique value is the control plane: deploy, operate, and eval models from code — available both as Python methods and via the two interfaces below.

CLI

pip install "pareta[cli]" adds the pareta command — the same control plane from your shell (or pipx install "pareta[cli]" for an isolated, always-on-PATH install):

export PARETA_API_KEY=pareta_sk_…

pareta tasks match "extract fields from invoices"     # intent → task
pareta tasks leaderboard invoice-extraction           # ranked open models + savings
pareta endpoints deploy --task invoice-extraction --wait
pareta endpoints list
pareta chat ep_… "Summarize this contract: …"          # prompt arg or piped stdin
pareta endpoints cost ep_…

Add --json to any command for machine-readable output; pareta --help (or pareta <group> --help) documents the full tree — tasks, models, endpoints, evals, chat, audio.

MCP server

pareta-mcp is a Model Context Protocol server (stdio) that exposes Pareta to an AI agent (Claude Desktop, Cursor, …) as tools — so the agent can find the best open model for a task, benchmark it on your data, and deploy it.

Run it in its own isolated environment — like any MCP server it has its own dependency tree, so don't pip install it into an app/project venv. The simplest is uvx (no install, runs on demand). Register it (Claude Desktop → Settings → Developer → Edit Config):

{
  "mcpServers": {
    "pareta": {
      "command": "uvx",
      "args": ["--from", "pareta[mcp]", "pareta-mcp"],
      "env": { "PARETA_API_KEY": "pareta_sk_…" }
    }
  }
}

Prefer a persistent install? pipx install "pareta[mcp]" puts pareta-mcp on your PATH in a dedicated venv — then use "command": "pareta-mcp". (Avoid a plain pip install "pareta[mcp]" into a shared environment: its mcp/starlette dependencies can clash with an app's FastAPI, and the console script may not land on your PATH.)

It exposes the full surface — discovery (match_task, get_leaderboard, …), provisioning (deploy_endpoint, start / stop / delete), eval (run_eval), and metered chat / transcribe / speak. Provisioning and inference tools spend money; your MCP client's per-tool-call approval is the guardrail.

Errors

All errors subclass pareta.ParetaError:

Exception When
AuthenticationError (401) bad/missing key
InsufficientCreditsError (402) org out of credit — top up in the dashboard
NotFoundError (404) unknown endpoint
EndpointNotReadyError (503) endpoint stopped / cold / provider down
RateLimitError (429) throttled (auto-retried)
BadRequestError (400/422) malformed request
APIConnectionError / APITimeoutError transport failure (auto-retried)

Idempotent GETs and 429/5xx/timeouts are retried with exponential backoff (max_retries, default 2).

Status

Live: the full control plane — chat, models, tasks (browse + match), endpoints (deploy / operate / metrics), evals (bring-your-own-data), and audio — plus two interfaces over it: the pareta CLI (pip install "pareta[cli]") and the pareta-mcp MCP server (pip install "pareta[mcp]"). Sync + async clients.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pareta-0.2.1.tar.gz (322.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pareta-0.2.1-py3-none-any.whl (39.8 kB view details)

Uploaded Python 3

File details

Details for the file pareta-0.2.1.tar.gz.

File metadata

  • Download URL: pareta-0.2.1.tar.gz
  • Upload date:
  • Size: 322.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pareta-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e1e02770e03a8979d1c87669e2feca26320225a95b20961ec92bd4cceecb9545
MD5 64ef174af6580aaecdf164f132c78a35
BLAKE2b-256 59233e4b81e401e62bc68a82a0a7bbfc1496e5cc823a979f46609f35e24e51d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pareta-0.2.1.tar.gz:

Publisher: publish.yml on Pareta-AI/pareta

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pareta-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pareta-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 39.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pareta-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 616897668ecd4d28faab55118b0e0eba3424496e40fdb81f6f5c76e53549c9ce
MD5 1bf90fa80014a4b08284eb6602c4c16e
BLAKE2b-256 40b0fa7a7e9445978f668d26c367df640e084f7332f3e29fec5b13d13cd81bd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pareta-0.2.1-py3-none-any.whl:

Publisher: publish.yml on Pareta-AI/pareta

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page