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.
- Click the gear icon and select
API Keys
- Enter a name
- Click
Create Key
- Copy the token - you won't see it again
Using Your API Key
Two methods - use either:
Bearer Token (recommended)
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://cassette.dev/api/v1/cassettes
X-Api-Key Header
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
Related Guides
- API Reference - Complete endpoint documentation