Skip to main content
POST
/
v2
/
memory
/
knowledge
/
ingest
Ingest Knowledge
curl --request POST \
  --url https://api.velt.dev/v2/memory/knowledge/ingest \
  --header 'Content-Type: application/json' \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>' \
  --data '
{
  "data": {
    "source": "<string>",
    "file": {},
    "fileRef": "<string>",
    "mimeType": "<string>",
    "organizationId": "<string>",
    "documentId": "<string>"
  }
}
'
{
  "result": {
    "status": "processing",
    "sourceId": "src_9a8...",
    "message": "Ingestion started."
  }
}
Use this API to submit reference material (guidelines, standards, policy docs) to your Memory knowledge base. Ingestion is asynchronous: the call returns immediately with a sourceId, and conversion, rule extraction, and embedding run in the background. Poll Get Ingest Status until the status is terminal. Supported file types: PDF, CSV, Excel (.xlsx), and plain text.

Endpoint

POST https://api.velt.dev/v2/memory/knowledge/ingest

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

The request is a discriminated union on source: send source: "inline" with a base64 file (decoded size up to 5 MB), or source: "fileRef" with a gs:// URI from Get Upload URL (up to 30 MB).
data
object
required

Example Requests

Inline (file up to 5 MB)

{
  "data": {
    "source": "inline",
    "file": {
      "base64": "JVBERi0xLjQK...",
      "mimeType": "application/pdf",
      "fileName": "brand-guidelines.pdf",
      "fileSize": 184320
    }
  }
}

By reference (file up to 30 MB)

{
  "data": {
    "source": "fileRef",
    "fileRef": "gs://bucket/path/original.pdf",
    "mimeType": "application/pdf"
  }
}

Response

Ingestion runs in the background. Poll Get Ingest Status with the returned sourceId until the status is completed or failed.

Success Response

{
  "result": {
    "status": "processing",
    "sourceId": "src_9a8...",
    "message": "Ingestion started."
  }
}

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
{
  "result": {
    "status": "processing",
    "sourceId": "src_9a8...",
    "message": "Ingestion started."
  }
}