Opik
Integrate Comet Opik for trace-level LLM evaluation workflows
Comet Opik captures traces and eval signals for prompt and model iteration. TheRouter.ai includes user/session context and custom metadata in each exported trace.
broadcast-opik-config.json
{
"destination": "opik",
"enabled": true,
"api_key": "opik_...",
"workspace": "ml-platform",
"project_name": "support-assistant",
"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",
"messages":[{"role":"user","content":"Evaluate this answer"}],
"trace":{"trace_name":"Opik Eval Smoke","eval_suite":"quality_v2"}
}'Verification
Confirm the trace appears in the selected workspace/project and includes custom metadata fields such as `eval_suite`.