# Quickstart (/quickstart)



You need an API key and a prepaid credit balance. Create a key in the [console](https://console.zumik.ai), then add credits (from $5). Inference is blocked until your balance is funded, so do this first. See [authentication](/authentication) for key formats and [pricing](/pricing/plans) for how billing works.

<Steps>
  <Step title="Point an OpenAI client at Zumik">
    The only line that changes is the base URL. Request and response bodies stay byte-for-byte OpenAI-compatible.

    <CodeGroup>
      ```python title="Python"
      from openai import OpenAI

      client = OpenAI(
          base_url="https://api.zumik.ai/v1",
          api_key="zk_live_...",
      )

      r = client.responses.create(
          model="code.balanced",   # a Zumik alias, resolved at request time
          input="Review the latest patch.",
      )
      print(r.output_text)
      ```

      ```typescript title="TypeScript"
      import OpenAI from "openai";

      const client = new OpenAI({
        baseURL: "https://api.zumik.ai/v1",
        apiKey: process.env.ZUMIK_KEY,
      });

      const r = await client.responses.create({
        model: "code.balanced",
        input: "Review the latest patch.",
      });
      ```

      ```bash title="curl"
      curl https://api.zumik.ai/v1/responses \
        -H "Authorization: Bearer zk_live_..." \
        -H "Content-Type: application/json" \
        -d '{"model":"code.balanced","input":"Review the latest patch."}'
      ```
    </CodeGroup>

    <Tip>
      Keep stable content (system instructions, tools, context) at the front of the request so provider prompt caching can match the prefix. See [prompt caching](/guides/prompt-caching).
    </Tip>
  </Step>

  <Step title="Create a reusable artifact on /v2">
    Turn stable instructions, tool definitions, or policies into an opaque, immutable handle instead of resending them on every call. The handle is the artifact ID; the content lives behind the tenant boundary.

    ```bash
    curl https://api.zumik.ai/v2/artifacts \
      -H "Authorization: Bearer zk_live_..." \
      -H "Content-Type: application/json" \
      -d '{"artifact_type":"policy","content":"Run the linter before every commit."}'
    # => { "id": "art_01JY...", "object": "artifact", "artifact_type": "policy" }
    ```

    Group artifacts into an ordered [bundle](/concepts/bundles), then attach the bundle to a [session](/concepts/sessions) to carry stable state across turns.
  </Step>

  <Step title="Run a workload diagnostic">
    Before you change any infrastructure, score how much of your traffic is reusable. The diagnostic reads metadata traces and returns a [Workload Reuse Score](/concepts/workload-reuse-score), the reuse waterfall, a recommended [execution profile](/concepts/execution-profiles), and the missed-opportunity gap.

    ```bash
    curl https://api.zumik.ai/v2/diagnostics \
      -H "Authorization: Bearer zk_live_..." \
      -H "Content-Type: application/json" \
      -d '{"source":"trace_export","trace_mode":"metadata","sample_ref":"trc_..."}'
    ```

    The diagnostic runs on metadata only by default, so no raw prompt text is retained. See [workload diagnostics](/guides/workload-diagnostics) for how to read the report.
  </Step>
</Steps>

## Where to go next [#where-to-go-next]

<CardGroup cols="2">
  <Card title="OpenAI compatibility" icon="arrow-right-arrow-left" href="/openai-compatibility">
    The exact compatibility contract and the header-based extension rules.
  </Card>

  <Card title="Sessions and branching" icon="code-branch" href="/guides/sessions-and-branching">
    Append-only branches with optimistic concurrency for multi-turn agents.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Key formats, bearer auth, rotation, and per-key budgets.
  </Card>

  <Card title="Pricing and credits" icon="tag" href="/pricing/plans">
    How pay-as-you-go credits, budgets, and per-model pricing work.
  </Card>
</CardGroup>
