# Quickstart

In about five minutes, you'll sign in, create an API key and make your first model call through the ATLAS gateway.

## Before you begin

- Your organisation is set up on ATLAS and you have an account in it. If not, sign-in ends on an error page such as **Access Refused** or **Organization Not Recognized**. Ask your organisation's Admin or your ilionx contact.
- You are a member of at least one team space or active project that has a model enabled. A key acts under a space or project, its acting context.
  The acting context decides which models you can call and whose budget pays.
- You know your ATLAS address. Replace `https://<atlas-host>` with your ATLAS address. The web app and the gateway share it, and every gateway URL starts with `/gateway`.

## 1. Sign in

1. Open the web app and select **Log in**.
2. Enter your work email address. ATLAS recognises your organisation from the email domain and sends you to your company's login page.
3. Sign in. You land in the app, and the **Personal** group in the sidebar holds **Chat**, **My usage**, **My conversations** and **My API keys**.

## 2. Create an API key

1. Open **My API keys** and select **Create API key**.
2. Choose a **Context**, the space or project the key acts under.
3. Enter a **Name**, for example `quickstart`.
4. Choose an **Expiration**. 90 days is preselected, and your space may cap the maximum.
5. Select **Create Key**.
6. In the **API Key Created** dialog, copy the key. It starts with `atl_sk_`. The dialog says you won't see the key again. Until the key expires, you can still copy it with **Copy Key** in its row menu.

Store the key and your ATLAS address in environment variables:

```bash
# BASE_URL is your ATLAS address, without a trailing slash
export BASE_URL="https://<atlas-host>"
export API_KEY="atl_sk_..."
```

## 3. Make your first call

1. List the models your key can use:

   ```bash
   curl -s "$BASE_URL/gateway/openai/v1/models" \
     -H "Authorization: Bearer $API_KEY"
   ```

   Each model `id` has the form `provider-slug/model-slug`, for example `openai/gpt-4.1`.

2. Copy one `id` and send a chat completion:

   ```bash
   curl -s "$BASE_URL/gateway/openai/v1/chat/completions" \
     -H "Authorization: Bearer $API_KEY" \
     -H "Content-Type: application/json" \
     -d '{"model":"openai/gpt-4.1","messages":[{"role":"user","content":"Say hello"}]}'
   ```

   The response is a JSON completion with the model's reply in `choices[0].message.content`. The request appears in **My usage** and counts against the budget of your key's acting context.

Anthropic clients use `$BASE_URL/gateway/anthropic` as their base address. They send the same key as a bearer token or in an `x-api-key` header. For more information, see [connect OpenAI and Anthropic clients](https://docs.atlas.ilionx.dev/guides/user/gateway-connect-openai-and-anthropic-clients.md).

## 4. Try the chat (optional)

Open **Chat** and send a message from one of the starters (**Summarise**, **Write code**, **Explain** or **Draft an email**). The composer asks you to pick an API key, then a model, before it accepts a message.

## If something fails

| Response                      | What it means                                                                                      |
| ----------------------------- | -------------------------------------------------------------------------------------------------- |
| `401 authentication_required` | The key is missing, mistyped, expired or revoked.                                                  |
| `404 model_not_found`         | Use `provider-slug/model-slug` exactly as `/models` lists it. A bare name such as `gpt-4.1` fails. |
| `403 no_acting_context`       | The key has no space or project. Use **Switch Context** in the key's row menu.                     |

For every code, see [Errors](https://docs.atlas.ilionx.dev/reference/errors.md#common-gateway-codes). For symptoms and fixes, see [Troubleshooting](https://docs.atlas.ilionx.dev/guides/troubleshooting.md).

## Next steps

- Connect a coding tool: [Claude Code and opencode](https://docs.atlas.ilionx.dev/guides/user/api-keys-connect-your-tools.md), [any OpenAI- or Anthropic-compatible client](https://docs.atlas.ilionx.dev/guides/user/gateway-connect-openai-and-anthropic-clients.md) or [your IDE](https://docs.atlas.ilionx.dev/guides/user/gateway-connect-your-ide.md).
- Learn the terms in the [glossary](https://docs.atlas.ilionx.dev/reference/glossary.md).
- Understand keys and acting contexts in [API keys concepts](https://docs.atlas.ilionx.dev/concepts/api-keys.md).
- Look up endpoints and headers in the [Gateway reference](https://docs.atlas.ilionx.dev/reference/gateway.md).
