Introducing Virtual MCP Servers
LogoLogo
GithubJoin SlackSignupBook a Demo
  • Documentation
  • Self Hosted
  • Integrations
  • Guides
  • Enterprise
  • Introduction to AI Gateway
  • Supported Models
  • Supported MCP Servers
  • Getting Started
    • Quick Start
    • Working with API
    • Working with Multiple Agents
    • Working with MCPs
    • Working with Headers
    • User Tracking
    • Using Parameters
  • Concepts
    • Thread
    • Trace
    • Run
    • Label
    • Message
    • Virtual Models
      • Routing with Virtual Model
    • Virtual MCP Servers
  • Features
    • Tracing
    • Routing
    • MCP Support
    • Publishing MCP Servers
    • Usage
    • Analytics
    • Guardrails
    • User Roles
    • Cost Control
  • Python SDK
    • Getting Started
  • API Reference
  • Postman Collection
Powered by GitBook
LogoLogo

Social

  • LinkedIn
  • X
  • Youtube
  • Github

Platform

  • Pricing
  • Documentation
  • Blog

Company

  • Home
  • About

Legal

  • Privacy Policy
  • Terms of Service

2025 LangDB. All rights reserved.

On this page
  • Thread ID (x-thread-id)
  • Run ID (x-run-id)
  • Label (x-label)
  • Project ID (x-project-id)

Was this helpful?

Export as PDF
  1. Getting Started

Working with Headers

Explore how LangDB API headers like x-thread-id, x-run-id, x-label, and x-project-id improve LLM tracing, observability, and session tracking for better API management and debugging.

PreviousWorking with MCPsNextUser Tracking

Last updated 3 months ago

Was this helpful?

LangDB API provides robust support for HTTP headers, enabling developers to manage API requests efficiently with enhanced tracing, observability, and organization.

These headers play a crucial role in structuring interactions with multiple LLMs by providing tracing, request tracking, and session continuity, making it easier to monitor, and analyze API usage

Thread ID (x-thread-id)

Usage: Groups multiple related requests under the same conversation

  • Useful for tracking interactions over a single user session.

  • Helps maintain context across multiple messages.

Check for more details.

Run ID (x-run-id)

Usage: Tracks a unique workflow execution in LangDB, such as a model call or tool invocation.

  • Enables precise tracking and debugging.

  • Each Run is independent for better observability.

Check for more details.

Label (x-label)

Usage: Adds a custom tag or label to a LLM Model Call for easier categorization.

  • Helps with tracing multiple agents.

Project ID (x-project-id)

Usage: Identifies the project under which the request is being made.

  • Helps in cost tracking, monitoring, and organizing API calls within a specific project.

  • Can be set in headers or directly in the API base URL https://api.us-east-1.langdb.ai/${langdbProjectId}/v1

Check for more details.

Threads
Run
Label