Skip to main content
The SDK uses only fetch and Web Crypto, so it works in Node, Next.js, Bun, Deno, Workers, mobile apps and Tauri. Keep the API key on a server.

Calling capabilities

Every call takes the same options as its last argument: idempotencyKey, maxPriceMicro (the most this call may be priced at) and secondOpinion (ask one more source on a weak answer). Request and result types are generated from the API’s OpenAPI document, so your editor completes fields and checks them.

Jobs

Errors and retries

Errors are PramaanError (see errors). Read-only calls are retried on 429, 5xx and network failures, up to maxRetries times (default 2). Calls with an external effect are never retried automatically.

Options

Webhooks

verifyWebhook(secret, headers, rawBody) checks a webhook signature and returns the event. See webhooks.

Other languages

Python and other SDKs are generated from the same OpenAPI document and add the same helpers: job waiting, webhook verification, the retry rules and one error type. Until then, any HTTP client works; see the API reference tab.