Langbase API
Langbase is an API-first platform delivering exceptional developer experience. Our APIs are simple, intuitive, and designed for seamless integration. With clear documentation, practical code examples, and responsive community support, we help you build quickly and efficiently.
Table of contents
Introduction
You can interact with Langbase APIs using
- HTTP requests from any language,
- or via our official Langbase SDK (Node.js),
- or via BaseAI.dev, our open-source web AI framework.
To install the official Node.js Langbase SDK, run the following command in your Node.js project directory:
Install the SDK
npm i langbase
From here on you can use the Langbase SDK to interact with Langbase APIs.
Authentication
The Langbase API uses API keys for authentication. You can create API keys at a user or org account level. Some API endpoints like when running a pipe allow you to specify a pipe specific API key as well.
All API requests should include your API key in an Authorization HTTP header as follows:
Authorization: Bearer LANGBASE_API_KEY
With Langbase SDK, you can set your API key as follows:
import {Langbase} from 'langbase';
const langbase = new Langbase({
apiKey: process.env.LANGBASE_API_KEY
});
Langbase API Reference
Explore the Langbase API reference to build AI agents with memory.
- Pipe AI agents for any LLM
- Memory agents and documents for RAG
- Errors Common API errors and how to handle them
- Limits API rate limits and usage
- Deprecated Deprecated APIs
- Migration Guides from
beta
tov1
Next Steps
- Build something cool with Langbase APIs.
- Join our Discord community for feedback, requests, and support.