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

# Quickstart

> Make your first PrimaLabs API call in under a minute.

<Steps>
  <Step title="Get an API key">
    Sign in to the [dashboard](https://dashboard.primalabs.ai) and create a key. Treat it
    like a password — it spends against your balance.
  </Step>

  <Step title="Pick a model">
    List the models your key can call:

    ```bash theme={null}
    curl -sS https://api.primalabs.ai/v1/models \
      -H "Authorization: Bearer YOUR_API_KEY"
    ```

    ```json theme={null}
    {
      "object": "list",
      "data": [
        { "id": "primalabs-ai/DeepSeek-V4-Flash-0731", "object": "model", "max_input_tokens": 1048576 },
        { "id": "primalabs-ai/Qwen3.8-27B", "object": "model", "max_input_tokens": 262144 }
      ]
    }
    ```

    The `id` is what you pass as `model`. Pricing is on the [Models](/inference/models) page.
  </Step>

  <Step title="Send a request">
    <CodeGroup>
      ```bash cURL theme={null}
      curl -sS https://api.primalabs.ai/v1/chat/completions \
        -H "Authorization: Bearer YOUR_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "primalabs-ai/DeepSeek-V4-Flash-0731",
          "messages": [{"role": "user", "content": "Hello"}]
        }'
      ```

      ```python Python theme={null}
      from openai import OpenAI

      client = OpenAI(
          base_url="https://api.primalabs.ai/v1",
          api_key="YOUR_API_KEY",
      )

      r = client.chat.completions.create(
          model="primalabs-ai/DeepSeek-V4-Flash-0731",
          messages=[{"role": "user", "content": "Hello"}],
      )
      print(r.choices[0].message.content)
      ```

      ```javascript Node theme={null}
      import OpenAI from "openai";

      const client = new OpenAI({
        baseURL: "https://api.primalabs.ai/v1",
        apiKey: "YOUR_API_KEY",
      });

      const r = await client.chat.completions.create({
        model: "primalabs-ai/DeepSeek-V4-Flash-0731",
        messages: [{ role: "user", content: "Hello" }],
      });
      console.log(r.choices[0].message.content);
      ```
    </CodeGroup>
  </Step>

  <Step title="Stream the response">
    Set `stream: true` to receive tokens as server-sent events:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -sS -N https://api.primalabs.ai/v1/chat/completions \
        -H "Authorization: Bearer YOUR_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "primalabs-ai/DeepSeek-V4-Flash-0731",
          "messages": [{"role": "user", "content": "Hello"}],
          "stream": true
        }'
      ```

      ```python Python theme={null}
      stream = client.chat.completions.create(
          model="primalabs-ai/DeepSeek-V4-Flash-0731",
          messages=[{"role": "user", "content": "Hello"}],
          stream=True,
      )
      for chunk in stream:
          print(chunk.choices[0].delta.content or "", end="")
      ```

      ```javascript Node theme={null}
      const stream = await client.chat.completions.create({
        model: "primalabs-ai/DeepSeek-V4-Flash-0731",
        messages: [{ role: "user", content: "Hello" }],
        stream: true,
      });
      for await (const chunk of stream) {
        process.stdout.write(chunk.choices[0].delta.content ?? "");
      }
      ```
    </CodeGroup>
  </Step>
</Steps>

<Info>
  Already using the Anthropic SDK or the OpenAI Responses API? The same key works against
  `POST /messages` and `POST /responses` — see the
  [endpoint list](/inference/introduction#endpoints).
</Info>
