TypeScript API reference
Package @xberg-io/sdk. Every method below is on the client.
Extraction
Section titled “Extraction”Submit documents and wait for results.
| Method | Description |
|---|---|
extract |
Submit a single document for extraction. Returns the initial {@link Job} |
extractBatch |
Submit multiple documents in a single multipart request. Returns one |
extractAndWait |
Poll, read, page through and cancel extraction jobs.
| Method | Description |
|---|---|
listJobs |
|
getJob |
|
getJobResult |
Fetch a job’s stored result document (GET /v1/jobs/{id}/result). |
getJobPage |
Enterprise only: download one rendered page of an extraction job |
cancelJob |
Cancel a job (DELETE /v1/jobs/{id}). Idempotent: both a successful |
waitForJob |
Poll {@link getJob} until the job reaches a terminal status. Throws |
waitForJobs |
|
audit |
Enterprise-only crawl job event stream.
| Method | Description |
|---|---|
streamCrawlEvents |
Enterprise only: stream a crawl job’s events |
Presets
Section titled “Presets”The curated preset registry, served by both tiers.
| Method | Description |
|---|---|
presets |
|
getPreset |
|
getPresetSample |
Download a preset’s bundled sample file |
Saved presets
Section titled “Saved presets”Project-scoped presets you create and update.
| Method | Description |
|---|---|
listSavedPresets |
|
createSavedPreset |
|
getSavedPreset |
|
updateSavedPreset |
|
deleteSavedPreset |
Collections, documents and retrieval.
| Method | Description |
|---|---|
listRagCollections |
|
createRagCollection |
|
getRagCollection |
|
deleteRagCollection |
|
addRagDocuments |
|
deleteRagDocuments |
Delete documents from a RAG collection, by ID list or metadata filter |
reindexRagDocument |
|
ragRetrieve |
|
migrateRagEmbeddings |
|
getRagMigrationJob |
|
getRagJob |
|
getRagConfig |
|
setRagConfig |
Auto-tune
Section titled “Auto-tune”Tuning jobs and their results.
| Method | Description |
|---|---|
submitAutoTune |
Submit an auto-tune job (POST /v1/auto-tune). Sent as multipart/form-data: |
listAutoTuneJobs |
|
getAutoTuneStatus |
|
getAutoTuneResult |
|
getAutoTuneCapabilities |
|
promoteAutoTuneProfile |
|
deleteAutoTuneJob |
Tuning profiles
Section titled “Tuning profiles”Profiles promoted from auto-tune runs.
| Method | Description |
|---|---|
listTuningProfiles |
|
getTuningProfile |
|
deleteTuningProfile |
Documents and lineage
Section titled “Documents and lineage”Enterprise-only document history.
| Method | Description |
|---|---|
getDocument |
Enterprise only: fetch a document’s latest version with its extraction |
versions |
|
diff |
Enterprise only: diff document versions (GET /v1/documents/{id}/diff). |
getDiffJob |
Enterprise only: poll a diff job (GET /v1/documents/{id}/diff/{diffJobId}). |
Enrich
Section titled “Enrich”Enterprise-only text enrichment.
| Method | Description |
|---|---|
submitEnrich |
|
getEnrichStatus |
Uploads and usage
Section titled “Uploads and usage”Enterprise-only upload staging and metering.
| Method | Description |
|---|---|
presignUpload |
|
confirmUpload |
|
usage |
|
listExtractionEvents |
Control plane
Section titled “Control plane”Pro-only projects, keys and integrations.
| Method | Description |
|---|---|
listProjects |
|
createProject |
|
listApiKeys |
|
createApiKey |
|
revokeApiKey |
|
listIntegrations |
|
createIntegration |
|
getIntegration |
|
deleteIntegration |
|
connectIntegration |
Pro only: begin the OAuth flow for an integration |
disconnectIntegration |
|
listIntegrationDocuments |
|
fetchIntegrationDocument |
Pro only: download one document from an integration |
Pro-only session and configuration reads.
| Method | Description |
|---|---|
authConfig |
|
login |