Reference

API reference

Every public endpoint, generated from the backend's own route table. Base URL: https://13-63-0-55.sslip.io. Authenticate with Authorization: Bearer sk_live_... unless an endpoint says otherwise. Download the spec as openapi.json to generate a client.

API keys

GET /api/v1/api-keys

List API keys operationId list_api_keys

List your organisation's API keys. Secrets are never returned, only their display prefix.

Responses

StatusMeaning
200Successful Response ApiKeyListResponse
422Validation Error HTTPValidationError

POST /api/v1/api-keys

Create an API key operationId create_api_key

Create an API key for your organisation. The secret (sk_live_...) is in this response only; store it safely.

Scopes narrow what the key may do: collection names and/or use_case:<name>. An empty list means everything your organisation may do. With sandbox: true the key is a sandbox key (sk_test_...) that only ever gets synthetic fixtures and is never charged.

Request body application/json

FieldTypeNotes
namestringdefault "api key"
scopesstring[]
sandboxbooleanCreate a sandbox key (sk_test_...) instead of a live one. A sandbox key gets synthetic fixtures, never real data, and is never charged. · default false

Responses

StatusMeaning
201Successful Response ApiKeyCreatedResponse
422Validation Error HTTPValidationError

DELETE /api/v1/api-keys/{key_id}

Revoke an API key operationId revoke_api_key

Revoke an API key. It stops working at once.

Parameters

NameInTypeNotes
key_id requiredpathstring

Responses

StatusMeaning
204Successful Response
422Validation Error HTTPValidationError

GET /api/v1/api-keys/current

Show the key this request uses operationId get_current_api_key

The credential this request was made with: its organisation, and for an API key its id, display prefix, name and scopes. Use it to check which key a script runs with.

Responses

StatusMeaning
200Successful Response ApiKeyCurrentResponse
422Validation Error HTTPValidationError

Usage and wallet

GET /api/v1/usage/ledger

Get money spent and earned per day operationId usage_ledger

Money spent and earned per day, from your organisation's wallet ledger.

Parameters

NameInTypeNotes
daysqueryintegerdefault 30

Responses

StatusMeaning
200Successful Response LedgerSummaryResponse
422Validation Error HTTPValidationError

GET /api/v1/usage/queries

List recent searches operationId usage_queries

Your recent searches, newest first, with hits, tokens and cost.

Parameters

NameInTypeNotes
limitqueryintegerdefault 50
offsetqueryintegerdefault 0

Responses

StatusMeaning
200Successful Response UsageQueriesResponse
422Validation Error HTTPValidationError

GET /api/v1/usage/summary

Get spend and usage for a period operationId usage_summary

Spend and usage for a period, in total, per dataset and per day, with a projection to the end of the month.

Parameters

NameInTypeNotes
from_querystring | null
toquerystring | null

Responses

StatusMeaning
200Successful Response UsageSummaryResponse
422Validation Error HTTPValidationError

GET /api/v1/usage/wallet

Get your wallet balance operationId usage_wallet

Your wallet: spendable credits, earnings and free searches left.

Responses

StatusMeaning
200Successful Response WalletResponse
422Validation Error HTTPValidationError

POST /api/v1/wallet/convert-earnings

Convert earnings into credits operationId convert_earnings

Move earnings into spendable credits. Converted earnings can no longer be paid out.

Request body application/json

FieldTypeNotes
tokens requiredinteger> 0

Responses

StatusMeaning
200Successful Response WalletResponse
422Validation Error HTTPValidationError

Billing

GET /api/v1/billing/profile

Get your billing details operationId get_billing_profile

Your organisation's billing details, and the required fields that are still missing.

Responses

StatusMeaning
200Successful Response object
422Validation Error HTTPValidationError

PUT /api/v1/billing/profile

Set your billing details operationId put_billing_profile

Set your organisation's billing details. An EU VAT number is checked against VIES.

Request body application/json

FieldTypeNotes
company_name requiredstringmin length 1, max length 255
org_numberstring | null
address_line1 requiredstringmin length 1, max length 255
address_line2string | null
postal_code requiredstringmin length 1, max length 32
city requiredstringmin length 1, max length 128
country requiredstringmin length 2, max length 2
vat_idstring | null
invoice_email requiredstringmin length 3, max length 255
nace_sectionstring | null
buyer_segmentstring | null
size_bandstring | null

Responses

StatusMeaning
200Successful Response object
422Validation Error HTTPValidationError

GET /api/v1/billing/transactions

List your transactions operationId list_transactions

Your organisation's transactions, newest first: top-ups (with the Stripe invoice id and the VAT paid), searches, earnings, refunds, adjustments, promotional credit and payouts. Pass next_before back as before for the next page.

Parameters

NameInTypeNotes
limitqueryintegerdefault 100
beforequerystring | null

Responses

StatusMeaning
200Successful Response object
422Validation Error HTTPValidationError

GET /api/v1/ledger-roots

List the published monthly ledger roots operationId list_ledger_roots

Every published monthly ledger root. Each line of a partner statement carries an inclusion proof that folds up to its month's root here, so a partner can check its statement was part of the ledger without seeing anyone else's lines.

Responses

StatusMeaning
200Successful Response object
422Validation Error HTTPValidationError

GET /api/v1/statements

List your partner statements operationId list_my_statements

Your monthly partner statements, your earnings balance and the payout terms (hold period and minimum).

Responses

StatusMeaning
200Successful Response object
422Validation Error HTTPValidationError

GET /api/v1/statements/{statement_id}

Get one partner statement operationId get_my_statement

One monthly partner statement, with a line per dataset.

Parameters

NameInTypeNotes
statement_id requiredpathstring

Responses

StatusMeaning
200Successful Response object
422Validation Error HTTPValidationError

GET /api/v1/statements/{statement_id}/csv

Download one partner statement as CSV operationId get_my_statement_csv

One monthly partner statement as CSV.

Parameters

NameInTypeNotes
statement_id requiredpathstring

Responses

StatusMeaning
200Successful Response
422Validation Error HTTPValidationError

Datasets

GET /api/v1/compliance/gpai-summary

Get an EU AI Act training-content summary operationId gpai_summary

An EU AI Act article 53 summary of the datasets you can see: sources, licence basis, jurisdiction and opt-out posture.

Parameters

NameInTypeNotes
providerquerystringdefault ""
modelquerystringdefault ""

Responses

StatusMeaning
200Successful Response GpaiSummaryResponse
422Validation Error HTTPValidationError

GET /api/v1/datasets

List datasets operationId list_datasets

The datasets you can see, your own and those offered on the marketplace, in dataset_id order, limit at a time (at most 1,000). When there are more, next_cursor is set: pass it back as cursor for the next page.

Parameters

NameInTypeNotes
limitqueryintegerdefault 500
cursorquerystring | null

Responses

StatusMeaning
200Successful Response DatasetListResponse
422Validation Error HTTPValidationError

GET /api/v1/datasets/{dataset_id}/earnings

Get one dataset's earnings operationId dataset_earnings

What one of your datasets has earned, per day and per buyer segment.

Parameters

NameInTypeNotes
dataset_id requiredpathstring
daysqueryintegerdefault 90

Responses

StatusMeaning
200Successful Response DatasetEarningsResponse
422Validation Error HTTPValidationError

POST /api/v1/datasets/{dataset_id}/erase

Delete a dataset operationId erase_dataset

Delete one of your datasets: its indexed passages, stored originals and cached results. reason=owner_removed lets you upload the same data again; reason=erasure_request (the default) blocks it from being ingested again.

Parameters

NameInTypeNotes
dataset_id requiredpathstring
tenantquerystring | null
reasonquerystringdefault "erasure_request"

Responses

StatusMeaning
200Successful Response EraseResponse
422Validation Error HTTPValidationError

POST /api/v1/datasets/{dataset_id}/offer

Publish a dataset to the marketplace operationId offer_dataset

Publish one of your datasets to the marketplace. Every paying organisation can then search it, and you earn on each paid search by another organisation that returns it.

Parameters

NameInTypeNotes
dataset_id requiredpathstring

Responses

StatusMeaning
200Successful Response DatasetRecordResponse
422Validation Error HTTPValidationError

POST /api/v1/datasets/{dataset_id}/withdraw

Take a dataset off the marketplace operationId withdraw_dataset

Take one of your datasets off the marketplace. It stays indexed and searchable by your own organisation.

Parameters

NameInTypeNotes
dataset_id requiredpathstring

Responses

StatusMeaning
200Successful Response DatasetRecordResponse
422Validation Error HTTPValidationError

POST /api/v1/datasets/upload

Upload a file into a dataset operationId upload_dataset

Upload a file, or a .zip of files, into one of your collections. The file is stored and queued, and the answer is 202 Accepted with an item_id: follow it at GET /api/v1/ingest/items/{item_id} until it is done (with how many passages were indexed and how many were held back) or failed (with the reason).

Where it goes: collection_id (from POST /api/v1/collections) puts it in that collection, whose terms stay as they are. Otherwise dataset_id is your own name for a collection: the first upload under a name creates it (with a new col_ id, and the form's licence fields as its terms), later uploads under the same name add to it. Without either, the file's name is used. A routing rule (POST /api/v1/collection-rules) may send it on to another collection. doc_key names the document inside the collection, usually its path in its folder (Avtal/2024/lease.pdf; default: the file name): uploading new bytes under the same doc_key replaces the document's previous version. Bytes your organisation already holds anywhere are not processed again (duplicate: true, the answer of the upload that holds them). An upload stays private unless offered is true.

Request body multipart/form-data

FieldTypeNotes
filestring | null
source_uristringdefault ""
content_sha256stringdefault ""
file_namestringdefault ""
dataset_idstringdefault ""
data_ownerstringdefault ""
licensestringdefault "CC-BY-4.0"
license_basisstringdefault "owner-license"
granted_usesstringdefault "search,rag"
labelsstringdefault ""
jurisdictionstringdefault "global"
offeredbooleandefault false
upload_idstringdefault ""
triggerstringdefault "user"
aclstringdefault ""
lanestringdefault ""
batch_idstringdefault ""
collection_idstringdefault ""
doc_keystringdefault ""
collection_titlestringdefault ""

Responses

StatusMeaning
201Successful Response DatasetUploadResponse
202Accepted: the file is queued for ingest. Follow it at `GET /api/v1/ingest/items/{item_id}`. IngestAcceptedResponse
422Validation Error HTTPValidationError

GET /api/v1/datasets/usage

Get usage and earnings per dataset operationId dataset_usage

Usage and earnings for the datasets your organisation owns.

Parameters

NameInTypeNotes
from_querystring | null
toquerystring | null

Responses

StatusMeaning
200Successful Response DatasetUsageResponse
422Validation Error HTTPValidationError

GET /api/v1/disclosure/display

Get how buyers see you operationId get_display

How buyers see your organisation: your default choice and each of your datasets' choice, with the name or organisation type buyers are shown.

Responses

StatusMeaning
200Successful Response object
422Validation Error HTTPValidationError

PUT /api/v1/disclosure/display

Set how buyers see you operationId put_display

Choose how buyers see you: named or org_type (a verified organisation type, with an optional label of your own), for one dataset or, without dataset_id, as your default. Attribution a licence requires is shown to buyers either way.

Request body application/json

FieldTypeNotes
dataset_idstring | null
mode requiredstring
org_type_labelstring | null
attribution_textstring | null

Responses

StatusMeaning
200Successful Response object
422Validation Error HTTPValidationError

GET /api/v1/ingest/items/{item_id}

Get the state of a queued file operationId get_ingest_item

One queued file: queued, running, done (with the passages indexed and held back), failed (with the reason) or cancelled. Poll every few seconds.

Parameters

NameInTypeNotes
item_id requiredpathstring

Responses

StatusMeaning
200Successful Response IngestItemResponse
422Validation Error HTTPValidationError

GET /api/v1/uploads/{upload_id}

Get the state of an upload operationId upload_status

The state of an upload you started with an upload_id: queued, running, done, failed, cancel_requested, cancelled or unknown.

Parameters

NameInTypeNotes
upload_id requiredpathstring

Responses

StatusMeaning
200Successful Response UploadStatusResponse
422Validation Error HTTPValidationError

POST /api/v1/uploads/{upload_id}/cancel

Cancel an upload operationId cancel_upload

Cancel an upload you started with an upload_id, at any stage. Anything it already indexed is removed.

Parameters

NameInTypeNotes
upload_id requiredpathstring

Responses

StatusMeaning
200Successful Response UploadCancelResponse
422Validation Error HTTPValidationError

Collections

GET /api/v1/collection-rules

List your routing rules operationId list_collection_rules

Your organisation's routing rules, in the order they are tried.

Responses

StatusMeaning
200Successful Response CollectionRuleListResponse
422Validation Error HTTPValidationError

POST /api/v1/collection-rules

Create a routing rule operationId create_collection_rule

Route new uploads: a file whose document key matches path_glob (and whose type is in mime, if given) goes to target_collection_id instead of where its upload named, and takes that collection's terms. Rules are tried lowest priority first; the first that matches wins. Files already uploaded do not move.

Request body application/json

FieldTypeNotes
target_collection_id requiredstring
path_globstring | nullfnmatch pattern over the document key, e.g. Avtal/* (* also crosses folders).
mimestring[]Only these types; empty = any.
priorityintegerLowest first. · default 100, min 0, max 100000
source_collection_idstring | nullOnly uploads headed for this collection; none = every upload.

Responses

StatusMeaning
201Successful Response CollectionRuleResponse
422Validation Error HTTPValidationError

DELETE /api/v1/collection-rules/{rule_id}

Delete a routing rule operationId delete_collection_rule

Delete a routing rule. Files it already routed stay where they are.

Parameters

NameInTypeNotes
rule_id requiredpathstring

Responses

StatusMeaning
200Successful Response CollectionRuleDeleteResponse
422Validation Error HTTPValidationError

GET /api/v1/collections

List your collections operationId list_data_collections

Your organisation's collections, limit at a time (at most 200). When there are more, pass next_cursor back as cursor.

Parameters

NameInTypeNotes
limitqueryintegerdefault 50
cursorquerystring | null

Responses

StatusMeaning
200Successful Response CollectionListResponse
422Validation Error HTTPValidationError

POST /api/v1/collections

Create a collection operationId create_collection

Make a new, empty collection with its terms. Upload into it with POST /api/v1/datasets/upload and collection_id. It stays private until you publish it (POST /api/v1/datasets/{collection_id}/offer).

Request body application/json

FieldTypeNotes
title requiredstringmin length 1, max length 255
slugstring | nullYour own handle for it, unique in your organisation (lowercase letters, digits, - and _). Uploads that name it as dataset_id go here. Default: from the title.
data_ownerstringdefault "", max length 255
license_basisstringdefault "owner-license", max length 64
granted_usesstring[]
jurisdictionstringdefault "global", max length 32
labelsstring[]

Responses

StatusMeaning
201Successful Response CollectionResponse
422Validation Error HTTPValidationError

GET /api/v1/collections/{collection_id}

Get one collection operationId get_collection

One of your collections: its title, slug, size and terms.

Parameters

NameInTypeNotes
collection_id requiredpathstring

Responses

StatusMeaning
200Successful Response CollectionResponse
422Validation Error HTTPValidationError

PATCH /api/v1/collections/{collection_id}

Rename a collection operationId update_collection

Rename a collection: its title, or its slug (409 if you already use it). Its id never changes.

Parameters

NameInTypeNotes
collection_id requiredpathstring

Request body application/json

FieldTypeNotes
titlestring | null
slugstring | null

Responses

StatusMeaning
200Successful Response CollectionResponse
422Validation Error HTTPValidationError

GET /api/v1/collections/{collection_id}/documents

List a collection's documents operationId list_collection_documents

A collection's documents in key order, limit at a time (at most 500). folder (a path such as /Avtal/2024) lists only the documents directly in it.

Parameters

NameInTypeNotes
collection_id requiredpathstring
folderquerystring | null
limitqueryintegerdefault 100
cursorquerystring | null

Responses

StatusMeaning
200Successful Response CollectionDocumentListResponse
422Validation Error HTTPValidationError

GET /api/v1/collections/{collection_id}/documents/{doc_id}

Get one document and its versions operationId get_collection_document

One document: its state, every version it has had, and other places the same bytes were uploaded to.

Parameters

NameInTypeNotes
collection_id requiredpathstring
doc_id requiredpathstring

Responses

StatusMeaning
200Successful Response CollectionDocumentResponse
422Validation Error HTTPValidationError

DELETE /api/v1/collections/{collection_id}/documents/{doc_id}

Remove one document operationId delete_collection_document

Remove one document from a collection: every version's passages, its stored original and anything cached that quotes it. The collection, its terms and its other documents stay. An automatic sync does not bring the document back; uploading it again yourself does.

Parameters

NameInTypeNotes
collection_id requiredpathstring
doc_id requiredpathstring
reasonquerystringdefault "owner_removed"

Responses

StatusMeaning
200Successful Response DocumentDeleteResponse
422Validation Error HTTPValidationError

GET /api/v1/collections/{collection_id}/folders

List a collection's folders operationId list_collection_folders

A collection's folders in path order (at most 1,000 a page). parent (a path, / for the top) lists only its direct sub-folders.

Parameters

NameInTypeNotes
collection_id requiredpathstring
parentquerystring | null
limitqueryintegerdefault 200
cursorquerystring | null

Responses

StatusMeaning
200Successful Response CollectionFolderListResponse
422Validation Error HTTPValidationError

Trust

GET /api/v1/vocabularies

List the vocabularies and their licences No authentication operationId list_vocabularies

The vocabularies and ontologies TRIVDA loads, links against or has excluded, with their version, licence, what may be redistributed and the attribution results show with their concept ids. No authentication needed.

Responses

StatusMeaning
200Successful Response VocabulariesResponse

Schemas

ApiKeyCreateRequest

FieldTypeNotes
namestringdefault "api key"
scopesstring[]
sandboxbooleanCreate a sandbox key (sk_test_...) instead of a live one. A sandbox key gets synthetic fixtures, never real data, and is never charged. · default false

ApiKeyCreatedResponse

FieldTypeNotes
id requiredstring
prefix requiredstring
name requiredstring
scopesstring[]
sandboxbooleandefault false
api_key requiredstring

ApiKeyCurrentResponse

GET /api-keys/current: the credential this request was made with.

FieldTypeNotes
org_id requiredstring
auth_kind requiredstringapi_key, or oauth for an access token.
sandboxbooleanTrue for a sandbox key: every response is a synthetic fixture. · default false
key_idstring | null
prefixstring | null
namestring | null
scopesstring[]

ApiKeyInfo

FieldTypeNotes
id requiredstring
prefix requiredstring
name requiredstring
scopesstring[]
sandboxbooleandefault false
created_atstring | null
last_used_atstring | null
revoked_atstring | null

ApiKeyListResponse

FieldTypeNotes
keysApiKeyInfo[]

BillingProfileRequest

FieldTypeNotes
company_name requiredstringmin length 1, max length 255
org_numberstring | null
address_line1 requiredstringmin length 1, max length 255
address_line2string | null
postal_code requiredstringmin length 1, max length 32
city requiredstringmin length 1, max length 128
country requiredstringmin length 2, max length 2
vat_idstring | null
invoice_email requiredstringmin length 3, max length 255
nace_sectionstring | null
buyer_segmentstring | null
size_bandstring | null

Body_upload_dataset

FieldTypeNotes
filestring | null
source_uristringdefault ""
content_sha256stringdefault ""
file_namestringdefault ""
dataset_idstringdefault ""
data_ownerstringdefault ""
licensestringdefault "CC-BY-4.0"
license_basisstringdefault "owner-license"
granted_usesstringdefault "search,rag"
labelsstringdefault ""
jurisdictionstringdefault "global"
offeredbooleandefault false
upload_idstringdefault ""
triggerstringdefault "user"
aclstringdefault ""
lanestringdefault ""
batch_idstringdefault ""
collection_idstringdefault ""
doc_keystringdefault ""
collection_titlestringdefault ""

CollectionCreateRequest

A new, empty collection and its terms (its rights record). It stays private until you publish it with POST /api/v1/datasets/{collection_id}/offer.

FieldTypeNotes
title requiredstringmin length 1, max length 255
slugstring | nullYour own handle for it, unique in your organisation (lowercase letters, digits, - and _). Uploads that name it as dataset_id go here. Default: from the title.
data_ownerstringdefault "", max length 255
license_basisstringdefault "owner-license", max length 64
granted_usesstring[]
jurisdictionstringdefault "global", max length 32
labelsstring[]

CollectionDocumentListResponse

FieldTypeNotes
documentsCollectionDocumentResponse[]
next_cursorstring | null

CollectionDocumentResponse

A document: one file, archive member or export thread, with its versions.

FieldTypeNotes
doc_id requiredstring
collection_id requiredstring
doc_key requiredstring
folder requiredstring
title requiredstring
mimestring | null
bytesintegerdefault 0
current_version requiredstring
state requiredstring
chunks_indexedintegerdefault 0
chunks_quarantinedintegerdefault 0
created_atstring | null
updated_atstring | null
versionsDocumentVersionEntry[] | null
also_atobject[] | null

CollectionFolderListResponse

FieldTypeNotes
foldersCollectionFolderResponse[]
next_cursorstring | null

CollectionFolderResponse

FieldTypeNotes
folder_id requiredstring
path requiredstring
name requiredstring
depthintegerdefault 0
document_countintegerdefault 0

CollectionInfo

FieldTypeNotes
collection requiredstring
pointsinteger | null

CollectionListResponse

FieldTypeNotes
collectionsCollectionResponse[]
next_cursorstring | null

CollectionResponse

One of your collections. collection_id is also the dataset_id of its rights record: offer, withdraw, erase, earnings and search scope (listing:<id>) take it.

FieldTypeNotes
collection_id requiredstring
dataset_id requiredstring
slug requiredstring
title requiredstring
kindstringdefault "documents"
sensitivitystringdefault "standard"
originstringdefault "upload"
document_countintegerdefault 0
bytes_totalintegerdefault 0
documents_listedbooleandefault true
offeredbooleandefault false
license_basisstring | null
granted_usesstring[]
jurisdictionstring | null
created_atstring | null
updated_atstring | null

CollectionRuleDeleteResponse

FieldTypeNotes
rule_id requiredstring
deletedbooleandefault true

CollectionRuleListResponse

FieldTypeNotes
rulesCollectionRuleResponse[]

CollectionRuleRequest

Send new uploads whose document key matches to a collection.

FieldTypeNotes
target_collection_id requiredstring
path_globstring | nullfnmatch pattern over the document key, e.g. Avtal/* (* also crosses folders).
mimestring[]Only these types; empty = any.
priorityintegerLowest first. · default 100, min 0, max 100000
source_collection_idstring | nullOnly uploads headed for this collection; none = every upload.

CollectionRuleResponse

FieldTypeNotes
rule_id requiredstring
target_collection_id requiredstring
source_collection_idstring | null
priorityintegerdefault 100
path_globstring | null
mimestring[]
created_atstring | null

CollectionUpdateRequest

FieldTypeNotes
titlestring | null
slugstring | null

CollectionsResponse

FieldTypeNotes
embedder requiredstring
backend requiredstring
location requiredstring
collectionsCollectionInfo[]

ConvertEarningsRequest

Move tokens from the caller's OWN earnings bucket into its OWN credits bucket — the explicit, user-initiated action that funds queries out of what an org was paid. There is deliberately no org field: the target org is always `principal.tenant_id`, never caller-supplied, so this can never touch another org's balance.

FieldTypeNotes
tokens requiredinteger> 0

DatasetEarningsPoint

One day of earnings on one dataset.

FieldTypeNotes
date requiredstring
tokensintegerdefault 0
gross_tokensintegerdefault 0
fee_tokensintegerdefault 0

DatasetEarningsResponse

FieldTypeNotes
dataset_id requiredstring
from_tsstring | null
to_tsstring | null
total_tokensintegerdefault 0
gross_tokensintegerdefault 0
fee_tokensintegerdefault 0
seriesDatasetEarningsPoint[]
segmentsDatasetEarningsSegment[]
min_buyers_per_segmentintegerdefault 3

DatasetEarningsSegment

One buyer segment's contribution to a dataset's earnings (FD6, D80). Never a buyer organisation: `segment is a cell with at least k buyers, or other`.

FieldTypeNotes
segment requiredstring
label requiredstring
queriesintegerdefault 0
tokensintegerdefault 0

DatasetListResponse

FieldTypeNotes
datasetsDatasetRecordResponse[]
next_cursorstring | null

DatasetRecordResponse

FieldTypeNotes
dataset_id requiredstring
data_ownerstringdefault ""
warranties_okbooleandefault false
database_rightbooleandefault false
jurisdictionstringdefault "global"
provider_agreement_refstring | null
granted_usesstring[]
license_basisstring | null
controller_rolestring | null
legal_basisstring | null
transfer_restrictionstring | null
labelsstring[]
owner_tenantstring | null
offeredbooleandefault false
entitledbooleandefault false
revokedbooleandefault false
display_identityobject | null
indexed_pointsinteger | null
collection_idstring | null
titlestring | null
slugstring | null
document_countinteger | null

DatasetUploadResponse

Result of a self-service upload: the registered dataset + what the pipeline ingest actually did (gate-passing chunks indexed, the rest quarantined).

FieldTypeNotes
dataset_id requiredstring
document_idstring | null
indexedintegerdefault 0
quarantinedintegerdefault 0
documentsobject[]
displacedobject[]
tiersobject
collectionstring | null
labelsstring[]
granted_usesstring[]
license_basisstring | null
offeredbooleandefault false
item_idstring | null
batch_idstring | null
duplicatebooleandefault false
collection_idstring | null
doc_idstring | null
doc_keystring | null

DatasetUsage

FieldTypeNotes
hitsintegerdefault 0
tokensintegerdefault 0
cost_eurnumberdefault 0

DatasetUsageEntry

Per-dataset usage & earnings attribution over the requested window. `earned_eur` splits each query's billed cost proportionally across the datasets its hits touched — the revenue-share substrate the per-hit rows exist for.

`queries/hits/tokens_attributed/by_use_case/last_used_at cover ALL usage, including the owner querying its own dataset ("internal only" is a paid mode — self-use bills, and must be visible). earned_eur is computed from third-party rows only, so self-use never inflates it (the wallet never pays an org for querying itself — see metering._credit_earnings). self_queries/self_hits` isolate how much of the total was the owner's own traffic, so the UI can label an all-self-use row honestly instead of rendering it as unused.

FieldTypeNotes
dataset_id requiredstring
labelsstring[]
data_ownerstringdefault ""
queriesintegerdefault 0
hitsintegerdefault 0
tokens_attributedintegerdefault 0
earned_eurnumberdefault 0
by_use_caseobject
last_used_atstring | null
self_queriesintegerdefault 0
self_hitsintegerdefault 0

DatasetUsageResponse

FieldTypeNotes
from_tsstring | null
to_tsstring | null
datasetsDatasetUsageEntry[]
total_earned_eurnumberdefault 0

DayUsage

FieldTypeNotes
day requiredstring
tokensintegerdefault 0
spend_eurnumberdefault 0
queriesintegerdefault 0

DisplayRequest

FieldTypeNotes
dataset_idstring | null
mode requiredstring
org_type_labelstring | null
attribution_textstring | null

DocumentDeleteResponse

FieldTypeNotes
doc_id requiredstring
collection_id requiredstring
reason requiredstring
points_deletedintegerdefault 0
originals_deletedintegerdefault 0
versionsintegerdefault 0

DocumentVersionEntry

FieldTypeNotes
sha256 requiredstring
bytesintegerdefault 0
observed_atstring | null
superseded_atstring | null
currentbooleandefault false

EraseResponse

FieldTypeNotes
dataset_idstring | null
tenantstring | null
reasonstringdefault "erasure_request"
points_deletedintegerdefault 0
revokedbooleandefault false
record_deletedbooleandefault false
suppressedbooleandefault false
originals_deletedintegerdefault 0
cache_purgedbooleandefault false
graph_rows_deletedintegerdefault 0
relations_deletedintegerdefault 0

GpaiSummaryResponse

FieldTypeNotes
general_informationobject
data_sourcesobject[]
processingobject

HTTPValidationError

FieldTypeNotes
detailValidationError[]

IngestAcceptedResponse

202 Accepted from POST /datasets/upload: the file is stored and queued. Follow GET /api/v1/ingest/items/{item_id} until state is done, failed or cancelled.

FieldTypeNotes
item_id requiredstring
batch_idstring | null
upload_idstring | null
dataset_id requiredstring
state requiredstring
duplicatebooleandefault false
sha256string | null
lanestringdefault "interactive"
offeredbooleandefault false
collection_idstring | null
doc_keystring | null

IngestItemResponse

One file in the ingest queue, and where it stands.

FieldTypeNotes
item_id requiredstring
batch_idstring | null
upload_idstring | null
dataset_id requiredstring
file_namestring | null
bytesintegerdefault 0
sha256string | null
state requiredstring
lanestringdefault "interactive"
attemptsintegerdefault 0
max_attemptsintegerdefault 0
error_classstring | null
errorstring | null
indexedinteger | null
quarantinedinteger | null
document_idstring | null
collection_idstring | null
doc_idstring | null
doc_keystring | null
duplicate_ofstring | null
offer_refusedstring | null
created_atstring | null
started_atstring | null
finished_atstring | null

LedgerDayPoint

One day of money moving, from the org's own ledger.

FieldTypeNotes
date requiredstring
spent_eurnumberdefault 0
earned_eurnumberdefault 0
spent_queriesintegerdefault 0
earned_queriesintegerdefault 0

LedgerSummaryResponse

Both sides of the marketplace for one org, over one period.

Spend and earnings are read from the SAME table (`wallet_ledger`) rather than one from the ledger and one recomputed from usage records. Two sources for two halves of a subtraction is how a "net" figure ends up not being the difference between the two numbers printed beside it.

Euro, not tokens: a query the org paid for and a query someone else ran against its data are not comparable as counts, and the whole point of putting them on one chart is that they ARE comparable as money. Converted here with the serving layer's own `per_1k_tokens_eur` — the frontend never sees that rate and must not guess it.

FieldTypeNotes
from_tsstring | null
to_tsstring | null
owns_datasetsbooleandefault false
total_spent_eurnumberdefault 0
total_earned_eurnumberdefault 0
net_eurnumberdefault 0
total_spent_queriesintegerdefault 0
total_earned_queriesintegerdefault 0
seriesLedgerDayPoint[]

ListingCard

One listing a scope covers. Until collections exist a listing is a dataset.

FieldTypeNotes
listing_id requiredstring
title requiredstring
origin requiredstringown or marketplace.
source requiredstringWho the data is from, as the partner chose to be shown; Your organisation for your own.
verifiedboolean | null
licence requiredstring
usesstring[]
jurisdictionstring | null
labelsstring[]
offeredbooleandefault false
passagesinteger | nullIndexed passages.
scope requiredstringThe scope value that searches only this listing.

ListingGroup

Marketplace passages of one listing (E12): which ranks came from it.

FieldTypeNotes
listing_id requiredstring
sourcestring | null
hitsintegerdefault 0
ranksinteger[]

ListingsResponse

FieldTypeNotes
scope requiredstring
listingsListingCard[]

PricingResponse

GET /api/v1/pricing — the one price, for the dashboard and the public.

FieldTypeNotes
currency requiredstring
per_1k_tokens_eur requirednumber
own_data_per_1k_tokens_eur requirednumber
own_data_price_decided requiredboolean
per_source_eur requirednumber
credits_per_eur requiredinteger
platform_fee_bps requiredinteger
partner_share_bps requiredinteger
token_unit requiredstring
estimate_tokens_per_hit requiredinteger
free_queries_per_org requiredinteger

QuotaResponse

FieldTypeNotes
rpm_limit requiredinteger
rpm_remaining requiredinteger
daily_quota requiredinteger
daily_remaining requiredinteger
monthly_quota requiredinteger
monthly_remaining requiredinteger
free_queries_remaining requiredinteger
wallet_balance_tokens requiredinteger

RecentQuery

One row of the dashboard's recent-queries table (mirrors the Trivda shape).

FieldTypeNotes
time requiredstring
query_idstring | null
collectionstring | null
use_casestringdefault "rag"
hitsintegerdefault 0
tokensintegerdefault 0
cost_eurnumberdefault 0
statusstringdefault "ok"

SearchHit

FieldTypeNotes
rank requiredinteger
score requirednumber
text requiredstring
readiness_tierstring | null
source_uristring | null
concept_idsstring[]
licenseobject
content_classstring | null
pii_tierstring | null
citationobject | null
provenance_idstring | null
display_identityobject | null
attributionstring | null
originstring | null
listing_idstring | null
relationsstring[] | nullIds of the relations in this response's relations that concern this passage. Present only for an organisation with the context graph.

SearchQueryRequest

FieldTypeNotes
query requiredstringWhat to search for, in plain language. · min length 1, max length 4000
top_kintegerHow many passages to return at most. · default 8, min 1, max 50
domainstring | nullOptional subject domain (for example legal, finance, medical). It steers query expansion and, where one is configured, the domain's own index.
content_typestringWhich kind of content to search: general (default) or a specialised family such as code; picks the index the query runs against. · default "general"
use_casestringWhat you will do with the passages: search, rag, finetune, train, export or redistribute. Only passages whose licence allows it are returned, and the use is recorded with each search. · default "rag"
collectionstring | nullOptional index name. A scoped key may only name an index in its scopes.
min_tierstring | nullReserved; not applied yet.
scopestring | nullWhere to search: mine (your organisation's own data only), marketplace (other organisations' published data only), all (both) or listing:<id> (one listing; see GET /api/v1/search/listings). Left out, your key's or organisation's default applies (GET /api/v1/search/scope); for an existing key that is all.

SearchQueryResponse

FieldTypeNotes
resultsSearchHit[]
scopestring | nullThe scope this search ran in (mine, marketplace, all, listing:<id>).
listingsListingGroup[]The marketplace passages grouped by listing, best rank first. Your own passages are not grouped.
query_expansionobject
usedobject
relationsobject[] | nullThe relations between the data points of the passages (D217), for an organisation with the context graph; absent otherwise. Each has an id (listed on the passages it concerns), subject, predicate and object (node keys) or value, the labels subject_label / object_label as its sources write them, qualifiers, a confidence, a one-line text, the ranks of the passages it concerns (hits) and of those that state it (stated_in), and the sources its evidence is in. A relation is evidence that a source states it, not a TRIVDA assertion. Only relations whose evidence you may see are listed.
vocabulariesobject[]The vocabularies whose concept ids appear in this response (in concept_ids or the query expansion): name, version, licence and, where the licence asks for it, the attribution text to show with them.
query_idstring | null
latency_msintegerdefault 0
billingobject | nullWhat this call cost: tokens (billable), cost_eur (charged), list_cost_eur (the price of what was returned), credits_charged, free_query_used, balance_credits (after the charge) and replayed (an Idempotency-Key replay, never charged).

SearchScopeResponse

Your organisation's search scope settings (E12).

FieldTypeNotes
intentstring | nullWhat your organisation uses TRIVDA for: knowledge_bank, marketplace or null.
default_scope requiredstringThe scope a search runs in when it names none, for this credential.
default_source requiredstringWhy: key (the API key's default_scope:), intent or default.
scopesstring[]
graph_evidencebooleanWhether POST /api/v1/context/gather can build an evidence bundle for you. · default false

SearchScopeUpdate

FieldTypeNotes
intentstring | nullknowledge_bank (searches default to your own data), marketplace, or null for the platform default (all).

UploadCancelResponse

FieldTypeNotes
upload_id requiredstring
outcome requiredstring
dataset_idstring | null
points_deletedintegerdefault 0
originals_deletedintegerdefault 0

UploadStatusResponse

Where one upload stands, for a client whose request timed out while the pipeline kept running (the dashboard's upload worker; server/uploads.py).

FieldTypeNotes
upload_id requiredstring
state requiredstring
dataset_idstring | null
indexedinteger | null
quarantinedinteger | null
errorstring | null
item_idstring | null
batch_idstring | null
attemptsinteger | null

UsageQueriesResponse

FieldTypeNotes
queriesRecentQuery[]
limitintegerdefault 50
offsetintegerdefault 0

UsageSummaryResponse

Dashboard header: spend so far this window, a linear end-of-month projection, and the breakdowns the Trivda usage view charts (per dataset, per day).

FieldTypeNotes
consumed_eurnumberdefault 0
projected_eom_eurnumberdefault 0
total_hitsintegerdefault 0
total_tokensintegerdefault 0
by_datasetobject
by_dayDayUsage[]

ValidationError

FieldTypeNotes
loc requiredstring | integer[]
msg requiredstring
type requiredstring
inputany
ctxobject

VocabulariesResponse

FieldTypeNotes
vocabulariesVocabularyInfo[]

VocabularyInfo

FieldTypeNotes
vocab_id requiredstring
name requiredstring
publisher requiredstring
version requiredstring
licence requiredstringSPDX id, or LicenseRef- for a custom licence
licence_url requiredstring
source_url requiredstring
status requiredstringactive: loaded and linked. review: waiting for legal review, not loaded. excluded: never loaded into anything that serves results
redistribute_ids requiredboolean
redistribute_labels requiredboolean
redistribute_definitions requiredboolean
crosswalk_allowed requiredboolean
attribution_required requiredboolean
attributionstring | null
retrieved_atstring | nullWhen the loaded data was retrieved
terms_checked_at requiredstringWhen the licence terms were last read
notesstringdefault ""

WalletResponse

FieldTypeNotes
balance_tokensintegerdefault 0
free_queries_remainingintegerdefault 0
credits_tokensintegerdefault 0
earnings_tokensintegerdefault 0
withdrawable_tokensintegerdefault 0