Skip to main content
If you’re using OpenRouter, you can send traces to Fallom automatically using OpenRouter’s Broadcast feature. No SDK installation required.
Broadcast provides observability only. For Model A/B Testing and Prompt Management, use the Fallom SDK.

What You Get

Setup (5 minutes)

1. Get Your Fallom API Key

Go to app.fallom.com/settings and copy your API key.

2. Configure OpenRouter Broadcast

  1. Go to OpenRouter Broadcast Settings
  2. Click Add destination
  3. Select OTel Collector
  4. Enter:
Endpoint:
Headers:
  1. Click Save
That’s it! All your OpenRouter requests will now appear in Fallom.

Alternative: Per-Request Headers

You can also set broadcast headers on each request instead of configuring in OpenRouter’s dashboard:
This approach is useful for testing or when you want different API keys per environment.

Adding Session & User Tracking

Include session_id and user in your OpenRouter request body:

Available Fields

These fields must be in the request body, not headers. OpenRouter only broadcasts body fields to OTEL destinations.

Structured Output (JSON Mode) with Broadcast

For structured output with broadcast, use the OpenAI SDK with response_format:
For Vercel AI SDK’s generateObject/streamObject with session tracking, use the Fallom SDK wrapper instead of broadcast. The SDK wrapper provides full tracing with fallom.session().

What Gets Traced

Every OpenRouter request automatically includes:

Troubleshooting

Traces not appearing

  1. Verify Broadcast is enabled in OpenRouter settings
  2. Check the endpoint is exactly https://broadcast.fallom.com/v1/traces
  3. Confirm your API key starts with flm_
  4. Check the Authorization header format: Bearer YOUR_API_KEY (with a space)

401 Unauthorized

Your API key is invalid or the header format is wrong:

Missing session or customer data

Include session_id and user in the request body, not as headers.

Next Steps

OpenRouter SDK

Use SDK for A/B testing and prompts.

View Dashboard

See your traces.