> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.resemble.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.resemble.ai/_mcp/server.

# Authentication

All Resemble API endpoints use the same authentication method. Your API key works across supported Resemble API servers.

## Getting Your API Key

Create or retrieve your API key from the [Account → API](https://app.resemble.ai/hub/api) page.

## Authentication Format

Protected requests require a Bearer token in the Authorization header:

```http
Authorization: Bearer <API_KEY>
```

## Servers

Resemble uses different servers depending on the endpoint type:

| Server              | Base URL                                 | Purpose                                                                                         |
| ------------------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------- |
| API                 | `https://app.resemble.ai/api/v2`         | Deepfake Detection, Detect Agents, Intelligence, Identity, Watermarking, and account management |
| Billing             | `https://app.resemble.ai/billing/api/v1` | Plans, subscriptions, adjustable products, and wallet                                           |
| Detection streaming | `wss://stream.resemble.ai`               | Real-time audio Deepfake Detection                                                              |

### API Server Example

```bash
curl 'https://app.resemble.ai/api/v2/detect' \
  -H 'Authorization: Bearer <API_KEY>'
```

### Billing Server Example

```bash
export RESEMBLE_API_KEY="your_api_key"

curl 'https://app.resemble.ai/billing/api/v1/subscription' \
  -H "Authorization: Bearer $RESEMBLE_API_KEY"
```

## SDK Configuration

The SDKs handle authentication automatically once you set your API key:

### Node.js

```ts
import { Resemble } from "@resemble/node";

Resemble.setApiKey("YOUR_API_KEY");
```

### Python

```python
from resemble import Resemble

Resemble.api_key("YOUR_API_KEY")
```

Store tokens securely and rotate them according to your security policies.

For historical voice API documentation, see the [Voice AI Research Archive](/voice-archive).