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

# Authentication

> Learn how to authenticate into Extruct API.

## When to use

Use this page before calling any endpoint. Every Extruct API request requires a Bearer token.

## Example request

```bash theme={null}
export EXTRUCT_API_TOKEN="YOUR_API_TOKEN"

curl --get "https://api.extruct.ai/v1/user" \
  -H "Authorization: Bearer ${EXTRUCT_API_TOKEN}"
```

Generate and manage tokens in [Dashboard API Tokens](https://app.extruct.ai/api-tokens).

## Key parameters

* `Authorization` header (required): `Bearer ${EXTRUCT_API_TOKEN}`.

## Success signal

A successful auth check returns your user object with fields such as `email` and `available_credits`.

## Common errors

### `401 Unauthorized`

Most common causes are a missing token, invalid token, or missing `Bearer ` prefix.

## Related endpoints

* [Get User (`GET /v1/user`)](/api-reference/user)
