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

# Authentication

> Authenticate with the RawUGC API using Bearer tokens

## Bearer token authentication

All API requests require a Bearer token in the `Authorization` header:

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

## Creating API keys

Create API keys from your [Account Settings](https://rawugc.com/account) page in the RawUGC dashboard.

<Warning>
  API key secrets are only shown once when created. Store them securely -- you cannot retrieve the secret later.
</Warning>

## Authentication methods

The API supports two authentication methods:

| Method      | Header                        | Rate Limit | Use Case                          |
| ----------- | ----------------------------- | ---------- | --------------------------------- |
| **API Key** | `Authorization: Bearer <key>` | 10 req/min | Programmatic access, integrations |
| **Session** | Browser cookies               | 20 req/min | Dashboard, in-app usage           |

Most API consumers should use API key authentication.

## Error responses

Invalid or missing authentication returns a `401` error:

```json theme={null}
{
  "type": "https://api.rawugc.com/errors/authentication_error",
  "title": "Authentication Error",
  "status": 401,
  "detail": "Invalid API key"
}
```

See [Error Handling](/errors) for all error types.
