Documentation / Integrations / OpenRouter

OpenRouter connector

Connect OpenRouter with a provisioning key to sync daily spend by model into Meridian.

AvailableMethod: API

Overview

Connect OpenRouter with a provisioning key to sync daily spend by model into Meridian.

Data pulled

  • Daily spend by model from the OpenRouter Activity API, with token and request counts
  • Covers the last 30 completed days; OpenRouter combines the data across every API key on the account
  • Persisted as source_type=api_sync

What gets attributed

Meridian reads OpenRouter's Activity API and stores one row per day per model, with token and request counts. OpenRouter combines this data across every API key on the account, so Meridian cannot tell which key or application produced the spend.

Every OpenRouter row arrives unattributed in the attribution inbox (Agents & allocation → Unattributed), where you can assign it or create a rule that matches on vendor or model.

Authentication & credential storage

Meridian stores the following fields for this connector (values encrypted at rest):

  • api_key
  • Credentials are encrypted with AES-256-GCM using a KMS-wrapped data encryption key (DEK) and stored in vendor_connections.credentials_encrypted.
  • Meridian never returns the plaintext key after save. Revocation is disconnect: deactivate or delete the vendor connection — sync stops and the encrypted blob is no longer used.
  • Requires a Provisioning (admin) key. A regular user key may validate but sync fails with 403.

Sync schedule & behavior

OpenRouter reports completed days only, for the last 30 days. Manual Sync now works anytime. Scheduled sync is off by default; Onaro enables it per customer when day-bucketing is acceptable.

Setup steps

  1. Create a provisioning key at openrouter.ai/keys.
  2. Connect OpenRouter in Meridian Vendors with that key.
  3. Use Sync now to pull; confirm day-and-model spend appears.

Troubleshooting

  • 403: confirm you used a provisioning key, not a chat key.
  • Missing older days: the Activity API only returns the last 30 completed days, so earlier spend needs a bill import.
  • Per-key splits: OpenRouter does not report spend by API key, so Meridian cannot split it that way.
  • No automatic refresh: scheduled sync is off unless Onaro turned it on for your org — use Sync now.

Related

Onaro Meridian is FinOps for agentic AI: the system of record that attributes, controls and books what AI agents spend.