PRYSM — universal AI routing, OpenAI drop-in. One API, every model, always the best one.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prysm1-0.1.0.tar.gz.
File metadata
- Download URL: prysm1-0.1.0.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcf568d6ec06b1efb96014a0ad2217d09231fa69af22e5bed18e8e6eac634c89
|
|
| MD5 |
d760e1c42cf8f1f735dbdeef72d64d6b
|
|
| BLAKE2b-256 |
7245eb0cca9fa97e80103d9e8c0fc66a5899897b3a9b5623a2b237f45e3ff6b8
|
Provenance
The following attestation bundles were made for prysm1-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on santiagoecheverria/prysm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prysm1-0.1.0.tar.gz -
Subject digest:
fcf568d6ec06b1efb96014a0ad2217d09231fa69af22e5bed18e8e6eac634c89 - Sigstore transparency entry: 1735870134
- Sigstore integration time:
-
Permalink:
santiagoecheverria/prysm@7e88d34fa8f45958f34b0b638142ce65ba2d2923 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/santiagoecheverria
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7e88d34fa8f45958f34b0b638142ce65ba2d2923 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file prysm1-0.1.0-py3-none-any.whl.
File metadata
- Download URL: prysm1-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acbef390a5188ee547a91100110a4c22bfd9ae4b65cd6417dbee89d21d37fe18
|
|
| MD5 |
8de71c470fafaf23f144ebed26f3237f
|
|
| BLAKE2b-256 |
99336a0e82ce15b0b68c7e597e5945a43bd21e534d672d509e069e4acc1c92bc
|
Provenance
The following attestation bundles were made for prysm1-0.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on santiagoecheverria/prysm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prysm1-0.1.0-py3-none-any.whl -
Subject digest:
acbef390a5188ee547a91100110a4c22bfd9ae4b65cd6417dbee89d21d37fe18 - Sigstore transparency entry: 1735870194
- Sigstore integration time:
-
Permalink:
santiagoecheverria/prysm@7e88d34fa8f45958f34b0b638142ce65ba2d2923 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/santiagoecheverria
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7e88d34fa8f45958f34b0b638142ce65ba2d2923 -
Trigger Event:
workflow_dispatch
-
Statement type: