Ai apiRag mode
Using the Inkeep RAG API with the OpenAI SDK
Copy page
Here's an example of how to use Structured Output Parsing with Inkeep's rag model to retrieve structured documents from your knowledge base. 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.
Example
This example demonstrates how to use the OpenAI Node SDK to retrieve structured RAG documents from Inkeep's knowledge base. The response includes an array of documents with context, source information, and URLs.