Getting Started with Ragie

Ragie provides secure retrieval augmented generation APIs for developers.


Create documents in Ragie by posting files to the /documents endpoint. Ragie can handle many different types of structured and unstructured files. metadata can be attached to documents to support flexible filtering at retrieval and generation time.

Once you've added documents to Ragie you can semantically search them using the /retrievals endpoint. You can pass a metadata filter which acts as a pre-filter on the retrieval. You may also set options like rerank to improve retrieval quality.

For full details on the available APIs and their options visit the api reference.


Ragie uses Bearer Authentication for authenticating requests. Add an http header in the following form to your requests.

authorization: Bearer <your_api_key>


Documents - Files get imported into Ragie as documents. Their contents are processed to extract semantic information. Many file types are supported and images embedded within documents are further processed to extract their semantic data. The full list of supported file types is available in related methods in the api reference. Documents may include optional metadata that can later be used to filter retrieval. The file associated with a document may be updated, replacing the previous version in future retrieval results.

Metadata - An arbitrary object that is stored with a document and may be used to pre-filter retrieval results. Useful for implementing many use cases such as permissions and categorization. May be updated without re-processing the document's file. Learn more.

Retrieval - A natural language query that can optionally include a metadata filter. Returns a list of chunks suitable to provide as context to an LLM. Supports options that allow trading off between retrieval speed and quality.