Authentication
JARVIS API endpoints accept two kinds of credential.
Personal API keys
Create a key on the Developer page. The full key is displayed once; only a hash is stored, so it cannot be retrieved again.
export JARVIS_KEY="jrv_…"
curl -s https://jarvis.spacekeep.dev/api/jarvis/chat \
-H "Authorization: Bearer $JARVIS_KEY" \
-H "Content-Type: application/json" \
-d '{"message":"Hello"}'
Key properties:
-
Prefix is
jrv_. -
Revocation takes effect on the key's next request.
-
Unknown, revoked, and malformed keys all return the same
401 Invalid API key.— they cannot be distinguished by probing. -
A key grants only what its owner can do. It is not scoped more narrowly than the account is.
Sessions
A signed-in browser carries a session cookie. Requests made from the JARVIS app itself are authenticated that way, and no header is needed.
For scripted use, a key is simpler and safer than replaying a cookie.
Which endpoints accept what
Key management and memory are session-only on purpose: they are account administration, and administering an account from a token stored in a script is not a good default.
Failure behaviour
Tip
An invalid key is always a hard 401. It is never treated as an anonymous request, so a broken
key fails loudly instead of silently degrading to unauthenticated behaviour.
Signing in programmatically
Two endpoints issue a session from credentials. Both are rate limited per client address.
Passwords must be 8–128 characters. Registration returns 409 if the address already has an
account.
Successful login sets a session cookie. Send it on subsequent requests, exactly as a browser would.
Note
Prefer a personal API key over scripting password logins. It avoids handling credentials in your integration and survives a password change.
Password recovery
/api/auth/forgot returns the same response whether or not the address is registered. A reset
token is valid for 30 minutes and can be redeemed once; redeeming it ends every session on the
account.
Rate limits
Exceeding a limit returns 429. Back off and retry rather than retrying immediately.
Keeping credentials safe
- Read keys from environment variables or a secret manager, never from source.
- Use one key per integration so revocation is surgical.
- Never send a key in a query string.
- JARVIS never returns a key after creation, and never includes keys in a reply.
Related
- API Reference — full endpoint documentation
- Sessions & API Keys — key lifecycle
- Health — the one endpoint that needs no credential