AI21 Labs integration
AI21 Labs Studio API for Jamba large language models (jamba-large, jamba-mini), document-grounded conversational RAG, AI21 Maestro orchestrated runs, and the file Library used for retrieval-augmented generation. Supports OpenAI-compatible chat completions with tools, structured JSON output, server-sent events streaming, and library file management (upload, list, get, update, delete, download link).
Common AI21 Labs use cases
- conversational AI
- real-time chat UI
- auditing RAG corpus
- research assistants
- retagging documents
- GDPR right-to-erasure
- polling upload status
- RAG knowledge ingestion
- knowledge base assistant
- polling agent completion
What you can do with AI21 Labs
Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.
Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.
Library file, 6 operations
- DELETEdelete_library_file
Permanently removes a file from the AI21 Library.
- GETget_library_file
Fetches metadata for a single AI21 Library file by id.
- GETget_library_file_download_link
Issues a short-lived signed URL for downloading the raw bytes of an AI21 Library file.
- GETlist_library_files
Lists files in the AI21 Library with optional filtering on name, status, or labels and offset/limit pagination.
- PUTupdate_library_file
Updates labels or publicUrl metadata on an existing AI21 Library file.
- POSTupload_library_file
Uploads a document to the AI21 Library for use as RAG context. Returns the new file id.
Chat completion, 2 operations
- POSTchat_completions
Generates a chat completion with an AI21 Jamba model (jamba-large or jamba-mini) given a conversation history. Supports function calling via tools, JSON-mode output, multiple choices (n), custom stop sequences, and document grounding. Returns the ...
- POSTchat_completions_stream
Streams a chat completion from an AI21 Jamba model as Server-Sent Events newline-delimited chunks. Each chunk carries an incremental assistant content delta; the terminal chunk carries the finish_reason and token usage. Requires n=1 and is incompa...
Maestro run, 2 operations
- POSTmaestro_create_run
Starts an AI21 Maestro run - a planner-orchestrator agent over Jamba with file_search/web_search/HTTP/MCP tools. Returns a run id; poll maestro_retrieve_run for completion.
- GETmaestro_retrieve_run
Fetches the status and (when ready) the result of an AI21 Maestro run.
Conversational rag, 1 operation
- POSTconversational_rag
Answers a chat turn grounded in documents from the AI21 Library. Retrieves relevant segments using hybrid (dense + keyword) search, optionally filtered by file_ids, labels, or path, and passes them to a Jamba model to produce a cited answer. Depre...
Use AI21 Labs from Claude Code, Cursor or Codex
Connect AI21 Labs in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its AI21 Labs operations become tools the client can call, next to every other integration you connected.
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"
[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"{
"mcpServers": {
"livecontext": {
"type": "http",
"url": "https://livecontext.ai/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}How to connect AI21 Labs
Create your workspace
Sign up free. Nothing to install.
Connect AI21 Labs once
Add your AI21 Labs connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.
Describe the job in chat
The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.
AI21 Labs integration FAQ
- What can you do with the AI21 Labs integration?
- LiveContext exposes 11 operations on AI21 Labs, covering library file, chat completion, maestro run and conversational rag. Common uses include conversational AI, real-time chat UI and auditing RAG corpus.
Popular integrations
Instagram API with Instagram Login (graph.instagram.com). Manage a Business/Creator Instagram account…
Messaging platform API for building bots and integrations. Send messages, manage chats and channels, handle…
Google's video platform API for accessing video, channel, playlist, and comment data
Social media platform API for content creators and businesses. Access user info, manage videos, get…
Social media platform API for posting, reading, and managing Twitter/X content. Post tweets, read timelines,…
Google email service API for sending, receiving, and managing emails. Access messages, threads, labels,…
AI API from xAI (Elon Musk's AI company) powering Grok models. Access state-of-the-art language models with…
Professional networking platform API for managing profiles, connections, and content. Share posts, manage…