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:

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

pip install "pareta[mcp]" adds pareta-mcp, a Model Context Protocol server 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. Register it (Claude Desktop → Settings → Developer → Edit Config):

{
  "mcpServers": {
    "pareta": {
      "command": "pareta-mcp",
      "env": { "PARETA_API_KEY": "pareta_sk_…" }
    }
  }
}

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.0.tar.gz (313.3 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.0-py3-none-any.whl (39.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pareta-0.2.0.tar.gz
  • Upload date:
  • Size: 313.3 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.0.tar.gz
Algorithm Hash digest
SHA256 156dac132c7cf874d50f10a980522e0ce776eb6297dfcf8eaf72d03886e087c3
MD5 c92f7ef2d920d0f9d9c86d5c8b0592ca
BLAKE2b-256 8c594c5e088c1a6c3c2370f703d8154267ad9ea0fe89f9e714cf6b563c12a5e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pareta-0.2.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: pareta-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 39.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dc05cbcf5df3570b4ca73150ab2d489c3d96eae84abcfeaffb3a000ac78c6642
MD5 0bc693cafef22d3230dc6206bfac7799
BLAKE2b-256 7d269505bfaa062c882a06945568465bfb44348383eb9b63504d910b62ed8d89

See more details on using hashes here.

Provenance

The following attestation bundles were made for pareta-0.2.0-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