Skip to main content

prysm1 — PRYSM Python SDK

One API, every model, always the best one. An OpenAI drop-in: change one line, get intelligent routing across 21 models, cost guardrails (AgentGuard), declarative config (BRAIN.md), and cryptographic receipts (PrysmProof).

pip install prysm1

Drop-in replacement for OpenAI

Prysm subclasses openai.OpenAI, so all your existing code works unchanged.

from prysm import Prysm

client = Prysm()  # api_key from $PRYSM_API_KEY, base_url from $PRYSM_BASE_URL

resp = client.chat.completions.create(
    model="auto",                       # let PRYSM pick the best model
    messages=[{"role": "user", "content": "Write a Python quicksort"}],
)
print(resp.choices[0].message.content)

Access the PRYSM extensions

Every response carries a prysm block (routing, cost, latency, proof). Use extension() for clean dot-access:

import prysm

ext = prysm.extension(resp)
print(ext.routing.model_display)  # "DeepSeek V3.2"
print(ext.cost.total_usd)         # 0.000042
print(ext.proof.proof_hash)       # "sha256:a1b2c3d4..."

BRAIN.md auto-discovery

Drop a BRAIN.md in your project root and the SDK finds it automatically, applying your routing rules / cost caps / blocked models on every complete() call:

client = Prysm()                 # discovers ./BRAIN.md (walks up from cwd)
resp = client.complete("Summarize this contract")   # BRAIN.md applied

Point it explicitly, pass a dict, or disable:

Prysm(brain="path/to/BRAIN.md")
Prysm(brain={"max_cost": 0.005, "model": "deepseek-v3.2"})
Prysm(brain=None)                # ignore BRAIN.md

Validate a BRAIN.md before shipping:

print(client.validate_brain(open("BRAIN.md").read()))
# {'valid': True, 'errors': [], 'warnings': [], 'normalized': {...}}

Helpers

client.route("debug this function")     # dry-run: which model, est. cost (no call)
client.usage()                          # your usage stats
client.savings(baseline="gpt-5.2")      # est. $ saved vs. an all-premium baseline
client.verify_proof(request_id)         # verify a PrysmProof
client.models_catalog()                 # 21 models with pricing

Configuration

Setting Argument Env var Default
API key api_key= PRYSM_API_KEY —
Base URL base_url= PRYSM_BASE_URL https://api.prysm1.com/v1
BRAIN.md brain= — "auto" (discover)

Get an API key at prysm1.com. Full docs at docs.prysm1.com.

Development

python tests/test_sdk.py   # no pytest required; runs against the backend in-process

License

Proprietary.

Metadata

Release files for prysm1 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prysm1 0.2.0
File Size Uploaded Provenance Actions
prysm1-0.2.0.tar.gz 21.4 kB With provenance Details for prysm1-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for prysm1 0.2.0
File Interpreter ABI Platform Actions
prysm1-0.2.0-py3-none-any.whl Python 3 none any Details for prysm1-0.2.0-py3-none-any.whl

Total release size: 39.6 kB

Release files / prysm1-0.2.0.tar.gz

Download URL prysm1-0.2.0.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
432d428228a35cd8280685172d679d815a2a18ad55cfd85fb503b7411d08c1ef
BLAKE2b-256 checksum
How to use checksums
6dad9d718b6bf4eee2c597568c003e5b3207b70e8542c74cc5b530d03bfcbe5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 6, 2026.

Transparency log

Release files / prysm1-0.2.0-py3-none-any.whl

Download URL prysm1-0.2.0-py3-none-any.whl
Size 18.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9025de0ffd69e4c0db1fad3658ca3cd5db23bdba78a3ec0c41823a2bfcb94a45
BLAKE2b-256 checksum
How to use checksums
3da31901c4149d1ffb69d148d4125077d54c58bd75236de122a0a8430536ee17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 6, 2026.

Transparency log

Security for prysm1 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for prysm1-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page