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

# Quickstart

> From zero to your first completion

## Prerequisites

* A verified Square1 community account. Sign-up happens on the
  [dashboard](https://dash.square1.dev) and includes a one-time community
  verification step (you post a short token as a comment, the server
  checks it, and your account is linked).
* The service is region-locked; requests from outside the allowed region
  are rejected with `403 geo_restricted`.

## Get an API key

<Steps>
  <Step title="Sign in to the dashboard">
    Go to [dash.square1.dev](https://dash.square1.dev) and sign in (or
    complete sign-up if this is your first visit).
  </Step>

  <Step title="Create a key">
    Open the **API Keys** page and create a key. Keys are prefixed
    `sq-arca-` and shown once — store it somewhere safe. You can hold
    multiple labeled keys and rotate or revoke them at any time.
  </Step>
</Steps>

## Make your first request

<CodeGroup>
  ```bash curl theme={null}
  curl https://inference.square1.dev/v1/chat/completions \
    -H "Authorization: Bearer $SQUARE1_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "deepseek-v4-pro",
      "messages": [{"role": "user", "content": "Hello!"}]
    }'
  ```

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

  client = OpenAI(
      base_url="https://inference.square1.dev/v1",
      api_key="sq-arca-...",
  )

  completion = client.chat.completions.create(
      model="deepseek-v4-pro",
      messages=[{"role": "user", "content": "Hello!"}],
  )
  print(completion.choices[0].message.content)
  ```

  ```typescript Node.js theme={null}
  import OpenAI from "openai";

  const client = new OpenAI({
    baseURL: "https://inference.square1.dev/v1",
    apiKey: "sq-arca-...",
  });

  const completion = await client.chat.completions.create({
    model: "deepseek-v4-pro",
    messages: [{ role: "user", content: "Hello!" }],
  });
  console.log(completion.choices[0].message.content);
  ```
</CodeGroup>

The JSON response is the standard OpenAI shape plus a `wellspring` block —
your quota receipt for this request:

```json theme={null}
{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "choices": [{ "index": 0, "message": { "role": "assistant", "content": "Hello! ..." }, "finish_reason": "stop" }],
  "usage": { "prompt_tokens": 9, "completion_tokens": 12, "total_tokens": 21 },
  "wellspring": {
    "request_id": "...",
    "session": { "used_pct": 1.2, "remaining_pct": 98.8, "resets_at": "2026-08-30T04:00:00.000Z", "resets_in_seconds": 17520 },
    "weekly":  { "used_pct": 0.4, "remaining_pct": 99.6, "resets_at": "2026-09-04T12:00:00.000Z", "resets_in_seconds": 512000 },
    "rpm": { "limit": 10, "remaining": 9 }
  }
}
```

## Next steps

<CardGroup cols={2}>
  <Card title="Pick a model" icon="list" href="/api-reference">
    `GET /v1/models` shows every model your key can call, with its input
    ceiling, output cap, and rate limit.
  </Card>

  <Card title="Understand your quota" icon="gauge" href="/concepts/quotas">
    Session, weekly, and per-model budgets — and when they reset.
  </Card>

  <Card title="Stream responses" icon="wave-sine" href="/concepts/streaming">
    SSE streaming, keep-alive pings, and the end-of-stream receipt.
  </Card>

  <Card title="Handle errors" icon="triangle-exclamation" href="/concepts/errors">
    The error envelope and every code you can encounter.
  </Card>
</CardGroup>
