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

# Authentication

> Authenticate API requests with server-side keys

## API Keys

Format: `sp3ndpay_live_xxx` (production) or `sp3ndpay_test_xxx` (test)

## Authentication Header

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

## Example Request

```bash theme={null}
curl https://api.sp3ndpay.shop/v1/products/preview \
  -H "Authorization: Bearer sp3ndpay_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.amazon.com/dp/B0CDEMO123"}'
```

## Security

<Warning>
  Never expose API keys in client-side code or public repositories.
</Warning>

**Best Practices:**

* Store in environment variables
* Use backend only
* Rotate keys regularly
* Never commit to git

## Getting Keys

<Note>
  API access is in private beta. Contact us on Telegram to request access.
</Note>

## Tiers

| Tier       | Rate Limit | Features        |
| ---------- | ---------- | --------------- |
| Free       | 60/min     | Basic endpoints |
| Pro        | 600/min    | All endpoints   |
| Enterprise | Custom     | SLA, support    |

## Errors

**Invalid Key:**

```json theme={null}
{
  "error": {
    "code": "invalid_api_key",
    "message": "API key is invalid or revoked"
  }
}
```

**Missing Key:**

```json theme={null}
{
  "error": {
    "code": "missing_api_key",
    "message": "No API key in Authorization header"
  }
}
```

<Card title="Preview Product" icon="arrow-right" href="/api-reference/preview-product">
  Start making requests
</Card>
