For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
ModelsChatRankingsDocs
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
  • API Guides
    • Overview
    • Streaming
    • Embeddings
    • Limits
    • Authentication
    • Parameters
    • Errors and Debugging
  • API Reference
      • GETList observability destinations
      • POSTCreate an observability destination
      • GETGet an observability destination
      • DELDelete an observability destination
      • PATCHUpdate an observability destination
LogoLogo
ModelsChatRankingsDocs
API ReferenceObservability

Create an observability destination

POST
https://openrouter.ai/api/v1/observability/destinations
POST
/api/v1/observability/destinations
$curl -X POST https://openrouter.ai/api/v1/observability/destinations \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "config": {
> "baseUrl": "https://us.cloud.langfuse.com",
> "publicKey": "pk-l...EfGh",
> "secretKey": "sk-l...AbCd"
> },
> "name": "Production Langfuse",
> "type": "langfuse"
>}'
1{
2 "data": {
3 "type": "langfuse",
4 "api_key_hashes": null,
5 "config": {
6 "publicKey": "pk-l...EfGh",
7 "secretKey": "sk-l...AbCd",
8 "baseUrl": "https://us.cloud.langfuse.com"
9 },
10 "created_at": "2025-08-24T10:30:00Z",
11 "enabled": true,
12 "filter_rules": null,
13 "id": "99999999-aaaa-bbbb-cccc-dddddddddddd",
14 "name": "Production Langfuse",
15 "privacy_mode": false,
16 "sampling_rate": 1,
17 "updated_at": "2025-08-24T15:45:00Z",
18 "workspace_id": "550e8400-e29b-41d4-a716-446655440000"
19 }
20}

Create a new observability destination. A maximum of 5 destinations per type is allowed. Defaults to the authenticated entity’s default workspace; use the workspace_id body field to scope to a different workspace. Management key required.

Was this page helpful?
Previous

Get an observability destination

Next
Built with

Authentication

AuthorizationBearer
API key as bearer token in Authorization header

Request

This endpoint expects an object.
configmap from strings to anyRequired

Provider-specific configuration. The shape depends on type and is validated server-side.

namestringRequired

Human-readable name for the destination.

typeenumRequired
The destination type. Only stable destination types are accepted.
api_key_hasheslist of strings or nullOptional

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.

enabledbooleanOptionalDefaults to true
Whether this destination should be enabled immediately.
filter_rulesobjectOptional
Optional structured filter rules controlling which events are forwarded.
privacy_modebooleanOptionalDefaults to false

When true, request/response bodies are not forwarded — only metadata.

sampling_ratedoubleOptional

Sampling rate between 0 and 1 (1 = 100%).

workspace_idstringOptionalformat: "uuid"
Optional workspace ID. Defaults to the authenticated entity's default workspace.

Response

Destination created successfully
dataobject
The newly created observability destination.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
500
Internal Server Error