Ai apiRag mode
Using the Inkeep RAG API with the Vercel AI SDK
Copy page
Using the Vercel AI SDK with Inkeep's RAG API
The Inkeep RAG API provides structured documents from your knowledge base. This example shows how to use the Vercel AI SDK to retrieve these documents. Please ensure you have an API key (don't have one? Get one here).
Tip
Log your AI API conversations to the Analytics API to get analytics and reporting, track user feedback, and power features like shared or saved chats — all viewable in the Inkeep Portal.
Schema Definition
Simple Example
This example demonstrates how to use the Vercel AI SDK to retrieve structured RAG documents from Inkeep's knowledge base. The response includes an array of documents with context, source information, and URLs.