Authentication
Every request to the Jantaris API, except the public model catalog (GET /v1/models), needs an API key. One key works for every model and every endpoint, and it draws from your account balance.
Creating a key
- Sign in and open the dashboard.
- In API keys, click to create a new key and give it a name (for example
prod-backendorn8n). - Optionally set a monthly spend limit for the key.
- Copy the key. It is shown once and cannot be displayed again.
Keys have the format sk-jt- plus 32 characters:
sk-jt-4f9c2a7e1b8d3f6a0c5e9b2d7a1f4c8eIf you lose a key, create a new one and delete the old one in the dashboard.
Sending the key
Two headers are accepted. Use whichever your client sends by default.
| Header | Format | Typical client |
|---|---|---|
Authorization | Bearer sk-jt-... | curl, OpenAI SDK, most HTTP tools |
x-api-key | sk-jt-... | Anthropic SDK, Claude Code |
# Bearer
curl https://jantaris.com/v1/balance -H "Authorization: Bearer $JANTARIS_API_KEY"
# x-api-key
curl https://jantaris.com/v1/balance -H "x-api-key: $JANTARIS_API_KEY"import os, requests
headers = {"Authorization": f"Bearer {os.environ['JANTARIS_API_KEY']}"}
print(requests.get("https://jantaris.com/v1/balance", headers=headers).json())const res = await fetch("https://jantaris.com/v1/balance", {
headers: { "x-api-key": process.env.JANTARIS_API_KEY },
});
console.log(await res.json());With the official SDKs you only pass the key and the base URL:
from openai import OpenAI
from anthropic import Anthropic
openai_client = OpenAI(base_url="https://jantaris.com/v1", api_key="sk-jt-...")
anthropic_client = Anthropic(base_url="https://jantaris.com", api_key="sk-jt-...")The same key works on https://jantaris.com/v1 and https://jantaris.com/v1. It is the same API.
Spend limits
Each key can have its own monthly spend limit, set in the dashboard when you create the key. Use it to cap a staging environment, a customer integration or an automation that might loop.
When a request would push the key past its limit, the API returns 403:
{ "error": { "type": "permission_error", "message": "This key reached its monthly spend limit. Create a new key with a higher limit in the dashboard or use another key." } }The account balance is untouched. Create a new key with a higher limit in the dashboard or use another key. A limit applies only to the key it is set on. The account-wide ceiling is your balance, see Billing.
Authentication errors
| Status | error.type | Cause |
|---|---|---|
| 401 | authentication_error | Missing, malformed or deleted key |
| 403 | permission_error | Key spend limit reached |
| 402 | insufficient_balance | Key is valid but the balance is too low |
Full list: Errors.
Keeping keys safe
- Keep keys on the server. Never ship them in browser code, mobile apps or public repositories.
- Use one key per app or environment, so you can delete a single key without breaking the rest.
- Read the key from an environment variable or a secrets manager, not from source files.
- If a key leaks, delete it in the dashboard immediately. Requests with a deleted key fail with
401.









