Status: Private preview Spec version: 2025-08-18 Breaking changes possible
Table of Contents
- Quick Start (under 5 minutes)
- Concepts
- API Reference
- Resources
- Operational Notes & Best Practices
- Changelog
- Reference Status Codes
1) Quick Start (under 5 minutes)
🔮 Note that all API usage examples are provided using cUrl and bash commands. Adapt these API calls to whatever language / environment your LLM-powered application is running in.
Authentication
To get started you’ll need a Brixo API key provided to you by your account team. Pass the API key as aBearer in the Authorization HTTP request header like so:
1. Proxy your inference through the Brixo Proxy
- Brixo Proxy (to ANY LLM provider):
https://proxy.brixo.com/<llm_provider_url> - LLM Provider credentials: Either pass the same authentication headers you’d send directly to the LLM provider (e.g.,
Authorization: Bearer <key>,x-api-key: <key>), or let Brixo store/manage the LLM provider keys for you so you don’t have to pass them in your API calls every time.
2. Send traces to us offline
- Tracing ingest (sidecar/offline):
https://api.brixo.com/instrumentation/tracing/v1/
Copy, Paste, and Run Examples
Replace $BRIXO_KEY with your Brixo API Key and, if using the Brixo Proxy, any LLM provider keys.
1.1 Set up env
1.2 Hello World via Brixo Proxy (OpenAI example)
🛠️ Managed API keys: If Brixo stores your LLM Provider API keys, omit the
LLM_PROVIDER_KEY env var (above) and the Authorization header (below).1.3 Sidecar trace (send Brixo a completed inference)
1.4 Attach observations to a trace
2) Concepts
- Trace: Logical unit of work for an inference (request/response, timings, costs, metadata).
- Observation: Child event attached to a trace (retrievals, tool calls, feedback/scores, spans).
3) API Reference
JSON:API • Conventions
- Media type
- Requests:
Content-Type: application/vnd.api+json - Responses:
Content-Type: application/vnd.api+json - Clients SHOULD send
Accept: application/vnd.api+json
- Requests:
- Top-level members:
data | errors | meta | links | jsonapi (optional) - Auth:
Authorization: Bearer <Brixo_API_key> - Timestamps: RFC3339 (e.g.,
2025-09-17T12:34:56Z)
Create Trace
- Route:
POST /instrumentation/tracing/v1/ - Purpose: Create an empty
trace, with the intention of subsequently adding one or moreobservationsusing the Create Observations endpoint.
Create Observations (scoped by Trace)
- Route:
POST /tracing/v1/observations - Purpose: Create an
observationwithin atrace.
Create Trace with Observations
- Route:
POST /instrumentation/tracing/v1/traces - Purpose: Create a
traceand itsobservationsin one request. - Note: The request is a pragmatic extension (JSON:API normally expects identifiers in
relationships). Responses are canonical JSON:API.
Request (schema)
Semantics & Rules
data(trace)typemust be"trace
relationships.observations.data- Array of
full observation resource objects. - Each item must have
type: "observation"and valid attributes per the Observation resource spec.
- Array of
Response Objects
201 Created — success
422 Unprocessable Entity
4) Resources
1) Trace
Type:trace
Route (plural): /traces
A trace is a container for a run/session
Attributes
| Attribute | Details | Type / Format | Notes & Validation |
|---|---|---|---|
name | optional | string (1–128) | Human-readable label. |
project | optional | string (1–128) | Logical grouping. |
environment | required | string | e.g., prod, staging, dev, or custom. |
client | optional | object | { sdk?: string, version?: string, user_agent?: string }. |
metadata | optional | object | Freeform JSON; ≤ 16 KB serialized, depth ≤ 3. |
started_at | optional | RFC3339 timestamp | Trace start. |
ended_at | optional | RFC3339 timestamp | Must be ≥ started_at. |
status | optional | enum | One of: success, error, timeout, cancelled. |
error | optional | object | { code: string, type?: string, message: string, retryable?: boolean }. |
metrics | optional | array<object> | { name: string (1–64, [A-Za-z0-9_.-]), value: number, scale?: string, source?: "human" | "auto", at?: RFC3339 }. |
2) Observation
Type:observation
All routes are nested: /traces/{trace_id}/observations[...]
An observation is an atomic step inside a trace (e.g., LLM call, tool call, retrieval, eval).
Attributes
| Attribute | Details | Type / Format | Notes & Validation |
|---|---|---|---|
name | optional | string (1–128) | Step label. |
kind | required | enum | One of: llm, tool, retrieval, rerank, eval, system. |
started_at | required | RFC3339 timestamp | Step start time. |
ended_at | required | RFC3339 timestamp | Must be ≥ started_at. |
status | optional | enum | One of: success, error, timeout, cancelled. |
error | optional | object | { code, type?, message, retryable?, provider_code? }. |
provider | required | string | e.g., openai, anthropic, vertex. |
model | required | string | e.g., gpt-4o-mini. |
model_version | optional | string | Provider/model release string. |
parameters | required | object | E.g., temperature, top_p, max_output_tokens, stop, seed, tool_choice. |
endpoint | required | string | e.g., chat.completions. |
region | optional | string | Cloud/region id. |
provider_request_id | optional | string | Upstream correlation. |
provider_response_id | optional | string | Upstream correlation. |
input | required | object | Freeform JSON (any valid object). |
output | required | object | Freeform JSON (any valid object). |
usage | optional | object | { input_tokens?, output_tokens?, total_tokens?, compute_time_ms?, input_time_ms?, output_time_ms?, total_time_ms? } (non-negative). |
cost | optional | object | { total: number, currency?: string = "USD", estimated?: boolean } (non-negative). |
metrics | optional | array<object> | Same shape as trace metrics. |
metadata | optional | object | Freeform JSON; ≤ 16 KB serialized, depth ≤ 3. |
ingested_at | server defined | RFC3339 timestamp | Server receive/commit time. |
Relationships (JSON:API form in responses)
5) Operational Notes & Best Practices
- Retries: Exponential backoff for 429/5xx. Respect Retry-After if present.
- PII: If you require automatic redaction, contact us for a tenant‑level policy.
6) Changelog
- 2025‑09‑15: Provider‑neutral examples and wording; removed vendor names in examples; retained legacy /api/providers/open_ai/v1 endpoints (historical naming) but clarified they work with any origin via bxo_origin.
- 2025‑09‑10: Switched to provider‑agnostic proxy via bxo_origin; introduced Authorization header; updated examples.
- 2025‑09‑07: Major reorg by use case; added Quick Start; added tracing ingest namespace and observation association; standardized cURL blocks; added guidance on idempotency, correlation headers, and size limits.
- 2025‑08‑18: Initial consolidated draft (proxy, files, batches).
7) Appendix – Reference Status Codes
- 200 OK: Successful GET/DELETE
- 201 Created: Successful creation
- 400 Bad Request: Malformed ID, invalid parameters
- 401 Unauthorized: Missing/invalid token
- 403 Forbidden: Valid token but lacks access
- 404 Not Found: Unknown file_id/batch_id
- 409 Conflict: Resource not ready (e.g., file not processed)
- 422 Validation Failed: Field/type/enum violations
- 429 Too Many Requests: Rate limited
- 5xx: Server‑side errors
