Store a project secret
Envelope-encrypted at rest (AES-256-GCM). Reference it from a tool via `secret_ref` + `auth_header`; the value is injected server-side — the model never sees it. Returns 503 when the server has no `LIBRA_SECRET_KEY`.
Envelope-encrypted at rest (AES-256-GCM). Reference it from a tool via
secret_ref + auth_header; the value is injected server-side — the model
never sees it. Returns 503 when the server has no LIBRA_SECRET_KEY.
Authorization
TokenAuth Project API key as Token lb-sk_...
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/secrets" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "value": "string" }'{ "name": "string"}OpenAI-compatible chat completions POST POST
Point any OpenAI client at Libra: `model` is the **agent name** (a `libra:` prefix is tolerated), auth accepts `Bearer`. The full server-side pipeline (rules, guardrails, tools/flow, risk-hold) runs on every request; client `system` messages are ignored (the agent owns its instructions). With `stream: true` the response is `text/event-stream` of `chat.completion.chunk` events terminated by `data: [DONE]`. Default mode is **buffer-then-stream** (pipeline completes, approved answer replays as chunks); agents with `stream_mode: "live"` stream tokens as generated when the guard gate allows (output guard off, no tools/flow). Typed extras (`ui_actions`, `citations`, `escalated`) ride in a non-standard `x_libra` field on the final chunk / completion object.
Add a document POST POST
Add a document by inline `text`, a `url` to fetch, or a multipart file upload (PDF, DOCX, TXT, Markdown, HTML). Ingestion runs asynchronously; poll the document `status` until `ready`.