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

# Authenticate Fluximage API requests with Bearer tokens

> Pass your API key as a Bearer token in the Authorization header on every Fluximage API request. Keys require the Agency plan and are shown only once.

Every request to the Fluximage API must be authenticated with an API key passed as a Bearer token in the `Authorization` header. You generate and manage your key from **Dashboard > Settings > API Key**. API access requires the **Agency plan**.

## Sending your API key

Include your key in the `Authorization` header on every request:

```
Authorization: Bearer flx_live_your_key_here
```

### Example

```bash theme={null}
curl https://fluximage.app/api/usage \
  -H "Authorization: Bearer flx_live_your_key_here"
```

## API key format

Your API key always starts with `flx_live_` followed by 40 hexadecimal characters:

```
flx_live_<40 hex characters>
```

You can identify your key in the dashboard by its masked prefix (for example, `flx_live_a3b4c...f8e9`).

## Getting your API key

<Steps>
  <Step title="Open your dashboard">
    Log in to your Fluximage account at [fluximage.app](https://fluximage.app).
  </Step>

  <Step title="Navigate to API settings">
    Go to **Settings > API Key** in the left navigation.
  </Step>

  <Step title="Generate a key">
    Click **Generate API Key**. Your full key is displayed once — copy it immediately.
  </Step>
</Steps>

<Info>
  API key generation requires the **Agency plan**. If you don't see the option, upgrade your plan first.
</Info>

Visit [Settings > API Keys](/settings/api-keys) to manage your key.

## Error responses

If your key is missing, malformed, or invalid, the API returns:

```json theme={null}
HTTP 401 Unauthorized

{ "error": "Unauthorized" }
```

## Security

<Warning>
  Your API key is shown only once when it is generated. Store it in a secure location such as an environment variable or a secrets manager — you cannot retrieve the full key again from the dashboard.
</Warning>

<Warning>
  Rolling (regenerating) your key immediately invalidates the previous one. Update all integrations with the new key before regenerating to avoid downtime.
</Warning>
