Example Usage
import { CreateObservabilityDestinationRequest } from "@openrouter/sdk/models";
let value: CreateObservabilityDestinationRequest = {
config: {
"baseUrl": "https://us.cloud.langfuse.com",
"publicKey": "pk-l...EfGh",
"secretKey": "sk-l...AbCd",
},
name: "Production Langfuse",
type: "langfuse",
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
apiKeyHashes | string[] | ➖ | Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. null or omitted means all keys. Must contain at least one hash if provided. Every hash must belong to an API key in the destination’s workspace; any other hash returns 400. | null |
broadcastGenerationCost | boolean | ➖ | When true, include cost and billing generation metadata. | false |
broadcastGenerationCostAllocation | boolean | ➖ | Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost. | false |
broadcastGenerationIdentity | boolean | ➖ | When true, include identity generation metadata. | false |
broadcastGenerationRequestContext | boolean | ➖ | When true, include request-context generation metadata. | false |
config | Record<string, any> | ✔️ | Provider-specific configuration. The shape depends on type and is validated server-side. | { “baseUrl”: “https://us.cloud.langfuse.com”, “publicKey”: “pk-l…EfGh”, “secretKey”: “sk-l…AbCd” } |
enabled | boolean | ➖ | Whether this destination should be enabled immediately. | true |
filterRules | models.ObservabilityFilterRulesConfigNullable | ➖ | Optional structured filter rules controlling which events are forwarded. | null |
name | string | ✔️ | Human-readable name for the destination. | Production Langfuse |
privacyMode | boolean | ➖ | When true, request/response bodies are not forwarded — only metadata. | false |
regions | models.ObservabilityDataRegionInput[] | ➖ | Data regions this destination applies to. eu is accepted as an alias for europe and normalizes to europe. Omitting this field defaults to [‘global’]; the array must be non-empty. | [ “global” ] |
samplingRate | number | ➖ | Sampling rate between 0.0001 and 1 (1 = 100%). | 1 |
type | models.CreateObservabilityDestinationRequestType | ✔️ | The destination type. Only stable destination types are accepted. | langfuse |
workspaceId | string | ➖ | Optional workspace ID. Defaults to the authenticated entity’s default workspace, or a workspace-scoped management key’s own workspace. | 550e8400-e29b-41d4-a716-446655440000 |