> ## 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.

# API keys: generate and rotate your Fluximage API key

> Generate an API key in your Fluximage dashboard to authenticate programmatic requests. Keys start with flx_live_ and are shown only once.

API keys let you call the Fluximage API directly from your own code, scripts, or third-party integrations — without going through the dashboard. Any HTTP client that can send a request with an `Authorization` header can use the API.

## Requirements

API keys are available on paid plans. Full API access, including higher rate limits and batch processing, requires the **Agency plan**. If you are on the Free plan, upgrade to unlock your key.

## Generating a key

<Steps>
  <Step title="Open API Key settings">
    Navigate to **Dashboard → Settings → API Key**.
  </Step>

  <Step title="Generate your key">
    Click **Generate Key**. Your new key is displayed immediately in the key field.
  </Step>

  <Step title="Copy and store the key">
    Copy the key and store it somewhere safe — for example, in a secrets manager or your environment variables. You will not be able to view the raw key again after leaving this screen.
  </Step>
</Steps>

<Warning>
  Your API key is shown **only once**, immediately after generation. Fluximage does not store the raw key value. If you navigate away without copying it, you will need to generate a new key.
</Warning>

## Key format

Every Fluximage API key starts with the prefix `flx_live_` followed by a 40-character hex string:

```
flx_live_a3f9c2e1d8b047f6...b2c1
```

## Rolling (regenerating) a key

You can generate a new key at any time using the **Roll Key** button in Settings. Rolling a key immediately and permanently deactivates your previous key — any request sent with the old key will be rejected.

<Warning>
  Rolling your key **instantly invalidates** the existing key. Update all services, environment variables, and integrations with the new key before rolling, or those integrations will start failing immediately.
</Warning>

## Using your key

Pass your API key in the `Authorization` header as a Bearer token on every request:

```
Authorization: Bearer flx_live_your_key_here
```

### Example: compress an image

```bash theme={null}
curl -X POST https://fluximage.app/api/compress \
  -H "Authorization: Bearer flx_live_your_key_here" \
  -F "file=@image.jpg" \
  -F "format=webp" \
  -F "quality=82"
```
