Langbase Agent API

The Agent API from Langbase — 1 operation(s) for agent.

Operations 1

POST /v1/agent/run V1 agent run #

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/langbase:langbase-agent-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

langbase-agent-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Langbase Agent API
  version: 1.0.0
servers:
- url: https://api.langbase.com
  description: Production
tags:
- name: Agent
paths:
  /v1/agent/run:
    post:
      operationId: v1AgentRun
      security:
      - bearerAuth: []
      responses:
        '200':
          description: 'Langbase: Agent Run'
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  completion:
                    type: string
                  raw:
                    type: object
                    properties:
                      id:
                        type: string
                      object:
                        type: string
                      created:
                        type: number
                      model:
                        type: string
                      provider:
                        type: string
                      choices:
                        type: array
                        items:
                          type: object
                          properties:
                            index:
                              type: number
                            message:
                              type: object
                              properties:
                                role:
                                  type: string
                                  enum:
                                  - user
                                  - system
                                  - tool
                                  - assistant
                                content:
                                  type:
                                  - string
                                  - 'null'
                                refusal:
                                  type:
                                  - string
                                  - 'null'
                                annotations:
                                  type: array
                                  items: {}
                                tool_calls:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                      type:
                                        type: string
                                        enum:
                                        - function
                                      function:
                                        type: object
                                        properties:
                                          name:
                                            type: string
                                          arguments:
                                            type: string
                                        required:
                                        - name
                                    required:
                                    - id
                                    - type
                                    - function
                              required:
                              - role
                              - content
                              - tool_calls
                            logprobs:
                              type:
                              - string
                              - 'null'
                            finish_reason:
                              type: string
                          required:
                          - index
                          - message
                      usage:
                        type: object
                        properties:
                          prompt_tokens:
                            type: number
                          completion_tokens:
                            type: number
                          total_tokens:
                            type: number
                          prompt_tokens_details:
                            type: object
                            properties:
                              cached_tokens:
                                type: number
                              audio_tokens:
                                type: number
                            required:
                            - cached_tokens
                            - audio_tokens
                          completion_tokens_details:
                            type: object
                            properties:
                              reasoning_tokens:
                                type: number
                              audio_tokens:
                                type: number
                              accepted_prediction_tokens:
                                type: number
                              rejected_prediction_tokens:
                                type: number
                            required:
                            - reasoning_tokens
                            - audio_tokens
                            - accepted_prediction_tokens
                            - rejected_prediction_tokens
                        required:
                        - prompt_tokens
                        - completion_tokens
                        - total_tokens
                      service_tier:
                        type: string
                      system_fingerprint:
                        type:
                        - string
                        - 'null'
                    required:
                    - id
                    - object
                    - created
                    - model
                    - choices
                    - usage
                required:
                - completion
                - raw
            application/octet-stream:
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                      docs:
                        type: string
                    required:
                    - code
                    - status
                    - message
                    - docs
                required:
                - success
                - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                required:
                - success
                - error
                - code
      tags:
      - Agent
      summary: V1 agent run
      x-summary-source: derived
components:
  securitySchemes:
    bearerAuth:
      bearerFormat: Langbase-API-Key
      type: http
      scheme: bearer
      description: 'Enter your Langbase API key with format: Bearer Langbase-API-Key'
x-provenance:
  method: harvested
  publisher: Langbase
  source: https://api.langbase.com/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)