canonical: https://jentic.com/apis/openindex.ai/openindex

# OpenIndex Retrieval Plugin API

OpenIndex is a retrieval-augmented-generation backend that returns relevant document chunks for a natural-language query, optionally filtered by metadata. The single POST /query endpoint accepts one or more queries with embedded filters and a top-k value, and returns matching documents from the indexed corpus. Authentication is bearer token, and the API is designed to plug into agent frameworks and ChatGPT-style retrieval plugins as a drop-in knowledge backend.

## For AI agents

Run a natural-language query against an indexed document corpus and get back the most relevant chunks for retrieval-augmented generation.

## Scope

Does not handle document ingestion, embedding generation, or index management - use for retrieval queries against an existing OpenIndex corpus only.

## Capabilities

- Run a natural-language query against an indexed corpus and retrieve the top matching document chunks
- Filter retrieval results by metadata such as source, author, document_id, or custom fields
- Submit multiple queries in a single request to support batched RAG calls in an agent loop
- Tune top-k to balance recall against the size of the context window passed to the LLM
- Plug OpenIndex in as the retrieval backend for an agent or ChatGPT-style retrieval plugin

## Use cases

### Retrieval-Augmented Generation Backend

Use OpenIndex as the retrieval step in a RAG pipeline. The agent sends the user's question to POST /query, receives the top-k chunks, and passes them as context to the language model. Multiple queries can be batched in one request, and metadata filters keep retrieval scoped to a specific tenant or document set.

Example prompt: POST /query with the user question, top_k=5, and a filter on document_id, then pass the returned chunks to the LLM as grounding context.

### ChatGPT-Style Retrieval Plugin Backend

OpenIndex follows the retrieval plugin contract used by ChatGPT-style assistants, so it can be wired up as the knowledge source for a custom agent without bespoke glue code. The single POST /query endpoint returns ranked document chunks suitable for grounding a response.

Example prompt: Configure an assistant to call POST /query with the user prompt and use the returned passages as the citation source for its answer.

### Filtered Knowledge Search for an Internal Agent

Internal copilots often need to scope retrieval to a single team's documents. OpenIndex query filters narrow the search to specific metadata values such as team or source, so the agent only sees authorised content. Combine filters with top_k to control how much context is returned.

Example prompt: POST /query with the user question and a filter on source='engineering-handbook', then return the three highest-scoring passages.

### AI Agent Knowledge Retrieval via Jentic

An agent that needs grounded answers can call OpenIndex through Jentic so the bearer token is vaulted and the operation schema is returned alongside the call. Jentic mediates the request and the agent receives a structured ranked-list response without parsing OpenAPI.

Example prompt: Use Jentic to search for 'retrieve documents relevant to a question', execute POST /query with top_k=5, and pass the returned chunks as grounding for the next LLM call.

## Key resources

- **Query** — Run one or more retrieval queries with optional metadata filters and a top-k value, and receive ranked document chunks.

## Why Jentic

- **Setup:** Wiring the OpenIndex Retrieval Plugin API by hand means setting up its bearer auth against retriever.openindex.ai and shaping the query with the right filter and top_k fields for each retrieval call. Through Jentic you install once, import the OpenIndex Retrieval Plugin API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** This surface exposes a single retrieval query operation, so you limit the agent to the operation it needs, running read-only queries against an existing OpenIndex corpus. There is no ingestion or index-management operation on this surface, so the agent cannot alter the corpus.
- **Credential handling:** Your OpenIndex 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.
- **Discovery method:** Agents search Jentic by intent such as 'retrieve documents matching a question', and Jentic returns the OpenIndex query operation with its filter and top_k schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Pinecone API** — Pinecone is a managed vector database, while OpenIndex offers a higher-level retrieval-plugin interface over a hosted index.
- **Algolia Search API** — Algolia is a keyword and faceted search platform; OpenIndex is purpose-built for LLM retrieval-augmented generation.
- **Elastic API** — Elastic offers full-text and vector search at scale; OpenIndex can sit on top as a simpler RAG retrieval interface.
- **Meilisearch API** — Meilisearch is a developer-friendly search engine; OpenIndex specialises in retrieval-plugin-style RAG output.

## FAQ

### What authentication does the OpenIndex Retrieval Plugin API use?

Bearer token authentication via the standard Authorization header. Through Jentic the bearer token is stored in your Jentic One instance and added to the request automatically.

### Can I filter retrieval results by metadata with the OpenIndex Retrieval Plugin API?

Yes. Each query in the POST /query payload accepts a filter object that constrains results by metadata such as source, document_id, or any custom field present in the indexed documents.

### What are the rate limits for the OpenIndex Retrieval Plugin API?

The OpenAPI spec does not state a rate limit. Treat the API as fair-use, batch related queries into a single POST /query request to reduce round trips, and contact OpenIndex for production quotas.

### How do I retrieve documents for a question with the OpenIndex Retrieval Plugin API through Jentic?

Search Jentic for 'retrieve documents relevant to a question', load POST /query, and execute it with the user query, an optional filter, and a top_k of 3 to 5. Jentic injects the bearer token from the vault.

### Can I send multiple queries in a single OpenIndex Retrieval Plugin API call?

Yes. POST /query accepts an array of queries, each with its own filter and top_k. This is useful for batched retrieval where an agent generates several sub-questions before grounding.

### Can I limit what my agent is allowed to do with the OpenIndex Retrieval Plugin API?

Yes. Because you run Jentic One yourself, your own rules decide which operations and credentials the agent may use, and this API exposes only a single POST /query retrieval operation. You can allow the agent that read-only query while it runs searches against an existing OpenIndex corpus, and since the surface has no document-ingestion, embedding, or index-management operation, the agent cannot alter the corpus. Your OpenIndex bearer token is held by your own Jentic One instance and injected only when a permitted query runs.
