Pipe: List v1

The list pipe API endpoint allows you to get a list of pipes on Langbase with API. This endpoint requires a User or Org API key.


Generate a User/Org API key

You will need to generate an API key to authenticate your requests. For more information, visit the User/Org API key documentation.


GET/v1/pipes

Get a list of pipes

Get a list of all pipes by sending a GET request to this endpoint.

Headers

  • Name
    Content-Type
    Type
    string
    Description

    Request content type. Needs to be application/json.

  • Name
    Authorization
    Type
    string
    Description

    Replace <YOUR_API_KEY> with your user/org API key.

Usage example

Install the SDK

npm i langbase

Environment variables

.env file

LANGBASE_API_KEY="<YOUR_API_KEY>"

List pipes

List Pipes

GET
/v1/pipes
curl https://api.langbase.com/v1/pipes \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer <YOUR_API_KEY>"

Response

  • Name
    Pipe[]
    Type
    Array<Pipe>
    Description

    An array of pipe objects returned by the API endpoint.

    Pipe

    interface Pipe { name: string; description: string; status: 'public' | 'private'; owner_login: string; url: string; model: string; stream: boolean; json: boolean; store: boolean; moderate: boolean; top_p: number; max_tokens: number; temperature: number; presence_penalty: number; frequency_penalty: number; stop: string[]; tool_choice: 'auto' | 'required' | ToolChoice; parallel_tool_calls: boolean; messages: Message[]; variables: Variable[] | []; tools: ToolFunction[] | []; memory: Memory[] | []; }
    • Name
      name
      Type
      string
      Description

      Name of the pipe.

    • Name
      description
      Type
      string
      Description

      Description of the AI pipe.

    • Name
      status
      Type
      'public' | 'private'
      Description

      Status of the pipe.

    • Name
      owner_login
      Type
      string
      Description

      Login of the pipe owner.

    • Name
      url
      Type
      string
      Description

      Pipe access URL.

    • Name
      model
      Type
      string
      Description

      Pipe LLM model. Combination of model provider and model id.

      Format: provider:model_id

    • Name
      stream
      Type
      boolean
      Description

      Pipe stream status. If enabled, the pipe will stream the response.

    • Name
      json
      Type
      boolean
      Description

      Pipe JSON status. If enabled, the pipe will return the response in JSON format.

    • Name
      store
      Type
      boolean
      Description

      Whether to store the prompt and completions in the database.

    • Name
      moderate
      Type
      boolean
      Description

      Whether to moderate the completions returned by the model.

    • Name
      top_p
      Type
      number
      Description

      Pipe configured top_p value.

    • Name
      max_tokens
      Type
      number
      Description

      Configured maximum tokens for the pipe.

    • Name
      temperature
      Type
      number
      Description

      Configured temperature for the pipe.

      What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random. Lower values like 0.2 will make it more focused and deterministic.

    • Name
      presence_penalty
      Type
      number
      Description

      Configured presence penalty for the pipe.

    • Name
      frequency_penalty
      Type
      number
      Description

      Configured frequency penalty for the pipe.

    • Name
      stop
      Type
      string[]
      Description

      Configured stop sequences for the pipe.

    • Name
      tool_choice
      Type
      'auto' | 'required' | ToolChoice
      Description

      Tool usage configuration.

      • Name
        'auto'
        Type
        string
        Description

        Model decides when to use tools.

      • Name
        'required'
        Type
        string
        Description

        Model must use specified tools.

      • Name
        ToolChoice
        Type
        object
        Description

        Forces use of a specific function.

        ToolChoice Object

        interface ToolChoice { type: 'function'; function: { name: string; }; }
    • Name
      parallel_tool_calls
      Type
      boolean
      Description

      If enabled, the pipe will make parallel tool calls.

    • Name
      messages
      Type
      Array<Message>
      Description

      A messages array including the following properties.

      Message Object

      interface Message { role: 'user' | 'assistant' | 'system'| 'tool'; content: string | null; name?: 'json' | 'safety' | 'opening' | 'rag'; }
      • Name
        role
        Type
        'user' | 'assistant' | 'system'| 'tool'
        Description

        The role of the author of this message.

      • Name
        content
        Type
        string
        Description

        The contents of the message.

      • Name
        name
        Type
        'json' | 'safety' | 'opening' | 'rag'
        Description

        The name of the system message type.

    • Name
      variables
      Type
      Array<Variable>
      Description

      A variables array including the name and value params.

      Variable Object

      interface Variable { name: string; value: string; }
      • Name
        name
        Type
        string
        Description

        The name of the variable.

      • Name
        value
        Type
        string
        Description

        The value of the variable.

    • Name
      memory
      Type
      Array<Memory>
      Description

      An array of memories the pipe has access to.

      Memory Object

      interface Memory { name: string; }

API Response

[ { "name": "summary-agent", "description": "AI pipe for summarization", "status": "public", "owner_login": "user123", "url": "https://langbase.com/user123/summary-agent", "model": "openai:gpt-4o-mini", "stream": true, "json": false, "store": true, "moderate": false, "top_p": 1, "max_tokens": 1000, "temperature": 0.7, "presence_penalty": 1, "frequency_penalty": 1, "stop": [], "tool_choice": "auto", "parallel_tool_calls": true, "messages": [], "variables": [], "tools": [], "memory": [] } ]