Skip to main content
The Ingest endpoint handles document uploads, visual extraction, and indexing. Upload your PDFs, slides, and visual documents to build a queryable knowledge base.

Upload Document

Upload a file to be processed through the Polyvia Engine pipeline (extraction, indexing, and fact connection).

Endpoint

POST /ingest

Request Body

file
file
required
The file to upload. Supported formats: PDF, DOCX, PPTX, PNG, JPG
name
string
required
Display name for the document
metadata
object
Optional metadata to attach to the document
options
object
Processing options

Response

document_id
string
required
Unique identifier for the uploaded document
name
string
Document display name
status
string
Processing status: pending, processing, completed, failed
created_at
timestamp
ISO 8601 timestamp of when the document was uploaded

Example

curl -X POST https://api.polyvia.ai/ingest \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@/path/to/report.pdf" \
  -F "name=Q4 Financial Report" \
  -F 'metadata={"tags":["finance","quarterly"],"author":"Finance Team"}'
{
  "document_id": "doc_abc123xyz",
  "name": "Q4 Financial Report",
  "status": "processing",
  "created_at": "2025-01-27T10:30:00Z"
}

Get Document Status

Check the processing status of an uploaded document.

Endpoint

GET /ingest/{document_id}

Path Parameters

document_id
string
required
The document identifier returned from the upload endpoint

Response

document_id
string
Document identifier
name
string
Document display name
status
string
Processing status: pending, processing, completed, failed
facts_extracted
integer
Number of facts extracted from the document
pages_processed
integer
Number of pages processed
error
string | null
Error message if status is failed

Example

curl https://api.polyvia.ai/ingest/doc_abc123xyz \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "document_id": "doc_abc123xyz",
  "name": "Q4 Financial Report",
  "status": "completed",
  "facts_extracted": 127,
  "pages_processed": 45,
  "created_at": "2025-01-27T10:30:00Z",
  "completed_at": "2025-01-27T10:32:15Z",
  "error": null
}

List Documents

List all documents in your knowledge base.

Endpoint

GET /ingest

Query Parameters

limit
integer
default:"50"
Maximum documents to return (1-100)
offset
integer
default:"0"
Number of documents to skip
status
string
Filter by status: pending, processing, completed, failed

Example

curl "https://api.polyvia.ai/ingest?limit=10&status=completed" \
  -H "Authorization: Bearer YOUR_API_KEY"

Delete Document

Remove a document from your knowledge base.

Endpoint

DELETE /ingest/{document_id}

Example

curl -X DELETE https://api.polyvia.ai/ingest/doc_abc123xyz \
  -H "Authorization: Bearer YOUR_API_KEY"

Supported File Formats

Documents

  • PDF (.pdf)
  • Word (.docx)
  • PowerPoint (.pptx)

Images

  • PNG (.png)
  • JPEG (.jpg, .jpeg)
  • TIFF (.tiff)
Maximum file size: 100 MB per file. Contact support for larger file processing.

Processing Pipeline

When you upload a document, Polyvia automatically:
  1. Extracts visual logic from charts, tables, diagrams, and infographics
  2. Indexes facts into your knowledge base with source tracking
  3. Connects related facts across documents for cross-document reasoning
Documents are typically processed within 1-2 minutes. Use the status endpoint to check progress.