Create & Upload
Upload documents to a knowledge base, embed them on GPU nodes, and make them searchable with pgvector.
Create a knowledge base
curl -X POST https://api.ryvion.ai/api/v1/knowledge-bases \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"my-docs","jurisdiction":"CA"}'
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name for your knowledge base |
jurisdiction | string | No | Jurisdiction for data storage (e.g., CA, DE) |
Response
{
"id": "kb_abc123",
"name": "my-docs",
"jurisdiction": "CA",
"created_at": "2026-04-08T12:00:00Z"
}
Upload a document
Upload files to your knowledge base. They are automatically chunked, embedded, and stored in pgvector.
curl -X POST https://api.ryvion.ai/api/v1/knowledge-bases/KB_ID/documents \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf"
The upload endpoint accepts multipart form data. The document is processed asynchronously -- chunks are created, embeddings are generated on GPU nodes, and vectors are stored for search.
List knowledge bases
curl https://api.ryvion.ai/api/v1/knowledge-bases \
-H "Authorization: Bearer YOUR_API_KEY"
Returns all knowledge bases owned by your account.
Knowledge graph
Query the auto-generated knowledge graph for a knowledge base:
curl https://api.ryvion.ai/api/v1/knowledge-bases/KB_ID/graph \
-H "Authorization: Bearer YOUR_API_KEY"
How it works
- Upload -- you send a document (PDF, text, etc.) to the knowledge base
- Chunking -- the document is split into semantically meaningful chunks
- Embedding -- each chunk is embedded using a model on a GPU node in the network
- Storage -- embeddings are stored in pgvector, pinned to the jurisdiction you specified
- Search -- query your documents with Semantic Search or attach them to RAG-powered chat
Jurisdiction pinning
When you create a knowledge base with a jurisdiction parameter, all document embeddings and storage are pinned to nodes in that jurisdiction. This is enforced at the network level, not by policy.
See Sovereign Routing for details on available jurisdictions.
Pricing
- Embedding: $0.06 CAD / 1M tokens
- Search: $0.01 CAD / query