Reference
Field-by-field API docs for the Pareta SDK. Signatures are shown in Python; the TypeScript SDK mirrors them (a single Promise-only Pareta client, camelCase names, awaited calls). Everything hangs off one client object, Pareta (Python also ships an async mirror, AsyncPareta); the resource pages document the namespaces that live on it. Conventions that hold everywhere: the model id you pass for inference is "auto" (frontier vendor ids appear only in eval and comparison contexts), inference and evals are metered against your org balance, and money appears on .cost (a dollars Decimal in Python, a fixed-2dp string in TypeScript) with the raw integer on .cost_micro_usd / .costMicroUsd.
Client
- Client (
Pareta,AsyncPareta) — the sync/async client:from_env, constructor params (api_key,base_url,timeout,max_retries,http_client), lifecycle, and the six resource namespaces.
Resources
- chat.completions —
chat.completions.create: params,ChatCompletion/chunk return types, streaming SSE behavior, metering, and the full error/retry surface, with sync, async, and OpenAI-SDK examples. - models —
client.models:list()returns aModelListwith exactly one entry,"auto"; the threeModelfields (id/owned_by/created) and sync+async usage. - tasks —
client.tasks:list/retrieve/matchwith theTask/TaskMatchresponse models. - evals —
client.evals:sets,runs, andfrontier_models, withfrontier=resolution, metering, and response-object tables. - audio —
client.audio:transcriptions(speech-to-text) andspeech(text-to-speech), the per-minute metering, and theTranscription/Speechresponse objects. - images —
client.images:generate(text-to-image), the flat per-image metering, and theImageGenerationresponse object. - rerank —
client.rerank: rank documents by relevance to a query (per-document metering, calibrated scores, theRerankresponse object). - embeddings —
client.embeddings: unit-normalized text vectors for search/RAG recall (per-token metering, query vs document embedding, theEmbeddingsresponse object).
Types and errors
- Exceptions — the exception hierarchy:
ParetaErrorbase, status-to-class mapping, and thestatus_code/detail/request_idattributes. - Response types — every response object (chat, models, tasks, evals) plus the
.costvs.cost_micro_usdmoney convention.
Transport
- Underlying HTTP API — a per-method map of the
/v1routes the SDK wraps (chat/completions, models, tasks+match, auto metrics + frontier compare, eval frontier-models, eval-sets, eval-runs) with method, path, Bearer auth, request/response shapes, and sync/async + curl examples. - Agent API (
/agent/v1) — the wire contract for agent runtimes (OpenClaw): request/response fields, session pinning, streaming, billing header, errors, and a working OpenClaw provider block.