API ReferenceGetting started
Authentication
Every request is authenticated with your secret API key in the x-api-key header.
Send your secret key in the x-api-key header on every request. Keys always begin with jsf_. You can find and manage keys in your JSF Labs dashboard.
Header
x-api-key: jsf_your_api_keyYour key is a secret
Never expose it in client-side code, mobile apps or public repositories — call the API from your server. A leaked key can spend your character balance.
When a request is rejected
Requests with a missing, malformed or unknown key, an inactive subscription or an expired key are rejected before any work is done, so they never cost characters.
| Situation | HTTP | Code |
|---|---|---|
| No header sent | 401 | MISSING_API_KEY |
Doesn't start with jsf_ | 401 | INVALID_KEY_FORMAT |
| Key not found | 401 | INVALID_API_KEY |
| Subscription turned off | 403 | SUBSCRIPTION_INACTIVE |
| Key expired | 403 | KEY_EXPIRED |
See Error codes for the complete list.
