Public Docs
OpenAPI Source of Truth
MCP Streamable HTTP
CLI for Consumers

TSFM.ai developer documentation.

Multiple pages, one contract. API, MCP, and CLI are aligned on the same schema so teams can move from manual calls to production automation with zero drift.

API Reference

HTTP endpoints

Source of truth is OpenAPI: /openapi.json and /api/schema. MCP tools and CLI commands are generated from the same operation ids listed below.

View live OpenAPI schema →

Request and response conventions

  • All request and response bodies are JSON unless an endpoint explicitly returns SSE (text/event-stream).
  • Auth is Bearer token in Authorization header. Session tokens and API keys both use Bearer format.
  • Unknown routes return { error, code } with 404.
  • Validation and payload shape errors return 400 with a stable code field.
  • Endpoint compatibility aliases are accepted for forecast payloads to reduce migration pain.

Auth reference

Session and API key credentials both use Bearer format.

FieldTypeRequiredDescription
Session tokenBearer tokenConditionalIssued by /api/auth/register or /api/auth/login; accepted across account and inference endpoints.
API keyBearer tokenConditionalCreated on /api/account/keys; intended for server-to-server inference and automation.
Credential validationPOST /v1/validateNoAccepts api_key or bearer header and returns { valid, auth_type, user }.

System + Schema

Health, status, and source-of-truth contract discovery.

MethodPathOperation IdSummaryAuth
GET/healthzgetHealthService healthNone
GET/api/system/statusgetSystemStatusRuntime status + regionsNone
GET/openapi.jsongetOpenApiSchemaOpenAPI schemaNone
GET/api/schemagetApiSchemaOpenAPI schema aliasNone

Model Catalog

Discover TSFMs and route by capabilities, cost, and latency.

MethodPathOperation IdSummaryAuth
GET/api/modelslistModelsCatalog list with filtersNone
GET/api/models/{modelId}getModelByIdCatalog detailNone
GET/v1/modelslistOpenAiModelsOpenAI-compatible model listNone
GET/v1/models/{modelId}getOpenAiModelByIdOpenAI-compatible model detailNone

Auth + Account

User auth, API keys, usage, and billing state.

MethodPathOperation IdSummaryAuth
POST/api/auth/registerregisterUserCreate account + session tokenNone
POST/api/auth/loginloginUserLogin + session tokenNone
GET/api/auth/oauth/startstartOAuthBegin Google/GitHub OAuthNone
GET/api/auth/oauth/callback/{provider}completeOAuthCallbackOAuth callback completion redirectNone
POST/v1/validatevalidateCredentialValidate token/API keyNone
GET/api/account/megetAccountMeCurrent userBearer token/API key
GET/api/account/keyslistAccountKeysList API keysBearer token/API key
POST/api/account/keyscreateAccountKeyCreate API keyBearer token/API key
DELETE/api/account/keys/{keyId}revokeAccountKeyRevoke keyBearer token/API key
GET/api/account/usagelistUsageEventsUsage eventsBearer token/API key
GET/api/account/billinggetBillingSummaryBilling summaryBearer token/API key
GET/api/account/billing/stripegetStripeBillingProfileStripe profileBearer token/API key
POST/api/account/billing/stripecreateStripeBillingSessionCreate Stripe checkout/portal sessionBearer token/API key

Forecasting + Inference

Forecast-native TSFM interfaces for time-series inference.

MethodPathOperation IdSummaryAuth
POST/v1/series/ingestingestSeriesSourceNormalize series from URL or inline payloadBearer token/API key
POST/v1/forecastforecastCanonical TSFM forecastBearer token/API key
POST/v1/detect-anomaliesdetectAnomaliesAnomaly detectionBearer token/API key
POST/v1/forecast/batchforecastBatchBatch forecast jobsBearer token/API key
POST/v1/classifyclassifySeriesRoadmap placeholder (501)Bearer token/API key
POST/v1/imputeimputeSeriesRoadmap placeholder (501)Bearer token/API key
POST/v1/finetunefinetuneModelRoadmap placeholder (501)Bearer token/API key
POST/v1/cross-validatecrossValidateRoadmap placeholder (501)Bearer token/API key

Rate limit headers

Present on inference responses and forwarded when available from upstreams.

FieldTypeRequiredDescription
x-ratelimit-limitstringNoConfigured request limit for the current window.
x-ratelimit-remainingstringNoRemaining requests in the current rate-limit window.
x-ratelimit-resetstring (unix seconds)NoTimestamp when the current window resets.
retry-afterstring (seconds)NoReturned when the upstream or gateway asks clients to slow down.

Common error codes

Errors return consistent shape: { error, code }.

FieldTypeRequiredDescription
missing_credential400NoNo bearer token or api_key provided for /v1/validate.
invalid_credential401NoToken/API key not found, expired, or revoked.
invalid_credentials401NoIncorrect email/password pair on login.
model_not_found404NoThe requested model id does not exist in catalog.
not_implemented501NoRoadmap endpoint called before GA support.
upstream_timeout504NoInference gateway timeout waiting for upstream model response.