Welcome to the Polyvia AI API documentation. Our API enables you to build applications that transform unstructured documents into searchable, structured knowledge.
Core Pipeline
Polyvia’s API follows a multi-stage pipeline for processing documents:
Ingest
Upload documents (PDF, DOCX, PPTX, audio, video) to the platform
Parse
Extract structured content using multimodal parsing (text, tables, charts, images)
Index
Embed content into vector database for semantic search
Knowledge Graph
Extract entities and relationships to build a knowledge graph
Retrieval
Search and retrieve information with citations using semantic, keyword, or hybrid search
Authentication
All API requests require authentication using an API key. Include your key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Keep your API key secure. Never expose it in client-side code or public repositories.
Getting Your API Key
- Log in to your Polyvia dashboard
- Navigate to Settings → API Keys
- Click Create New Key
- Copy and securely store your key
Base URL
Rate Limits
Rate limits vary by plan:
- Free: 100 requests/day
- Pro: 1,000 requests/day
- Enterprise: Custom limits
Monitor your usage in the dashboard to avoid hitting rate limits.
Quick Start
Here’s a complete example of the document processing workflow:
// 1. Upload document
const formData = new FormData();
formData.append('file', fileBlob);
formData.append('name', 'My Document');
const uploadRes = await fetch('https://api.polyvia.ai/api/ingest', {
method: 'POST',
headers: { 'Authorization': `Bearer ${apiKey}` },
body: formData
});
const { document_id } = await uploadRes.json();
// 2. Parse document
const parseRes = await fetch('https://api.polyvia.ai/api/parse', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ document_id })
});
// 3. Index for search
await fetch('https://api.polyvia.ai/api/index', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ document_id })
});
// 4. Search
const searchRes = await fetch('https://api.polyvia.ai/api/retrieval/search', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
query: 'What are the main findings?',
limit: 5
})
});
Support
Need help? Reach out to our team: