---
title: "Ingest"
method: POST
path: "/api/knowledge/ingest"
---

# Ingest

`POST /api/knowledge/ingest`

Ingest text notes and/or files into the farm's knowledge base.

Two paths:
1. text + optional title  → ingest as a text note directly (no extraction needed)
2. files                  → extract text, dedup, index into OpenAI vector store

For files that need human review (image/audio/PDF), the frontend calls /extract
first, lets the user edit the text, then re-submits via /ingest with text + source_type.

## Response `200`

Successful Response

- KnowledgeIngestResponse
  - `sources_created` integer
  - `documents_created` integer
  - `openai_indexed` boolean
  - `warnings` string[]

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/nexa/apis/farm-intel-api.md) · [All operations](https://skmtc.dev/nexa/apis/farm-intel-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nexa/farm-intel-api/revisions/b1933769082d/schema)
