LangWatch uses API keys to authenticate SDK calls, MCP connections, and API requests. All keys are managed from a single place: Settings → API Keys.Documentation Index
Fetch the complete documentation index at: https://langwatch.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Key Types
| Personal Key | Service Key | |
|---|---|---|
| Tied to | A specific user | No user (org-level) |
| Best for | Local development, AI assistants (MCP), personal workflows | CI/CD pipelines, automation, service-to-service |
| Permissions | Inherits your RBAC permissions (ceiling model) | Scoped to specific projects with ADMIN access |
| Survives user removal | No — disabled when user leaves the org | Yes — independent of any user |
Requires LANGWATCH_PROJECT_ID | Yes | Yes |
Legacy project keys (the
LANGWATCH_API_KEY shown on the project setup page) still work and will continue to be supported. They have the project context built in, so they don’t require LANGWATCH_PROJECT_ID. New users should prefer creating keys from Settings → API Keys for better security and access control.Creating a Personal API Key
Personal keys are ideal for local development, connecting your AI coding assistant via MCP, or any workflow where you want the key tied to your identity.Go to Settings → API Keys
Navigate to Settings → API Keys in your LangWatch dashboard.
Configure the key
- Type: Select Personal
- Name: Give it a descriptive name (e.g., “My MCP key”, “Local dev”)
- Scope: Select which projects, teams, or the whole organization the key can access
- Expiration: Optionally set an expiration date
- Permissions: Choose a permission mode:
- All — inherits your full permissions at each scope
- Restricted — fine-grained control over individual permission categories (see Permission Categories)
Using a Personal Key
Set bothLANGWATCH_API_KEY and LANGWATCH_PROJECT_ID in your environment:
.env
Creating a Service API Key
Service keys are designed for automated systems — CI/CD pipelines, production services, and multi-project setups. They aren’t tied to any user, so they keep working even if team members leave.Only organization admins can create service keys.
Go to Settings → API Keys
Navigate to Settings → API Keys in your LangWatch dashboard.
Configure the key
- Type: Select Service
- Name: Give it a descriptive name (e.g., “CI pipeline”, “Production tracing”)
- Scope: Select which projects, teams, or the whole organization the key can access
- Expiration: Optionally set an expiration date
- Permissions: Choose All for full access, or Restricted for fine-grained control
Using a Service Key
Service keys requireLANGWATCH_PROJECT_ID so the SDK knows which project to send traces to:
- Environment variables
- Python
- TypeScript
.env
Permission Categories
When using Restricted permissions, you can grant read or write access to individual feature areas:| Category | Read | Write |
|---|---|---|
| Traces | View traces and spans | Create, update, and share traces |
| Cost | View cost analytics | — |
| Scenarios | View test scenarios | Create and manage scenarios |
| Annotations | View annotations | Create and manage annotations |
| Analytics | View analytics dashboards | Create and manage dashboards |
| Evaluations | View evaluations | Create and manage evaluations |
| Datasets | View datasets | Create and manage datasets |
| Triggers | View triggers | Create and manage triggers |
| Workflows | View workflows | Create and manage workflows |
| Prompts | View prompts | Create and manage prompts |
| Secrets | View secrets | Create and manage secrets |
| Audit Log | View audit log | — |
| Team | View team members | Manage team membership |
| Project | View project settings | Create, update, and delete projects |
Connecting to AI Assistants (MCP)
Personal API keys work with the LangWatch MCP Server to give your AI coding assistant access to LangWatch features — tracing, analytics, prompt management, and more.Create a personal API key
Follow the steps above to create a personal key.
Add the MCP server to your editor
- Claude Code
- Cursor / VS Code
Permissions Model
API key permissions follow a ceiling model: a personal key can never exceed the creating user’s own permissions.- If you have ADMIN access and create a key with All permissions, the key gets ADMIN
- If you have MEMBER access and create a key with All permissions, the key gets MEMBER (not ADMIN)
- Restricted keys let you manually narrow access to specific permission categories at read or write level
Managing Keys
From the Settings → API Keys page you can:- View all keys — see name, type, status, scope, permissions, creation date, last used, and creator
- Edit a key — update the name, permission mode, or permission categories
- Revoke a key — immediately disables the key (cannot be undone)