> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.homemediadb.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.homemediadb.com/_mcp/server.

# Authentication

All API endpoints require a user-level API key, **reads included**. The key gates abuse and attributes usage to your account.

Send it as a Bearer token on every request:

```bash
curl "https://api.homemediadb.com/v0/release/byId?id=895" \
  -H "Authorization: Bearer ak_your_key_here"
```

> **Note**
>
> Your key acts as **you**. It can create and edit contributions (reviews, trivia, cover votes) under your account. It **cannot** change account settings such as your email or password.

## Create a key

#### Sign in

Go to [homemediadb.com](https://homemediadb.com) and log in, or create a free account.

#### Open your account settings

Click your profile image in the top-right and choose **Manage account**.

#### Go to API keys

Select the **API keys** tab on the left of the window.

#### Add a key

Click **Add a new key** and give it a name, for example the client, app or domain it will be used with. The expiration date is optional and up to you.

Keys are prefixed `ak_`. Copy the key when it's shown; store it somewhere safe.

## Be considerate

> **Tip**
>
> Make only the requests you need, [cache](/making-requests#caching) where appropriate, and identify yourself with a descriptive `User-Agent`. Don't hammer the API.

> **Warning**
>
> **You are responsible for your API key.** Any misuse, overuse, sharing or exploitative action may lead to a permanent ban from both the website and the API. Keep it safe and secret; never commit it to source control or ship it in client-side code.

A missing or invalid key returns `401 UNAUTHORIZED`. See [Errors](/errors) for the full list.