Authentication
Create a key on the API Keys page; keys need an active Basic or Pro plan. The secret is shown once, so store it safely: anyone with it can use your account. Send it in the Authorization header of every call.
Authorization: Bearer cl_<prefix>_<secret>Every path below starts with this base URL:
https://castlab.ai/api/public/v1When a key can't be used, the call is refused:
| Status | Code | Meaning |
|---|---|---|
| 401 | api_key_invalid | No key, a malformed, unknown or revoked key, or a web sign-in token instead of a key. |
| 403 | plan_required | Your account has no active paid plan. Your keys work again once you subscribe. |
| 403 | terms_not_accepted | Accept the Terms of Service in the app first. |
| 400 | inactive_user | The account is deactivated. |