Skip to content

SDKs

Clients are generated from the public OpenAPI contract (openapi.json) and version-locked to the API. Current version is 0.4.2. Default host is https://api.bellatorsi.com. Method names are the operationIds on the API reference, which are also the MCP tool names.

Python

pip install bellator-si==0.4.2

Package: bellator_si. Index: pypi.org/project/bellator-si.

import os

from bellator_si import ApiClient, Configuration, HealthApi

config = Configuration(api_key={"ApiKeyAuth": os.environ["BELLATOR_API_KEY"]})

with ApiClient(config) as client:
    result = HealthApi(client).health_score(
        {
            "tasks": [
                {"id": "T1", "duration_days": 5, "predecessors": []},
                {"id": "T2", "duration_days": 3, "predecessors": ["T1"]},
                {"id": "T3", "duration_days": 2, "predecessors": [{"task_id": "T2", "relationship_type": "FS"}]},
            ]
        }
    )
    print(result.score, result.grade)

TypeScript

npm install @bellatorcg/[email protected]

Package: @bellatorcg/si. Scope is the bellatorcg npm organization.

import { Configuration, HealthApi } from "@bellatorcg/si";

const health = new HealthApi(new Configuration({ apiKey: process.env.BELLATOR_API_KEY }));
const { data } = await health.healthScore({
  tasks: [
    { id: "T1", duration_days: 5, predecessors: [] },
    { id: "T2", duration_days: 3, predecessors: ["T1"] },
  ],
});
console.log(data.score, data.grade);

Predecessors

Each item in predecessors is a plain task ID ("T1"), a compact string ("T1FS+2d", "T1SS-1d"), or an object ({ "task_id": "T1", "relationship_type": "SS", "lag_days": 1 }). Both clients accept all three, mixed in one list.

Auth

The clients send the key as x-api-key from Configuration. Keep it in an environment variable (BELLATOR_API_KEY in these examples). An agent key from POST /api/v1/keys/ephemeral/generate/agent is free: health and analysis only.

Errors

A non-2xx response raises ApiException (Python) or rejects with an axios error (TypeScript). The body is an RFC 9457 problem document; branch on code. See Errors.

HTTP remains the contract. These clients are a typed wrapper, not a second API.

Was this page helpful?

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

Topic: SDKs · Page: /docs/sdks

TermsPrivacyContact

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