Skip to content

Authentication

You'll need to authenticate your requests to access protected endpoints in the Schedule Intelligence APIs. In this guide, we'll look at how authentication works using API keys.

API key authentication

To authenticate with the Schedule Intelligence APIs, pass your API key via the x-api-key header. All requests require authentication for rate limiting and usage tracking.

curl -X POST "https://api.bellatorsi.com/api/v1/health/score" \
  -H "x-api-key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{"tasks": [{"id": "1", "duration_days": 5, "predecessors": []}]}'

Don't have an API key yet? Use the Playground to get a free ephemeral key that's valid for 24 hours or 100 requests.

Tier-based access

API keys are associated with access tiers that control limits:

  • Playground/Ephemeral Tier:

    • Task limit: 100 tasks per request
    • Rate limit: 100 requests per ephemeral key
    • Async processing: ❌ Synchronous only
    • Payload size: 5MB max
    • API key: Get an ephemeral key from Playground (auto-expires after 24h or 100 uses)
    • Best for: Instant testing, no signup required
  • Free Tier:

    • Task limit: 1,000 tasks per request
    • Rate limit: 100 requests per month
    • Async processing: ❌ Synchronous only (1,000 tasks = sync limit)
    • Payload size: 5MB max
    • Best for: Development and small projects
  • Starter Tier:

    • Task limit: 2,000 tasks per request
    • Rate limit: 500 requests per month
    • Async processing: ✅ Required for tasks 1,001-2,000
    • Payload size: 5MB max
    • Best for: Small teams and early-stage products
  • Professional Tier:

    • Task limit: 5,000 tasks per request
    • Rate limit: 2,000 requests per month
    • Async processing: ✅ Async + Sync
    • Payload size: 25MB max
    • Best for: Production applications
  • Enterprise Tier:

    • Task limit: 50,000 tasks per request
    • Rate limit: Unlimited
    • Async processing: ✅ Priority async queue
    • Payload size: 100MB max
    • Best for: Large organizations
  • Government Tier:

    • Task limit: 100,000+ tasks per request
    • Rate limit: Unlimited
    • Async processing: ✅ Priority async queue
    • Payload size: 500MB max
    • Best for: Government contracts (DCMA compliance)

Querying your tier at runtime

Use GET /api/v1/account/tier to get the exact limits and capability flags for the authenticated key. This endpoint is quota-neutral — it does not count against your monthly call limit and is safe to call at startup or cache for 30–120 seconds.

curl "https://api.bellatorsi.com/api/v1/account/tier" \
  -H "x-api-key: YOUR_API_KEY"
import httpx

r = httpx.get(
    "https://api.bellatorsi.com/api/v1/account/tier",
    headers={"x-api-key": "YOUR_API_KEY"},
)
data = r.json()

print(data["tier"])                             # "starter"
print(data["limits"]["max_task_limit"])         # 2000
print(data["capabilities"]["forensics"])        # True
print(data["limits"]["monthly_calls_remaining"]) # 347
const res = await fetch("https://api.bellatorsi.com/api/v1/account/tier", {
  headers: { "x-api-key": "YOUR_API_KEY" },
});
const { tier, limits, capabilities } = await res.json();

console.log(tier);                            // "starter"
console.log(limits.max_task_limit);           // 2000
console.log(capabilities.forensics);          // true
console.log(limits.monthly_calls_remaining);  // 347

The response includes a capabilities object with boolean flags for each feature group, and a limits object with numeric task and quota limits. Use these to gate features or decide whether to route large payloads to async endpoints.

{
  "tier": "starter",
  "display_name": "API Starter",
  "limits": {
    "sync_task_limit": 1000,
    "max_task_limit": 2000,
    "payload_limit_mb": 5,
    "api_calls_per_month": 500,
    "monthly_calls_remaining": 347
  },
  "capabilities": {
    "tier1": true,
    "forensics": true,
    "import": true,
    "risk": false,
    "async": true,
    "webhooks": true,
    "sandbox_fixture_requests": true
  },
  "recommended_routes": {
    "health_score": "/api/v1/health/score",
    "dcma_14_point": "/api/v1/health/dcma-14-point",
    "async_jobs": "/api/v1/jobs/{job_id}"
  },
  "metadata": {
    "resolved_at": "2026-04-07T14:22:31Z",
    "api_version": "0.4.2"
  }
}

Rate limiting

A request over your tier's burst limit (requests per minute) returns 429 Too Many Requests. Like every error, the body is an RFC 9457 problem document (see Errors):

{
  "type": "https://bellatorsi.com/problems/rate-limit-exceeded",
  "title": "Rate limit exceeded",
  "status": 429,
  "detail": "Burst limit exceeded (50 requests per minute). Retry after 42 seconds.",
  "code": "RATE_LIMIT_EXCEEDED",
  "instance": "/api/v1/health/score",
  "request_id": "5f0c2a7e-0d2b-4b1e-9a51-3f7c2e8d1b44",
  "limit": "burst",
  "burst_limit": 50,
  "retry_after": 42,
  "monthly_remaining": 1874
}
Field Meaning
limit "burst", or "monthly" for a playground or agent key's monthly cap
burst_limit Requests per minute for your tier and this endpoint
retry_after Seconds until the limit resets; also the Retry-After header
monthly_remaining Calls left this month, the same number GET /api/v1/usage/me reports. null when unknown
upgrade_url Free keys and playground keys only, with a pricing link in detail

A refused request does not count toward your monthly calls. A playground or agent key gets back the use it spent on a refused request.

A used-up monthly call quota on an account key returns 429 with code QUOTA_EXCEEDED.

Rate limit headers

A 429 carries headers for the limit that refused the request:

Retry-After: 42
X-RateLimit-Limit: 50
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1738195200

X-RateLimit-Reset is epoch seconds. For a burst refusal, the headers describe the one-minute window; for a monthly refusal, the month. Successful responses do not carry these headers; read GET /api/v1/usage/me or GET /api/v1/account/tier for remaining calls.


Task limits

Requests exceeding your tier's per-request task limit are rejected with 402:

{
  "type": "https://bellatorsi.com/problems/tier-limit-exceeded",
  "title": "Tier limit exceeded",
  "status": 402,
  "detail": "Task limit exceeded. Your free tier supports up to 1000 tasks per request. You submitted 3000 tasks.",
  "code": "TIER_LIMIT_EXCEEDED",
  "instance": "/api/v1/health/score",
  "request_id": "5f0c2a7e-0d2b-4b1e-9a51-3f7c2e8d1b44",
  "upgrade_url": "https://bellatorsi.com/pricing"
}

A schedule over the synchronous limit (1,000 tasks) but within your tier returns 413 SCHEDULE_TOO_LARGE_FOR_SYNC with async_endpoint; submit there on Starter and above.

For schedules exceeding your sync processing limit, use the async endpoints with webhooks.


Security best practices

  1. Never commit API keys: Use environment variables or secret managers
  2. Rotate keys regularly: Especially if compromised
  3. Use HTTPS: Always use encrypted connections in production
  4. Tier appropriately: Choose the right tier for your workload
  5. Monitor usage: Track API usage to prevent unexpected rate limits

Getting an API key

API keys are provisioned through self-service signup:

Once you have a key, store it securely:

# Set as environment variable — never hardcode in source
export BELLATOR_API_KEY="bsi_live_..."
import os
api_key = os.environ["BELLATOR_API_KEY"]

Next steps

Was this page helpful?

Your feedback helps us improve docs, reference pages, and Playground flows.

Topic: Authentication · Page: /docs/authentication

TermsPrivacyContact

Schedule analysis guidance. Not legal advice. You remain responsible for contract and agency compliance.