Product
Jentic OSThe workplace. An in-house AI platform for every employeeJentic OneSafe access. Agents reach your systems without holding keysJentic AIRThe foundation. Gets your existing platforms ready for AI
Pricing
Developers

GET STARTED

API DirectoryBrowse 10,000+ APIs Ready For AI Agent IntegrationDocumentationGuides and API reference

TOOLS

API ScoringCheck your AI Readiness using our scorecardArazzo UIVisualize Arazzo Workflows As Interactive DocumentationArazzo EditorBuild And Edit Multi-Step API Workflows Visually

COMMUNITY

GitHubOpen source projects and examplesOpen StandardsBuilt on open specs. Never locked in.
Resources
Company
About UsOur mission and teamCareersJoin our teamContactGet in touch
Try it now
Jentic OSJentic OneJentic AIR
Pricing
API DirectoryDocumentationAPI ScoringArazzo UIArazzo EditorGitHubOpen Standards
Resources
About UsCareersContact
Try it now
JenticJentic
Products
  • Jentic OS
  • Jentic One
  • Jentic AIR
For Developers
  • API Directory
  • Documentation
  • GitHub
Company
  • About Jentic
  • Careers
  • Contact Us
  • Trust Centre
ISO/IEC 27001:2022 certification badge issued by Prescient SecurityISO/IEC 27001:2022 certification badge issued by Prescient Security

Information Security Management System

Certified to ISO/IEC 27001:2022 by Prescient Security

Terms & Conditions•Privacy Policy•
© 2026 Jentic Technology Ltd. All rights reserved.
Switch to light modeSwitch to dark mode
APIs / AI/ML / AI21 Labs API
AI21 Labs API logo

AI21 Labs API

Agent-ready OpenAPI document · curated by JenticAI/MLLanguage Modelsbearer7 EndpointsREST

Know of an official OpenAPI document? Contribute it →

For Agents

Run chat completions against AI21's language models, generate text embeddings, tokenize and detokenize text, and manage documents in the retrieval library.

Use for: Generate a chat completion for this prompt, Create embeddings for these documents, Count the tokens in this text before sending it, Upload a document to the retrieval library

Not supported: Does not fine-tune models, host inference endpoints, or manage billing. Use for AI21 text generation, embeddings, and retrieval only.

Jentic publishes the only available OpenAPI specification for AI21 Labs API, keeping it validated and agent-ready. The AI21 Labs API runs large language model chat completions and text embeddings, tokenizes and detokenizes text, and manages a document library for retrieval. It gives agents direct access to AI21's language models for generation and semantic search.

Jentic One on GithubView OpenAPI Document

Install Jentic One Beta

Connect the AI21 Labs API to your agent

Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the AI21 Labs API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.

Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.

1

Step 1: Jentic One Host machine

# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fai21.com%2Fai21" | sh
2

Step 2: Agent machine

# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fai21.com%2Fai21" | sh
jentic register       # connects your agent to your Jentic One instance

Jentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.

Capabilities

What an agent can do with AI21 Labs API.

Run chat completions against AI21's language models

Generate text embeddings for semantic search and retrieval

Tokenize and detokenize text to manage context length

Upload and manage documents in the retrieval library

Retrieve a previous chat completion by its request identifier

Use Cases

Patterns agents use AI21 Labs API for, with concrete tasks.

★ Agent Language Generation

An AI agent can call the chat completion operation to summarize, rewrite, or answer from a prompt using AI21's language models. Because the request and response formats are structured, the agent can chain generation into a larger workflow without bespoke parsing. Through Jentic the agent discovers the completion operation by intent and runs it with the token injected at call time.

Generate a summary of this support ticket using a chat completion

Semantic Search Over Documents

An agent can embed a set of documents, store them in the retrieval library, and later embed a query to find the most relevant passages. This gives retrieval-augmented answers without standing up a separate vector database. The agent works only with the files it uploads.

Embed these 20 FAQ entries and store them for retrieval

Context-Length Management

Before sending a long prompt, an agent can tokenize the text to measure its length and trim it to fit the model's context window, then detokenize when it needs to inspect tokens. This avoids failed requests from oversized inputs. The check runs as a lightweight preflight step.

Tokenize this document and tell me if it fits the model's context window

Key Endpoints

7 endpoints — jentic publishes the only available openapi specification for ai21 labs api, keeping it validated and agent-ready.

METHOD

PATH

DESCRIPTION

POST

/chat/completions

Run a chat completion

POST

/embed

Generate text embeddings

POST

/tokenize

Tokenize text

POST

/detokenize

Convert tokens back to text

GET

/library/files

List documents in the retrieval library

POST

/library/files

Upload a document to the retrieval library

POST

/chat/completions

Run a chat completion

POST

/embed

Generate text embeddings

POST

/tokenize

Tokenize text

POST

/detokenize

Convert tokens back to text

GET

/library/files

List documents in the retrieval library

POST

/library/files

Upload a document to the retrieval library

Why Jentic?

What agents get from Jentic-routed access to this vendor.

Setup

Setup

Wiring the AI21 Labs API by hand means obtaining a bearer token, setting the Authorization header on every request, and handling the completion, embedding, and library request formats yourself. Through Jentic you install once, import AI21 from the API Directory, store the token once, and your agent calls it.

Permission scoping

Permission scoping

AI21 carries each request's input in the body rather than the URL path, so rules bound which operations the agent may call. You can allow completions and embeddings while keeping the agent out of the document library, or restrict it to read-only library access.

Credential management

Credential isolation

Your AI21 bearer token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.

Intent-based discovery

Intent-based discovery

Agents search Jentic by intent such as 'generate a chat completion' or 'create text embeddings', and Jentic returns the matching AI21 Labs operation with its input schema so the agent calls the right endpoint without reading the reference docs.

Related APIs

Alternatives and complements available in the Jentic catalogue.

Alternative

OpenAI

→

OpenAI offers chat completions and embeddings from its own model family.

Choose OpenAI when the agent needs its specific models or the broader OpenAI tooling ecosystem.

Alternative

Anthropic

→

Anthropic's Messages API runs Claude models for chat-style generation.

Choose Anthropic when the agent should generate with Claude rather than AI21's models.

Alternative

Cohere

→

Cohere provides generation and embeddings with a strong retrieval focus.

Choose Cohere when the agent's workload centers on enterprise retrieval and reranking.

FAQs

Specific to using AI21 Labs API through Jentic.

Why is there no official OpenAPI spec for AI21 Labs API?

AI21 Labs does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call the AI21 Labs API via structured tooling. It is validated against the live API and kept up to date. To run it on your own infrastructure, install Jentic One from its GitHub repo.

Is there an AI21 Labs MCP server?

You don't need an MCP server to give your agent the AI21 Labs API. Jentic connects it directly from the API Directory: import it, store your bearer token once, and your agent runs completions and embeddings. No extra server sits in the agent's context.

Can I limit what my agent is allowed to do with the AI21 Labs API?

Yes. You choose which operations the agent may call, so it can be allowed to run completions and embeddings while being kept out of the document library, or restricted to read-only library access. Requests carry their input in the body rather than the URL path, so rules bound which operations the agent may use. Every call is logged.

What authentication does the AI21 Labs API use?

The AI21 Labs API authenticates with a bearer token in the Authorization header, per its OpenAPI spec. Through Jentic the token is stored encrypted by your own Jentic One instance and injected when the agent makes a call, so it never appears in the agent's prompt or logs.

Can my agent do semantic search with the AI21 Labs API?

Yes. The embeddings operation turns text into vectors, and the document library stores files for retrieval, so an agent can embed a query and find the most relevant passages without a separate vector service.

What are the rate limits for the AI21 Labs API?

The OpenAPI spec does not specify rate limits; AI21 applies per-plan quotas. Check the AI21 Labs documentation for the current limits before scaling an agent's usage.

How does my agent run a completion with the AI21 Labs API through Jentic?

Search Jentic for 'generate a chat completion' and it returns the AI21 Labs completion operation with its input schema. Store your bearer token once, then the agent sends a prompt and reads back the generated text.

GET STARTED

Start building with AI21 Labs API

Explore with Jentic One
View OpenAPI Document