Skip to content
FoundationMachines
API reference

API reference

Every Foundation Machines API endpoint and error type.

Endpoints

GET /health

Public. Returns {"ok":true,"service":"foundation-gateway"}.

GET /v1/models

Returns OpenAI-format { object: "list", data: [...] } of all available models.

POST /v1/chat/completions

OpenAI-compatible chat. Streaming supported via stream: true.

POST /v1/completions

OpenAI-compatible legacy completions.

POST /v1/responses

OpenAI Responses API. Forthcoming: returns 501 not_implemented today; use /v1/chat/completions with the same model ids in the meantime.

POST /v1/audit

Sebastion AI security audit. Live. Synchronous snippet audits, see the audit reference for the full request and response schema. The same engine powers the Sebastion AI GitHub App.

GET /v1/usage/me

Self-service usage. Returns your tenant, plan, daily token total, limits.

Errors

{ "error": { "type": "rate_limit", "message": "20 rpm exceeded for plan pro" } }
HTTPtypemeaning
401unauthorizedbad or missing bearer
403model_forbiddenmodel not allowed on your plan
429rate_limitper-minute cap hit; back off
429quota_exceededdaily token cap hit; resets at UTC midnight
501not_implementedendpoint exists but not yet generally available