Documentation / Integrations / OpenRouter

OpenRouter connector

Connect OpenRouter with a provisioning key to sync credit-level spend into Meridian.

Status: Available · Claim C-21

Overview

Connect OpenRouter with a provisioning key to sync credit-level spend into Meridian.

Data pulled

  • Credits / USD spend snapshots (daily/weekly/monthly credit views as exposed by OpenRouter)
  • No per-model or per-token breakdown — granularity is credits-level only
  • Persisted as source_type=api_sync

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 exposes credit balances rather than fine-grained token ledgers. Syncs automatically every 6 hours; manual sync anytime. There is no per-connection frequency setting.

Setup steps

  1. Create a provisioning key at openrouter.ai/keys.
  2. Connect OpenRouter in Meridian Vendors with that key.
  3. Verify credit-level spend appears after sync.

Troubleshooting

  • 403: confirm you used a provisioning key, not a chat key.
  • Unexpected totals: remember Meridian cannot invent per-model splits OpenRouter does not provide.

Related