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

# Quickstart

> Get a key and make your first request.

# Quickstart

## Getting an API Key

Sign in at [drain.lat/dashboard](https://drain.lat/dashboard) using Discord. A key is generated automatically on first login. You can view, copy, and regenerate it from the dashboard. No Discord channel or manual request needed.

<Warning>
  Keep your key private. Don't commit it to git or share it publicly.
</Warning>

## Make a Request

Grab a GitHub profile to test your key.

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://drain.lat/api/v1/github/profile/torvalds" \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch("https://drain.lat/api/v1/github/profile/torvalds", {
    headers: { "x-api-key": "YOUR_API_KEY" }
  });
  const data = await res.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  res = requests.get(
      "https://drain.lat/api/v1/github/profile/torvalds",
      headers={"x-api-key": "YOUR_API_KEY"}
  )
  print(res.json())
  ```
</CodeGroup>

```json theme={null}
{
  "id": 1024025,
  "username": "torvalds",
  "displayName": "Linus Torvalds",
  "bio": "Just for fun",
  "company": "Linux Foundation",
  "location": "Portland, OR",
  "followers": 234000,
  "publicRepos": 8,
  "profileUrl": "https://github.com/torvalds",
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}
```

## Auth Header

Every request needs one of these headers:

```http theme={null}
x-api-key: YOUR_API_KEY
```

Or alternatively:

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

Missing or wrong key returns:

```json theme={null}
{
  "error": "Invalid or missing API key"
}
```
