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

# Quickstart: first request

> Send one OpenAI-compatible chat completion through Dahl to verify your API key and model access.

Send a single `POST /v1/chat/completions` request through Dahl to confirm everything works. You need:

* Base URL: `https://inference.dahl.global/v1`
* A Bearer API key (from an [account](https://inference.dahl.global/account) or [`POST /tokens`](https://inference.dahl.global/tokens))
* A current model ID from [`GET /v1/models`](/models)

## Before you start

* An API key (see [Authentication](/authentication))
* Each new key currently includes **100 million tokens**
* A fresh model ID from `GET /v1/models` — do not guess IDs or copy them from marketing pages

<Tip>
  Store your key securely. Treat it like a password: do not commit it to git or paste it into public channels. If you create an account, also save the **fingerprint** — it cannot be recovered.
</Tip>

## Step 1 — Get your API key

**Option A — create an account (recommended)**

1. Open [inference.dahl.global](https://inference.dahl.global) → **Create account**
2. Pick a username and **save the fingerprint** you are shown once
3. Copy the first API key from the success screen (or from [/account](https://inference.dahl.global/account))

**Option B — landing page (anonymous key)**

Open [inference.dahl.global/#models](https://inference.dahl.global/#models), wait for the key to load, and copy it from the yellow API key field (or use **Get API key** in the header).

**Option C — API**

```bash theme={null}
curl -X POST https://inference.dahl.global/tokens
```

Example response:

```json theme={null}
{
  "token": "dahl_…",
  "available_tokens": 100000000
}
```

Export the token for the next steps:

```bash theme={null}
export DAHL_API_KEY="dahl_…"
```

You can later [link an anonymous key](/authentication#manage-keys-in-your-account) to an account with **claim**.

## Step 2 — List available models

`GET /v1/models` is public — no API key required.

```bash theme={null}
curl https://inference.dahl.global/v1/models
```

Pick an `id` from the `data` array. For most tasks, start with **MiniMax M2.7**:

`MiniMaxAI/MiniMax-M2.7`

If the list is empty or the service is still starting, retry with short bounded backoff.

## Step 3 — Send your first request

```bash theme={null}
curl https://inference.dahl.global/v1/chat/completions \
  -H "Authorization: Bearer $DAHL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMaxAI/MiniMax-M2.7",
    "messages": [
      { "role": "user", "content": "Hello, Dahl!" }
    ]
  }'
```

## Expected result

A successful request returns **200 OK**. The assistant text is in `choices[0].message.content`.

```json theme={null}
{
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "..."
      }
    }
  ]
}
```

## Common first failures

| Response                                              | What it usually means           | What to check                                                                               |
| ----------------------------------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------- |
| `401` with `Missing API token`                        | No `Authorization` header       | Add `Authorization: Bearer` with your token                                                 |
| `401` with `invalid API token` or `expired API token` | Key is wrong or revoked         | Create a new key at [/account](https://inference.dahl.global/account) or via `POST /tokens` |
| `402` with `available tokens exhausted`               | Key allowance spent             | Create another key (100M each)                                                              |
| `4xx` / `502` from upstream                           | Stale or unsupported `model` id | Call `GET /v1/models` and use an `id` from the response                                     |
| `503` or timeouts                                     | Network or node overload        | Retry with short backoff                                                                    |

## See also

* [Authentication](/authentication) — accounts, fingerprints, and API keys
* [Models](/models) — model IDs and selection tips
* [Try chat](https://inference.dahl.global/chat) — browser UI with the same API underneath
* [Account](https://inference.dahl.global/account) — manage keys and usage
