Official SDKs

Installation

The proprietary packages @pura-ai/sdk and pura-llm-sdk target API 2026-10-01. Install a published release with npm install @pura-ai/sdk@0.1.0 or pip install pura-llm-sdk==0.1.0. For source development, build packages/pura-sdk or install packages/pura-sdk-python from the checkout.

Browser connection

PuraInferenceClient provides chat, streaming, usage, capabilities and transcribe. Supply a TokenStore per connected user. Standard models are mapped per service in Pura environment variables. Multiple workers must share a refresh lock. Budget errors never fall back to the wallet.

Inference and token persistence

PuraInferenceClient provides chat, streaming, usage, capabilities and transcribe methods. Supply a TokenStore per connected user. A client serializes refresh locally; multiple workers must share an application or database refresh lock. Budget errors never switch to wallet billing.

python
from pura_llm import PuraInferenceClient

pura = PuraInferenceClient(
    api_base="https://ai.puradigital.it/v1",
    client_id="YOUR_REGISTERED_CLIENT_ID",
    store=user_token_store,
)
try:
    answer = pura.chat(messages=[
        {"role": "user", "content": "Ciao"}
    ])
    usage = pura.usage()
finally:
    pura.close()