What is the Inkeep RAG API?
The Inkeep RAG API lets you add retrieval-augmented generation (RAG) to any agent, copilot, or custom workflow. Send a question, get back an AI-generated answer alongside the source documents that informed it — all through a single API call.
The model name to use is inkeep-rag.
OpenAI API compatibility
The Inkeep RAG API is fully compatible with the OpenAI Chat Completions API. This means you can use it with the OpenAI Python SDK, the Anthropic SDK, or any other LLM SDK that supports a custom base_url.
To point an existing SDK at the Inkeep API, set two values:
-
base_url= yourINKEEP_API_BASE_URL -
api_key= yourINKEEP_API_KEY
No other SDK configuration changes are required.
Code example — OpenAI Python SDK
The example below shows how to call the inkeep-rag model using the OpenAI Python SDK.
from openai import OpenAI
client = OpenAI(
base_url="https://api.inkeep.com/v1", # INKEEP_API_BASE_URL
api_key="<your-inkeep-api-key>", # INKEEP_API_KEY
)
response = client.chat.completions.create(
model="inkeep-rag",
messages=[
{
"role": "user",
"content": "How do I get started with Inkeep?"
}
]
)
print(response.choices[0].message.content)Response schema
In addition to the standard AI-generated text response, the Inkeep RAG API returns an array of source documents used to ground the answer. This schema extends Anthropic's Claude Citations spec.
Each document in the array includes the following fields:
| Field | Description |
|---|---|
source |
The source text used to generate the answer |
title |
The title of the source document |
context |
Surrounding context for the retrieved passage |
record_type |
The type of content record (e.g., documentation page, blog post) |
url |
A direct link to the source document |
The document schema extends Anthropic's Claude Citations spec, so it is compatible with tools and workflows already built around that format.
MCP Server integration
The Inkeep RAG API also works as an MCP (Model Context Protocol) server. This lets you connect it directly to MCP-compatible clients — including Cursor, the Claude Desktop App, and others.
An open-source Python template is available to help you get started quickly. The template handles the MCP server setup so you can focus on customizing your integration.
Supported MCP clients include:
- Cursor
- Claude Desktop App
- Any other MCP-compatible client
For setup instructions and the open-source MCP server template, see the Inkeep MCP Server guide.
Next steps
- Get your
INKEEP_API_KEYandINKEEP_API_BASE_URLfrom the Inkeep dashboard. - Try the code example above to make your first API call.
- Explore the MCP Server guide if you want to connect Inkeep to Cursor or Claude Desktop.
Comments
0 comments
Please sign in to leave a comment.