> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prysm1.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Make your first routed request in under five minutes.

This guide takes you from zero to a routed completion — and shows you how to see
exactly which model PRYSM picked and what it cost.

<Steps>
  <Step title="Get an API key">
    Create a key at [prysm1.com](https://prysm1.com). PRYSM keys look like
    `prysm_sk_...`. Keep it secret — treat it like any other credential.

    <Tip>
      Set it as an environment variable so it never lands in your code:

      ```bash theme={null}
      export PRYSM_API_KEY="prysm_sk_your_key"
      ```
    </Tip>
  </Step>

  <Step title="Install an SDK (optional)">
    PRYSM is OpenAI-compatible, so you can use the official OpenAI SDK directly — or
    install a first-party PRYSM SDK for the extra helpers.

    <CodeGroup>
      ```bash Python theme={null}
      pip install prysm1
      ```

      ```bash Node theme={null}
      npm install @prysmai/sdk
      ```

      ```bash OpenAI SDK (Python) theme={null}
      pip install openai
      ```

      ```bash OpenAI SDK (Node) theme={null}
      npm install openai
      ```
    </CodeGroup>
  </Step>

  <Step title="Make your first request">
    Set `model: "auto"` and let PRYSM route it.

    <CodeGroup>
      ```python prysm1 theme={null}
      from prysm import Prysm

      client = Prysm()  # api_key from $PRYSM_API_KEY

      resp = client.chat.completions.create(
          model="auto",
          messages=[{"role": "user", "content": "Write a Python function to reverse a string"}],
      )
      print(resp.choices[0].message.content)
      ```

      ```typescript @prysmai/sdk theme={null}
      import { Prysm } from "@prysmai/sdk";

      const client = new Prysm(); // apiKey from $PRYSM_API_KEY

      const resp = await client.chat.completions.create({
        model: "auto",
        messages: [{ role: "user", content: "Write a TypeScript function to reverse a string" }],
      });
      console.log(resp.choices[0].message.content);
      ```

      ```bash cURL theme={null}
      curl https://api.prysm1.com/v1/chat/completions \
        -H "Authorization: Bearer $PRYSM_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "auto",
          "messages": [{ "role": "user", "content": "Write a Python function to reverse a string" }]
        }'
      ```
    </CodeGroup>
  </Step>

  <Step title="See the routing decision">
    Every response includes a `prysm` block. With the SDKs, read it with `extension()`:

    <CodeGroup>
      ```python Python theme={null}
      from prysm import extension

      ext = extension(resp)
      print(ext.routing.model_display)  # e.g. "DeepSeek V4 Flash"
      print(ext.routing.reason)         # why this model was chosen
      print(ext.cost.total_usd)         # what the call cost
      print(ext.proof.proof_hash)       # "sha256:..."
      ```

      ```typescript Node theme={null}
      import { extension } from "@prysmai/sdk";

      const ext = extension(resp);
      console.log(ext?.routing?.model_display); // e.g. "DeepSeek V4 Flash"
      console.log(ext?.routing?.reason);        // why this model was chosen
      console.log(ext?.cost?.total_usd);        // what the call cost
      console.log(ext?.proof?.proof_hash);      // "sha256:..."
      ```
    </CodeGroup>
  </Step>

  <Step title="Preview routing without spending">
    Want to know which model PRYSM would pick — and the estimated cost — without
    actually calling it? Use a dry run:

    <CodeGroup>
      ```python Python theme={null}
      print(client.route("debug this regex"))
      # { routing: { model: "deepseek-v4-flash", ... }, estimated_cost: { ... } }
      ```

      ```typescript Node theme={null}
      console.log(await client.route("debug this regex"));
      ```

      ```bash cURL theme={null}
      curl https://api.prysm1.com/v1/route \
        -H "Authorization: Bearer $PRYSM_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{ "prompt": "debug this regex" }'
      ```
    </CodeGroup>
  </Step>
</Steps>

## What just happened

1. You sent an OpenAI-shaped request with `model: "auto"`.
2. PRYSM **classified the intent** of your prompt (here: code) and selected the
   best-value model for it — see [How routing works](/concepts/routing).
3. It returned a standard OpenAI completion **plus** a `prysm` block with the model,
   reason, cost, latency, and a [PrysmProof](/concepts/prysmproof) receipt.

## Next steps

<CardGroup cols={2}>
  <Card title="Add a BRAIN.md" icon="file-code" href="/concepts/brain-md">
    Pin models to tasks, cap costs, and block models — all in one version-controlled file.
    Run `prysm init` to scaffold one instantly.
  </Card>

  <Card title="Python SDK" icon="python" href="/sdks/python">
    Helpers for routing, usage, savings, and BRAIN.md auto-discovery.
  </Card>

  <Card title="Node SDK" icon="node-js" href="/sdks/node">
    The same drop-in ergonomics, fully typed for TypeScript.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/introduction">
    Every endpoint and field, with copy-paste examples.
  </Card>
</CardGroup>
