{"openapi":"3.1.0","info":{"title":"Langfuse (BYOK) API","version":"0.1.0","description":"Langfuse (BYOK) lets an AI assistant read your own Langfuse data through the Langfuse API with a key you supply (Langfuse public key (starts with pk-lf-)). Read-only: 12 tools (get_project, list_observations, list_scores, list_models, get_model, list_prompts, get_prompt, list_datasets, list_dataset_items, list_score_configs, list_experiments, query_metrics). The BYOK key travels with each...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-langfuse.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-langfuse/docs"},"termsOfService":"https://connectorbay.com/byok-langfuse/terms"},"servers":[{"url":"https://byok-langfuse.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-langfuse/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_project":{"post":{"operationId":"get_project","summary":"Show the Langfuse project the keys belong to: id, name, organization and data retention days. Use for \"Which Langfuse pr","description":"Show the Langfuse project the keys belong to: id, name, organization and data retention days. Use for \"Which Langfuse project do my keys belong to\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_projectArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_observations":{"post":{"operationId":"list_observations","summary":"List observations (generations, spans, events) newest first with type, name, model, latency, token usage, cost and trace","description":"List observations (generations, spans, events) newest first with type, name, model, latency, token usage, cost and trace id. Page with the cursor from meta.cursor of the previous answer. Use for \"Show the most expensive Langfuse generations from the last day\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many observations to return (1 to 1000).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":2000,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's meta.cursor for the next page.","title":"Cursor"},"type":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only this observation type, for example GENERATION, SPAN, EVENT, AGENT, TOOL, CHAIN or RETRIEVER.","title":"Type"},"name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only observations with this exact name.","title":"Name"},"level":{"anyOf":[{"enum":["DEBUG","DEFAULT","WARNING","ERROR"],"type":"string"},{"type":"null"}],"default":null,"description":"Only this level: DEBUG, DEFAULT, WARNING or ERROR.","title":"Level"},"user_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only observations for this user id.","title":"User Id"},"session_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only observations of this session id.","title":"Session Id"},"trace_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only observations of this trace id.","title":"Trace Id"},"is_root_observation":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to return only top-level observations.","title":"Is Root Observation"},"from_start_time":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only observations that started at or after this ISO 8601 time, for example 2026-10-01T00:00:00Z.","title":"From Start Time"},"to_start_time":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only observations that started before this ISO 8601 time.","title":"To Start Time"},"fields":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":"core,basic,time,model,usage,metrics","description":"Comma-separated field groups to include: core, basic, time, io, metadata, model, usage, prompt, metrics, trace_context. Leave out io to keep answers small.","title":"Fields"}},"title":"list_observationsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_scores":{"post":{"operationId":"list_scores","summary":"List scores (evaluations and user feedback) with name, value, source, data type and the trace, observation or session th","description":"List scores (evaluations and user feedback) with name, value, source, data type and the trace, observation or session they belong to. Page with the cursor in meta.cursor. Use for \"What evaluation scores named 'helpfulness' were recorded in Langfuse\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many scores to return (1 to 100).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":2000,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's meta.cursor for the next page.","title":"Cursor"},"name":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated score names to keep.","title":"Name"},"source":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated sources to keep, for example API, ANNOTATION, EVAL.","title":"Source"},"data_type":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated data types to keep: NUMERIC, BOOLEAN, CATEGORICAL, TEXT, CORRECTION.","title":"Data Type"},"trace_id":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated trace ids to keep.","title":"Trace Id"},"session_id":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated session ids to keep.","title":"Session Id"},"from_timestamp":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only scores at or after this ISO 8601 time.","title":"From Timestamp"},"to_timestamp":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only scores before this ISO 8601 time.","title":"To Timestamp"}},"title":"list_scoresArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_models":{"post":{"operationId":"list_models","summary":"List the models Langfuse knows for cost calculation with match pattern, unit and input, output and total price. Use for ","description":"List the models Langfuse knows for cost calculation with match pattern, unit and input, output and total price. Use for \"What model prices does my Langfuse project use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many items per page (1 to 100).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_modelsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_model":{"post":{"operationId":"get_model","summary":"Get one model definition by id with its prices and pricing tiers. Use for \"Show the Langfuse model definition clm1abc\".","description":"Get one model definition by id with its prices and pricing tiers. Use for \"Show the Langfuse model definition clm1abc\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Model id as returned by list_models.","maxLength":200,"title":"Id","type":"string"}},"required":["id"],"title":"get_modelArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_prompts":{"post":{"operationId":"list_prompts","summary":"List prompts with type, versions, labels, tags and last update. Filter by name, label or tag. Use for \"Which prompts are","description":"List prompts with type, versions, labels, tags and last update. Filter by name, label or tag. Use for \"Which prompts are labelled production in Langfuse\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only prompts with this exact name.","title":"Name"},"label":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only prompts that have this label, for example production.","title":"Label"},"tag":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only prompts with this tag.","title":"Tag"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many items per page (1 to 100).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_promptsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_prompt":{"post":{"operationId":"get_prompt","summary":"Get one prompt version: its text or chat messages, config, labels, tags and commit message. Defaults to the version labe","description":"Get one prompt version: its text or chat messages, config, labels, tags and commit message. Defaults to the version labelled production. Use for \"Show the production version of the Langfuse prompt 'support-agent'\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"prompt_name":{"description":"Prompt name; folder paths such as 'folder/prompt' are URL-encoded for you.","maxLength":200,"title":"Prompt Name","type":"string"},"version":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Prompt version number to fetch.","title":"Version"},"label":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Label to fetch, for example staging. Defaults to production when no version is given.","title":"Label"}},"required":["prompt_name"],"title":"get_promptArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_datasets":{"post":{"operationId":"list_datasets","summary":"List datasets with description, schemas and creation and update times. Use for \"What datasets exist in my Langfuse proje","description":"List datasets with description, schemas and creation and update times. Use for \"What datasets exist in my Langfuse project\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many items per page (1 to 100).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_datasetsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_dataset_items":{"post":{"operationId":"list_dataset_items","summary":"List dataset items with input, expected output, status and the trace they came from. Filter by dataset name. Use for \"Sh","description":"List dataset items with input, expected output, status and the trace they came from. Filter by dataset name. Use for \"Show the items of the Langfuse dataset 'qa-golden'\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"dataset_name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only items of this dataset name.","title":"Dataset Name"},"source_trace_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only items created from this trace id.","title":"Source Trace Id"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many items per page (1 to 100).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_dataset_itemsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_score_configs":{"post":{"operationId":"list_score_configs","summary":"List score configurations with name, data type, value range, categories and archived state. Use for \"Which score configs","description":"List score configurations with name, data type, value range, categories and archived state. Use for \"Which score configs are defined in Langfuse\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many items per page (1 to 100).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_score_configsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_experiments":{"post":{"operationId":"list_experiments","summary":"List experiments (dataset runs) that had events since a start time, with item count, dataset and time range. Use for \"Wh","description":"List experiments (dataset runs) that had events since a start time, with item count, dataset and time range. Use for \"Which Langfuse experiments ran since September\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"from_start_time":{"description":"Required lower bound: only experiments with events at or after this ISO 8601 time.","maxLength":40,"title":"From Start Time","type":"string"},"to_start_time":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only experiments before this ISO 8601 time.","title":"To Start Time"},"name":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated experiment names to keep.","title":"Name"},"dataset_id":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated dataset ids to keep.","title":"Dataset Id"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many experiments to return (1 to 100).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":2000,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's meta.cursor for the next page.","title":"Cursor"}},"required":["from_start_time"],"title":"list_experimentsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/query_metrics":{"post":{"operationId":"query_metrics","summary":"Aggregate observation or score data with Langfuse's metrics query, for example cost by model per day. query is a JSON st","description":"Aggregate observation or score data with Langfuse's metrics query, for example cost by model per day. query is a JSON string with view (observations, scores-numeric, scores-boolean or scores-categorical), metrics, optional dimensions and filters, fromTimestamp and toTimestamp. Use for \"How much did each model cost in Langfuse over the last week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"description":"JSON string, for example {\"view\":\"observations\",\"metrics\":[{\"measure\":\"totalCost\",\"aggregation\":\"sum\"}],\"dimensions\":[{\"field\":\"providedModelName\"}],\"fromTimestamp\":\"2026-10-01T00:00:00Z\",\"toTimestamp\":\"2026-10-08T00:00:00Z\"}.","maxLength":4000,"title":"Query","type":"string"}},"required":["query"],"title":"query_metricsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}