---
title: "Rag Ingest"
method: POST
path: "/rag/ingest"
tags: ["rag"]
---

# Rag Ingest

`POST /rag/ingest`

RAG Ingest endpoint - all-in-one document ingestion pipeline.

Supports form upload (for files) or JSON body (for URLs).

## Form upload (for files):
```bash
curl -X POST "http://localhost:4000/v1/rag/ingest" \
    -H "Authorization: Bearer sk-1234" \
    -F file="@document.pdf" \
    -F 'ingest_options={"vector_store": {"custom_llm_provider": "openai"}}'
```

## JSON body (for URLs):
```bash
curl -X POST "http://localhost:4000/v1/rag/ingest" \
    -H "Authorization: Bearer sk-1234" \
    -H "Content-Type: application/json" \
    -d '{
        "file_url": "https://example.com/document.pdf",
        "ingest_options": {"vector_store": {"custom_llm_provider": "openai"}}
    }'
```

## Bedrock:
```bash
curl -X POST "http://localhost:4000/v1/rag/ingest" \
    -H "Authorization: Bearer sk-1234" \
    -F file="@document.pdf" \
    -F 'ingest_options={"vector_store": {"custom_llm_provider": "bedrock"}}'
```

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.net/sea-lion/apis/litellm-api.md) · [All operations](https://skmtc.net/sea-lion/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sea-lion/litellm-api/revisions/1e929292ddd5/schema)
