S3 / S3-Compatible
S3 / S3-Compatible
Send traces to Amazon S3 or S3-compatible storage
S3 / S3-Compatible
Send traces to Amazon S3 or S3-compatible storage
Amazon S3 is a scalable object storage service. OpenRouter can send traces to any S3-compatible storage, including AWS S3, Cloudflare R2, MinIO, and other compatible services.
In your cloud provider’s console, create a bucket for storing traces and generate access credentials with write permissions to the bucket.
For AWS S3:
s3:PutObject on your bucketFor Cloudflare R2:
Go to Settings > Observability and toggle Enable Broadcast.

Click the edit icon next to S3 / S3-Compatible and enter:
my-traces-bucket)https://your-account-id.r2.cloudflarestorage.com)openrouter-traces/{date}. Available variables: {prefix}, {date}, {year}, {month}, {day}, {apiKeyName}Click Test Connection to verify the setup. The configuration only saves if the test passes.
Make an API request through OpenRouter and check your S3 bucket for the trace file. Each trace is saved as a separate JSON file with the format {traceId}-{timestamp}.json.
Customize how traces are organized in your bucket:
openrouter-traces/{date} - Default, organizes by date (e.g., openrouter-traces/2024-01-15/abc123-1705312800.json)traces/{year}/{month}/{day} - Hierarchical date structure{apiKeyName}/{date} - Organize by API key name, then dateproduction/llm-traces/{date} - Custom prefix for environment separationFor time-based batching (e.g., hourly or daily aggregated files), consider using AWS Kinesis Firehose instead, which buffers records and writes batched files to S3.
Custom metadata from the trace field is included in the JSON trace file stored in your S3 bucket. The metadata is available in the metadata field of each observation within the trace.
Each trace file is a JSON object. Custom metadata keys from trace are stored in the metadata field and can be queried using tools like Amazon Athena, Presto, or any JSON-aware query engine:
user field maps to userId in the trace JSONsession_id field maps to sessionId in the trace JSONWhen 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.