# Quickstart

> Make your first request to a NotHoly model in about two minutes.


## 1. Get an API key

1. Create an account at [notholy.com/signup](https://notholy.com/en/signup) and confirm your e-mail.
2. Add credits in **Billing**. The minimum deposit is shown on that page.
3. Open **API keys** and create a key. It starts with `nh_live_` and is shown once.

Export it in your shell. It goes in the `Authorization` header as a bearer token.

```bash
export NOTHOLY_API_KEY="nh_live_..."
```

## 2. List the models

```bash test
curl https://api.notholy.com/v1/models -H "Authorization: Bearer $NOTHOLY_API_KEY"
```

The list is public and shows each model's limits and prices. See [Models](/en/getting-started/models).

## 3. Send a chat completion

```bash test
curl https://api.notholy.com/v1/chat/completions \
  -H "Authorization: Bearer $NOTHOLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "notholy-specter", "messages": [{"role": "user", "content": "Explain IDOR in two sentences."}]}'
```

```python test
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.notholy.com/v1", api_key=os.environ["NOTHOLY_API_KEY"])

r = client.chat.completions.create(
    model="notholy-specter",
    messages=[{"role": "user", "content": "Explain IDOR in two sentences."}],
)
print(r.choices[0].message.content)
```

```js test
import OpenAI from 'openai';

const client = new OpenAI({ baseURL: 'https://api.notholy.com/v1', apiKey: process.env.NOTHOLY_API_KEY });

const r = await client.chat.completions.create({
  model: 'notholy-specter',
  messages: [{ role: 'user', content: 'Explain IDOR in two sentences.' }],
});
console.log(r.choices[0].message.content);
```

## 4. Stream it

Add `"stream": true` and read server-sent events. Each event is `data: {...}`, and the stream ends with `data: [DONE]`. See [Streaming](/en/guides/streaming).

## From the terminal

The CLI uses the same account and signs in from the browser, so you do not need to export a key.

```bash
# macOS and Linux
curl -fsSL https://notholy.com/install.sh | sh
```

```powershell
# Windows (PowerShell)
irm https://notholy.com/install.ps1 | iex
```

```bash
notholy --version
notholy login
notholy "explain IDOR in two sentences"
```

Each step is explained in [Install the CLI](/en/cli/install).

## Common errors

| Status | Code | Fix |
|---|---|---|
| 401 | `invalid_api_key` | Check the key and the `Authorization: Bearer` header |
| 402 | `insufficient_credits` | Add credits in Billing |
| 404 | `model_not_found` | Use an ID from `GET /v1/models` |

## Next steps

- [Authentication](/en/getting-started/authentication): headers, keys and auth errors
- [Models](/en/getting-started/models): the current models, limits and prices
- [Chat completions](/en/api/chat-completions): the full request and response
- [SDKs](/en/getting-started/sdks): the OpenAI and Anthropic SDKs
