Snowflake is a cloud data warehouse platform. OpenRouter can stream traces directly to your Snowflake database for custom analytics, long-term storage, and business intelligence.
Before connecting OpenRouter, create the OPENROUTER_TRACES table in your Snowflake database. You can find the exact SQL in the OpenRouter dashboard when configuring the destination:

Generate a Programmatic Access Token with ACCOUNTADMIN permissions in the Snowflake UI under Settings > Authentication.

Go to Settings > Observability and toggle Enable Broadcast.

Click the edit icon next to Snowflake and enter:
eac52885.us-east-1). You can find your account region and your account number at the end of your Snowflake instance’s URL: https://app.snowflake.com/us-east-1/eac52885; together these make your account identifier.SNOWFLAKE_LEARNING_DB).PUBLIC).OPENROUTER_TRACES).COMPUTE_WH).Click Test Connection to verify the setup. The configuration only saves if the test passes.
Make an API request through OpenRouter and query your Snowflake table to verify the trace was received.

The schema extracts commonly-queried fields as typed columns for efficient filtering and aggregation:
Less commonly-accessed and variable-structure data is stored in VARIANT columns:
This design balances query performance with schema flexibility and storage efficiency.
Custom metadata from the trace field is stored in the METADATA VARIANT column. You can query it using Snowflake’s semi-structured data functions.
Use Snowflake’s VARIANT column syntax to query your custom metadata:
user field maps to the USER_ID typed columnsession_id field maps to the SESSION_ID typed columntrace are stored in the METADATA VARIANT column for flexible queryingWhen Privacy Mode is enabled for this destination, prompt and completion content is excluded from traces. All other trace data — token usage, costs, timing, model information, and custom metadata — is still sent normally. See Privacy Mode for details.