Quick Start
Constructor
| Parameter | Type | Default | Description |
|---|---|---|---|
base_url | str | https://api.9dlabs.xyz | Server URL |
api_key | str | "" | API key |
workspace_id | str | "" | Default workspace (used for all methods) |
timeout | int | 30 | HTTP timeout in seconds |
Key Differences from v1
| Feature | v1 | v2 |
|---|---|---|
| Ingest | Single artifact | Batch (array) |
| Workspace | Per-method parameter | Set once on client |
| Serving profiles | Not available | low_latency, balanced, high_recall |
| Async indexing | Via env var | Per-request via async_index param |
| Job tracking | Not available | job_status() method |
Methods
ingest()
Batch ingest multiple artifacts. Supports async indexing with job tracking.
context_pack()
Retrieve context with serving profiles for different latency/recall tradeoffs.
job_status()
Track async indexing jobs.
ready()
Readiness check including storage health.
Other Methods
The following methods work the same as v1 but use the workspace set on the client:feedback(action, artifact_id, ...)— Submit correctionlist_receipts(limit, offset)— List receiptsget_receipt(pack_hash)— Get receipt by pack hashartifact_status(artifact_id)— Indexing statusask(query, max_tokens, profile)— LLM-synthesized answerdelete_workspace()— Delete workspacehealth()— Liveness check
Serving Profiles
| Profile | Use Case | Tradeoff |
|---|---|---|
low_latency | Real-time chat, quick lookups | Fastest retrieval, fewer results |
balanced | General-purpose (default) | Good recall with reasonable latency |
high_recall | Research, compliance, audits | Maximum evidence, higher latency |