Skip to main content
The prysm command ships with the Python SDK. Install it once and you have routing previews, the model catalog, BRAIN.md validation, usage stats, one-shot chat, multi-model orchestration, self-correcting code generation, and compliance previews from the terminal.
pip install prysm1
Configure it with the standard environment variables:
export PRYSM_API_KEY="prysm_sk_your_key"
# Optional:
export PRYSM_BASE_URL="https://api.prysm1.com/v1"

Commands

CommandWhat it does
prysm route "<prompt>"Preview routing + estimated cost (no model call).
prysm modelsList the 19-model catalog with pricing, sorted by input price.
prysm brain validate [path]Validate a BRAIN.md (defaults to ./BRAIN.md).
prysm usageUsage stats for your key.
prysm chat "<prompt>"One-shot completion (routed) — prints the answer.
prysm orchestrate "<prompt>"Multi-model orchestration (v2) — prints the answer + which models ran.
prysm code "<task>"Code Mode (v2) — self-correcting code generation; prints the files.
prysm compliance preview "<prompt>"Dry-run the compliance gate — classes, allowed/excluded models, CCP (no model call).
prysm --versionPrint the installed version.

prysm route

Preview which model PRYSM would pick — and what it would cost — without spending anything. Add --mode to force quality, balanced, or agility.
$ prysm route "write a python function to sort a list"
model:    deepseek-v3.2  (DeepSeek V3.2)
mode:     balanced    tier: budget
why:      Code: 95% cheaper than GPT-5.2
est cost: $0.000700 / 1K tokens  (in 0.28 / out 0.42 per MTok)
signals:  code
prysm route "summarize this 30-page report in depth" --mode quality

prysm models

$ prysm models
MODEL                    TIER       IN $/MTok  OUT $/MTok
mistral-nemo             budget          0.02        0.02
gpt-5-nano               budget          0.05         0.4
gemini-2.5-flash-lite    budget           0.1         0.4
...
21 models

prysm brain validate

Validates ./BRAIN.md by default, or a path you pass. Exits non-zero when the config is invalid — handy in CI.
$ prysm brain validate
VALID  (BRAIN.md)

$ prysm brain validate config/BRAIN.md
INVALID  (config/BRAIN.md)
  error:   unknown model in rule: ghost-model
Wire it into a pre-commit hook or CI step so a broken BRAIN.md never ships:
prysm brain validate || exit 1

prysm usage

$ prysm usage
user:     usr_demo   plan: free
requests: 128
tokens:   512340
cost:     $0.214500

prysm chat

A one-shot routed completion. The answer prints to stdout; the routing summary prints to stderr, so you can pipe the answer cleanly.
$ prysm chat "explain a bloom filter in two sentences"
A Bloom filter is a space-efficient probabilistic data structure...
[routed to DeepSeek V3.2 · $0.000058]
# Pipe just the answer (routing note goes to stderr):
prysm chat "name three uses for a heap" > answer.txt

prysm orchestrate

Run a prompt across several models and synthesize one answer — then see which models contributed and how strongly they agreed. Pick the objective with --policy; force an execution shape with --strategy. See How orchestration works.
$ prysm orchestrate "Compare three database designs for a 40-person team" --policy depth
Across the three designs, the trade-offs cluster around consistency vs. operational cost...

policy:   depth    strategy: ensemble_moa
models:   claude-sonnet-4.5, gpt-5.2, gemini-3.1-pro
agree:    0.81    confidence: 0.88
cost:     $0.004812 (est)    proof: sha256:a1b2c3d4e5f60718
FlagWhat it does
--policyefficiency, balanced (default), or depth.
--strategyForce single, cascade, ensemble_moa, rank_fuse, decompose_and_route, self_consistency, or debate.
--kEnsemble / sample width.
--max-costSoft budget hint, in USD.

prysm code

Generate code with a self-correcting, multi-model loop: a coder writes it, a separate critic reviews it, and the coder repairs against the feedback. The files print to stdout; the run summary (verdict, models, cost, proof) prints to stderr, so you can pipe the code cleanly. See How Code Mode works.
$ prysm code "Write a Python function to add two numbers" --policy balanced
===== main.py  (python) =====
def add(a, b):
    """Return the sum of two numbers."""
    return a + b

[PASS] policy: balanced    language: python    iterations: 1
coders: qwen-2.5-72b    reviewer: deepseek-r1
cost: $0.000412 (est)    proof: sha256:7f3a9c2b1e4d8a06
Write the files to disk instead of stdout, force the models, or skip the critic loop:
# Write generated files into ./out (creates directories as needed):
prysm code "Implement a CLI todo app in Python" --policy depth --out ./out

# Single shot, no critic loop:
prysm code "Write a Python hello world" --no-review
FlagWhat it does
--policyefficiency, balanced (default), or depth.
--language / --langForce the target language (auto-detected if omitted).
--coder-modelForce the model that writes the code.
--reviewer-modelForce the critic model.
--max-itersGenerate + up to max-iters - 1 repairs.
--no-reviewSingle shot — skip the critic loop.
--max-costSoft budget hint, in USD (stops the repair loop).
--outWrite files to this directory instead of stdout.
prysm code exits 0 when the review passes and 1 when it fails (or on error), so it drops cleanly into CI and scripts.

prysm compliance preview

Dry-run the Policy-as-Code compliance gate against a prompt — no model is called. It reports which sensitive data classes the text triggers, which models the policy allows vs excludes, and the Compliance Cost Premium. Build the policy from flags (and/or a JSON --policy-file; flags override the file).
$ prysm compliance preview "wire payment to DE89370400440532013000" \
    --jurisdiction EU --frameworks GDPR --data-residency EU
classes:  FINANCIAL
status:   OK
allowed:  2 mistral-nemo, mistral-medium-3
excluded: 17
CCP:      +$0.000000/MTok (0.0%)  [mistral-nemo vs unrestricted mistral-nemo]
attest:   sha256:a1b2c3d4e5f60718
Block a data class outright — a leaked secret with SECRETS blocked is a hard stop:
$ prysm compliance preview "deploy key AKIAIOSFODNN7EXAMPLE" --block-classes SECRETS
classes:  SECRETS
status:   BLOCKED no approved model can serve this request
allowed:  0 (none)
excluded: 19
FlagWhat it does
--allowComma-separated provider allowlist (e.g. anthropic,openai).
--denyComma-separated provider denylist.
--jurisdictionAllowed jurisdictions (e.g. US,EU).
--frameworksRequired frameworks (e.g. GDPR,CCPA).
--certificationsRequired certifications (e.g. SOC2,HIPAA).
--data-residencyRequired data regions (e.g. EU).
--block-classesData classes to block: PII,PHI,FINANCIAL,SECRETS.
--zero-retentionRequire a zero-retention provider mode.
--policy-fileJSON Policy-as-Code spec; inline flags override it.
prysm compliance preview exits 0 when at least one approved model can serve the request and 1 when the policy blocks every model — so it gates CI cleanly.

Exit codes

CodeMeaning
0Success (and, for brain validate, the config is valid).
1A runtime error, or an invalid BRAIN.md.
2A file couldn’t be read (e.g. missing BRAIN.md path).
Errors print a clean one-line message to stderr — never a stack trace.