Braintrust

Forward TheRouter.ai traces to Braintrust for evaluation workflows

Braintrust provides trace analytics, evaluations, and experiment tracking for production AI apps. TheRouter.ai emits request spans and usage metrics directly into your project.

broadcast-braintrust-config.json
{
  "destination": "braintrust",
  "enabled": true,
  "api_key": "bt_...",
  "project_id": "proj_...",
  "base_url": "https://api.braintrust.dev",
  "sampling_rate": 1
}
cURL
curl https://api.therouter.ai/v1/chat/completions   -H "Authorization: Bearer $THEROUTER_API_KEY"   -H "Content-Type: application/json"   -H "X-TheRouter.ai-Broadcast: true"   -d '{
    "model":"openai/gpt-4.1-mini",
    "messages":[{"role":"user","content":"Score this response quality"}],
    "trace":{"trace_name":"Braintrust Eval Run","experiment_id":"exp_7"}
  }'
Verification
In Braintrust, filter logs by your `trace_name` to confirm the request, model, duration, and cost metadata were ingested.