Skip to main content
MeshAPI RAG lets you upload documents, embed them as vectors, and run semantic search queries against them.
The RAG API has no DELETE endpoint — uploaded files are permanent and cannot be removed programmatically.

Full workflow

The upload → embed → search lifecycle is 6 steps:
1

Init upload

Request a signed upload URL and get a file_id.
2

PUT to signed URL

Upload the file bytes directly to the signed URL using a plain HTTP PUT.
3

Poll upload status

Call rag.get(file_id) until upload_status == "ready".
4

Embed

Call rag.embed([file_id]) to start the embedding process.
5

Poll embedding status

Call rag.get(file_id) until embedding_status == "ready".
6

Search

Run a semantic search query against the embedded file.

Code examples

List files

File statuses

Search options

RAG chat

Combine search results with a chat completion to answer questions from your own documents.