> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ragrails.com/llms.txt
> Use this file to discover all available pages before exploring further.

# REST API Reference

> All HTTP endpoints.

<Note>This page is generated from the FastAPI route table. Run `RAGRAILS_SOURCE=/path/to/ragrails uv run python scripts/generate-reference.py` from the docs repo after REST route or schema changes.</Note>

Start the server:

```bash theme={null}
pip install "ragrails[server-qdrant]"
ragrails-api
```

Base URL: `http://127.0.0.1:8000`

Interactive docs: `http://127.0.0.1:8000/docs`

OpenAPI schema: `http://127.0.0.1:8000/v1/openapi.json`

REST defaults are request payload fields. REST examples do not inherit SDK constructor defaults or CLI `.ragrails.toml` values.

Use [REST API Overview](/usage/server/overview) for workflows. Use this page when you need the endpoint list and OpenAPI entry point.

## Endpoints

| Method | Endpoint                 | Description                                                 |
| ------ | ------------------------ | ----------------------------------------------------------- |
| POST   | `/v1/chat`               | Run retrieval and LLM answer generation.                    |
| POST   | `/v1/chat/stream`        | Stream retrieval, generation, token, and final chat events. |
| POST   | `/v1/chunk`              | Split normalized documents into chunks.                     |
| POST   | `/v1/delete`             | Delete stored chunks by exact chunk ID.                     |
| POST   | `/v1/edit`               | Re-embed and replace stored chunks by exact chunk ID.       |
| POST   | `/v1/embed`              | Embed chunk objects.                                        |
| GET    | `/v1/health`             | Health check.                                               |
| POST   | `/v1/ingest/api`         | Fetch one REST API endpoint into normalized documents.      |
| POST   | `/v1/ingest/docs`        | Parse server-accessible files, folders, or file URLs.       |
| POST   | `/v1/ingest/docs/upload` | Parse multipart file uploads.                               |
| POST   | `/v1/ingest/url`         | Scrape exact URLs or crawl sites.                           |
| POST   | `/v1/ingest/url/stream`  | Stream URL scrape progress and final result.                |
| GET    | `/v1/openapi.json`       | OpenAPI schema.                                             |
| POST   | `/v1/pipelines/ingest`   | Run extraction, chunking, embedding, and storage.           |
| POST   | `/v1/pipelines/query`    | Run query embedding and retrieval.                          |
| POST   | `/v1/retrieve`           | Retrieve relevant chunks.                                   |
| POST   | `/v1/store`              | Store embedded chunks in a vector database.                 |

See the Swagger UI at `/docs` for full request and response schemas.
