Traces Web

OpenRouter

Capture OpenRouter conversations in your Traces organization.

OpenRouter Broadcast sends conversation content to your Traces organization. Imported conversations use anonymous attribution; gateway account metadata is not mapped to organization members.

Prerequisites

  1. Admin access to both your OpenRouter organization and the destination Traces organization.
  2. An agent that sends a stable session_id on every OpenRouter request, reusing it throughout a conversation. If your agent does not support this, its developer must add it before conversation capture can work.
  3. Organizational approval to capture prompts, responses, reasoning, and tool content.
  4. Privacy Mode turned off for the OpenRouter destination so conversation content is included.

See OpenRouter's Broadcast documentation for its current settings and privacy behavior.

Set up capture

In your Traces organization, open Settings → Integrations. Under Gateways, select Configure next to OpenRouter. Setup has three steps.

  1. Set up the webhook. In OpenRouter, open Settings → Observability, turn on Broadcast, and add a Webhook destination.

    • Paste the webhook URL and select POST. Every organization uses the same URL; the secret identifies yours. If the URL is unavailable, contact your Traces operator to finish enabling capture.
    • Add the header x-openrouter-secret. For its value, select Generate secret, the arrows icon in the Header value box. This connects OpenRouter and shows the secret once in a popup. Copy it and save it somewhere safe. After leaving or reloading the page, you cannot retrieve it again.
    • Select Next.
  2. Verify OpenRouter settings. On the destination page in OpenRouter, set these:

    • Additional generation metadata: check Cost, Identity and Request context.
    • Privacy: leave Privacy Mode unchecked. Privacy Mode removes the prompt and completion.
    • Sampling: set Rate to 1. A lower rate drops conversations.

    Then select Next.

  3. Test the connection. Run Test Connection in OpenRouter. The step shows Connection test received when an authenticated test arrives. It checks for the test on its own while the page is open. Then select Save in OpenRouter.

Then send a conversation through your agent. It appears in your organization's traces after processing. A connection test alone creates no conversation.

Rotate a secret

Select Manage next to OpenRouter. Then select Generate new secret, the same icon in the Header value box, and confirm. The current secret keeps working for 15 minutes. After that, Traces only accepts events sent with the new secret. Copy the new secret into OpenRouter's header before then, and run Test Connection again. The webhook URL stays the same.

If another admin rotates the secret, reload the page before trying again. If a generation request loses its response, the secret may already have changed. Reload the page and generate a new secret; plaintext secrets cannot be recovered.

Disconnect

Select Manage, then Disconnect at the end of the setup details, and confirm. Traces stops accepting new events from OpenRouter at once. Captured traces and events already received are kept. Then remove the Traces webhook from your OpenRouter Broadcast settings, since OpenRouter keeps sending until you do.

To connect again, select Configure and follow the setup steps. The webhook URL stays the same, and conversations that continue resume their existing traces.

Check capture

  1. No connection test received: Check the URL, POST method, header name, and current secret in OpenRouter. Run Test Connection again. Its error response can help your Traces operator investigate receiver availability.
  2. A test was received, but no conversation imported: Send a real conversation and check the prerequisites above. A successful test proves only that the URL and secret worked at that time.
  3. A conversation has not appeared yet: Processing may still be running. If it remains missing, contact your Traces operator with the organization and the time you sent it. Detailed processing failures are not currently available in settings. Do not send your secret or conversation payloads.
  4. Settings cannot be loaded: Select Retry. This does not mean the integration has been removed or capture has stopped.

No recent activity by itself is not an error. To stop capture, disconnect OpenRouter in Traces and remove the destination in OpenRouter. Existing conversations remain in Traces.

On this page