LangSmith API Key API

The api-key API from LangSmith — 4 operation(s) for api-key.

GitHub OpenAPI

Operations 6

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /api/v1/api-key List my API keys · Get Api Keys #
Ask an LLM
“Which API keys have I generated for my account?”
“Can I see all the API keys tied to my tenant?”
Tell an agent
List my API keys.
Show every API key I own.
POST /api/v1/api-key Generate an API key · Generate Api Key #
Ask an LLM
“How do I create a new API key for my account?”
“Can I make an API key that expires or is read-only?”
Tell an agent
Generate an API key described as {description}.
Create an API key expiring at {expires_at} with read-only set to {read_only}.
DELETE /api/v1/api-key/{api_key_id} Delete an API key · Delete Api Key #
Ask an LLM
“How do I revoke an API key I no longer use?”
“Can I delete an API key by its ID?”
Tell an agent destructive · confirm first
Delete API key {api_key_id}.
Revoke the API key {api_key_id} permanently.
GET /api/v1/api-key/current List personal access tokens (deprecated) · Get Personal Access Tokens #
Ask an LLM
“Is there still a deprecated way to list my personal access tokens?”
“What does the legacy endpoint for personal access tokens return?”
Tell an agent
List my personal access tokens using the deprecated endpoint.
Show the legacy personal access token list.
POST /api/v1/api-key/current Generate a personal access token (deprecated) · Generate Personal Access Token #
Ask an LLM
“Can I still generate a personal access token through the deprecated endpoint?”
“What does the legacy personal access token creation return?”
Tell an agent
Generate a personal access token described as {description} via the deprecated endpoint.
Create a legacy personal access token expiring at {expires_at}.
DELETE /api/v1/api-key/current/{pat_id} Delete a personal access token (deprecated) · Delete Personal Access Token #
Ask an LLM
“Is the deprecated endpoint still able to delete a personal access token?”
“Can I remove a legacy personal access token by ID?”
Tell an agent destructive · confirm first
Delete personal access token {pat_id} using the deprecated endpoint.
Revoke the legacy personal access token {pat_id}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/langsmith:langsmith-api-key-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

langsmith-api-key-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: LangSmith API Key API
  description: 'The LangSmith API is used to programmatically create and manage LangSmith resources.


    ## Host

    https://api.smith.langchain.com


    ## Authentication

    To authenticate with the LangSmith API, set the `X-Api-Key` header

    to a valid LangSmith API key.'
  version: 0.1.0
servers:
- url: /
tags:
- name: API Key
paths:
  /api/v1/api-key:
    get:
      tags:
      - API Key
      summary: Get Api Keys
      description: Get the current tenant's API keys
      operationId: get_api_keys_api_v1_api_key_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/APIKeyGetResponse'
                type: array
                title: Response Get Api Keys Api V1 Api Key Get
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
    post:
      tags:
      - API Key
      summary: Generate Api Key
      description: Generate an api key for the user
      operationId: generate_api_key_api_v1_api_key_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIKeyCreateRequest'
              default:
                description: Default API key
                read_only: false
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
  /api/v1/api-key/{api_key_id}:
    delete:
      tags:
      - API Key
      summary: Delete Api Key
      description: Delete an api key for the user
      operationId: delete_api_key_api_v1_api_key__api_key_id__delete
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
      parameters:
      - name: api_key_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Api Key Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyGetResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/api-key/current:
    get:
      tags:
      - API Key
      summary: Get Personal Access Tokens
      description: 'DEPRECATED: Use /orgs/current/personal-access-tokens instead'
      operationId: get_personal_access_tokens_api_v1_api_key_current_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/APIKeyGetResponse'
                type: array
                title: Response Get Personal Access Tokens Api V1 Api Key Current Get
      deprecated: true
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
    post:
      tags:
      - API Key
      summary: Generate Personal Access Token
      description: 'DEPRECATED: Use /orgs/current/personal-access-tokens instead'
      operationId: generate_personal_access_token_api_v1_api_key_current_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIKeyCreateRequest'
              default:
                description: Default API key
                read_only: false
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
  /api/v1/api-key/current/{pat_id}:
    delete:
      tags:
      - API Key
      summary: Delete Personal Access Token
      description: 'DEPRECATED: Use /orgs/current/personal-access-tokens/{pat_id} instead'
      operationId: delete_personal_access_token_api_v1_api_key_current__pat_id__delete
      deprecated: true
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
      parameters:
      - name: pat_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Pat Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyGetResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    APIKeyCreateResponse:
      properties:
        created_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created At
        id:
          type: string
          format: uuid
          title: Id
        short_key:
          type: string
          title: Short Key
        description:
          type: string
          title: Description
        read_only:
          type: boolean
          title: Read Only
          default: false
          deprecated: true
        last_used_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Used At
        expires_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Expires At
        workspace_names:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Workspace Names
        default_workspace_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Default Workspace Name
        key:
          type: string
          title: Key
      type: object
      required:
      - id
      - short_key
      - description
      - key
      title: APIKeyCreateResponse
      description: API key POST schema.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    APIKeyCreateRequest:
      properties:
        description:
          type: string
          title: Description
          default: Default API key
        read_only:
          type: boolean
          title: Read Only
          default: false
          deprecated: true
        expires_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Expires At
        workspaces:
          anyOf:
          - items:
              type: string
              format: uuid
            type: array
          - type: 'null'
          title: Workspaces
        role_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Role Id
        org_role_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Org Role Id
        default_workspace_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Default Workspace Id
      type: object
      title: APIKeyCreateRequest
      description: "API key POST schema.\n\nexpires_at: Optional datetime when the API key will expire.\nworkspaces: List of workspace UUIDs this key can access (feature-flagged).\nrole_id: Optional UUID of the role to assign to API key.\n    If not provided, uses default role based on read_only flag:\n    - WORKSPACE_ADMIN if read_only is False\n    - WORKSPACE_READER if read_only is True\norg_role_id: UUID of a org role for org-scoped keys\n    If not provided, defaults to ORG_USER\ndefault_workspace_id: UUID of the default workspace for PATs.\n    If not provided, uses the current logic (first available workspace)."
    APIKeyGetResponse:
      properties:
        created_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created At
        id:
          type: string
          format: uuid
          title: Id
        short_key:
          type: string
          title: Short Key
        description:
          type: string
          title: Description
        read_only:
          type: boolean
          title: Read Only
          default: false
          deprecated: true
        last_used_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Used At
        expires_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Expires At
        workspace_names:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Workspace Names
        default_workspace_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Default Workspace Name
      type: object
      required:
      - id
      - short_key
      - description
      title: APIKeyGetResponse
      description: API key GET schema.
  securitySchemes:
    API_Key:
      type: apiKey
      in: header
      name: X-API-Key
    Tenant_ID:
      type: apiKey
      in: header
      name: X-Tenant-Id
    Bearer_Auth:
      type: http
      description: Bearer tokens are used to authenticate from the UI. Must also specify x-tenant-id or x-organization-id (for org scoped apis).
      scheme: bearer
    Organization_ID:
      type: apiKey
      in: header
      name: X-Organization-Id