Guides

API Authentication

Generate and manage API keys for programmatic access

API Authentication

The Cassette API lets you manage instances programmatically. Authentication uses API keys tied to your organization.

Creating an API Key

Admin access required.

  1. Click the gear icon and select API Keys
  2. Enter a name
  3. Click Create Key
  4. Copy the token - you won't see it again

Using Your API Key

Two methods - use either:

Bearer Token (recommended)

BASH
curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://cassette.dev/api/v1/cassettes

X-Api-Key Header

BASH
curl -H "X-Api-Key: YOUR_TOKEN" \
  https://cassette.dev/api/v1/cassettes

Key Endpoints

List instances: GET /api/v1/cassettes

Get instance: GET /api/v1/cassettes/:id

Create instance: POST /api/v1/cassettes with plan_id, region_id, image_id

Resize instance: POST /api/v1/cassettes/:id/resize with plan_id

Delete instance: DELETE /api/v1/cassettes/:id

Full docs: API Reference

Revoking Keys

Click Revoke next to any key in the API Keys page. Takes effect immediately.

Troubleshooting

unauthorized - Check your token is correct and hasn't been revoked

no_active_subscription - Requires active subscription

forbidden on API Keys page - Only admins can manage API keys