Search
GET /api/v1/pricing
Get the price list No authentication operationId get_pricing
The current price list. No authentication needed.
Searches are priced per 1,000 billable tokens in the passages returned; the wallet holds credits (credits_per_eur credits = EUR 1).
Responses
GET /api/v1/search/collections
List the indexes you can search operationId list_collections
The search indexes your key can query, with their passage counts.
Responses
GET /api/v1/search/listings
List the listings a scope covers operationId list_search_listings
The listings a scope covers, so you can choose one before you search (scope=listing:<id>). Free.
Parameters
| Name | In | Type | Notes |
|---|
scope | query | string | null | |
q | query | string | null | |
limit | query | integer | default 20 |
Responses
POST /api/v1/search/query
Search licensed data operationId search
Search licensed data and get ranked passages, each with its licence and provenance.
Charged per 1,000 billable tokens in the passages returned. A search with no results costs nothing. The cost is in the billing object and in the X-Query-Cost, X-Tokens-Used and X-Credits-Remaining headers.
Parameters
| Name | In | Type | Notes |
|---|
Idempotency-Key | header | string | null | Optional, up to 255 characters. A retry with the same key and body within 24 hours returns the first response and is not charged again. |
Request body application/json
| Field | Type | Notes |
|---|
query required | string | What to search for, in plain language. · min length 1, max length 4000 |
top_k | integer | How many passages to return at most. · default 8, min 1, max 50 |
domain | string | null | Optional subject domain (for example legal, finance, medical). It steers query expansion and, where one is configured, the domain's own index. |
content_type | string | Which kind of content to search: general (default) or a specialised family such as code; picks the index the query runs against. · default "general" |
use_case | string | What 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" |
collection | string | null | Optional index name. A scoped key may only name an index in its scopes. |
min_tier | string | null | Reserved; not applied yet. |
scope | string | null | Where 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. |
Responses
| Status | Meaning |
|---|
200 | Ranked passages, with what the search cost. SearchQueryResponse |
400 | The Idempotency-Key is longer than 255 characters. |
401 | Missing, invalid or revoked credential. |
402 | The wallet cannot cover the estimated cost and no free searches are left. Top up and retry. |
403 | The key is not scoped for this index or use case, or the organisation is suspended. |
409 | A request with this Idempotency-Key is still running. |
422 | Invalid body, or an Idempotency-Key reused with a different body. |
429 | Rate limit exceeded. Retry after the `Retry-After` seconds. |
GET /api/v1/search/quota
Get your rate limits and quota operationId search_quota
Your rate limits and what is left of them now (per minute, per day, per month), plus free searches and wallet credits.
Responses
GET /api/v1/search/results/{query_id}
Fetch an earlier search's results again operationId get_search_results
Fetch the results of an earlier search again, free, for 7 days.
Parameters
| Name | In | Type | Notes |
|---|
query_id required | path | string | |
Responses
GET /api/v1/search/scope
Get your default search scope operationId get_search_scope
Where your searches look when they name no scope, and why.
Responses
PUT /api/v1/search/scope
Set what your organisation uses TRIVDA for operationId put_search_scope
Say what your organisation uses TRIVDA for. knowledge_bank makes searches that name no scope search only your own data; a key minted with a default_scope: scope keeps its own default.
Request body application/json
| Field | Type | Notes |
|---|
intent | string | null | knowledge_bank (searches default to your own data), marketplace, or null for the platform default (all). |
Responses
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
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
| Field | Type | Notes |
|---|
name | string | default "api key" |
scopes | string[] | |
sandbox | boolean | Create 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
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
| Name | In | Type | Notes |
|---|
key_id required | path | string | |
Responses
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
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
| Name | In | Type | Notes |
|---|
days | query | integer | default 30 |
Responses
GET /api/v1/usage/queries
List recent searches operationId usage_queries
Your recent searches, newest first, with hits, tokens and cost.
Parameters
| Name | In | Type | Notes |
|---|
limit | query | integer | default 50 |
offset | query | integer | default 0 |
Responses
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
| Name | In | Type | Notes |
|---|
from_ | query | string | null | |
to | query | string | null | |
Responses
GET /api/v1/usage/wallet
Get your wallet balance operationId usage_wallet
Your wallet: spendable credits, earnings and free searches left.
Responses
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
| Field | Type | Notes |
|---|
tokens required | integer | > 0 |
Responses
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
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
| Field | Type | Notes |
|---|
company_name required | string | min length 1, max length 255 |
org_number | string | null | |
address_line1 required | string | min length 1, max length 255 |
address_line2 | string | null | |
postal_code required | string | min length 1, max length 32 |
city required | string | min length 1, max length 128 |
country required | string | min length 2, max length 2 |
vat_id | string | null | |
invoice_email required | string | min length 3, max length 255 |
nace_section | string | null | |
buyer_segment | string | null | |
size_band | string | null | |
Responses
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
| Name | In | Type | Notes |
|---|
limit | query | integer | default 100 |
before | query | string | null | |
Responses
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
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
GET /api/v1/statements/{statement_id}
Get one partner statement operationId get_my_statement
One monthly partner statement, with a line per dataset.
Parameters
| Name | In | Type | Notes |
|---|
statement_id required | path | string | |
Responses
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
| Name | In | Type | Notes |
|---|
statement_id required | path | string | |
Responses
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
| Name | In | Type | Notes |
|---|
provider | query | string | default "" |
model | query | string | default "" |
Responses
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
| Name | In | Type | Notes |
|---|
limit | query | integer | default 500 |
cursor | query | string | null | |
Responses
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
| Name | In | Type | Notes |
|---|
dataset_id required | path | string | |
days | query | integer | default 90 |
Responses
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
| Name | In | Type | Notes |
|---|
dataset_id required | path | string | |
tenant | query | string | null | |
reason | query | string | default "erasure_request" |
Responses
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
| Name | In | Type | Notes |
|---|
dataset_id required | path | string | |
Responses
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
| Name | In | Type | Notes |
|---|
dataset_id required | path | string | |
Responses
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
| Field | Type | Notes |
|---|
file | string | null | |
source_uri | string | default "" |
content_sha256 | string | default "" |
file_name | string | default "" |
dataset_id | string | default "" |
data_owner | string | default "" |
license | string | default "CC-BY-4.0" |
license_basis | string | default "owner-license" |
granted_uses | string | default "search,rag" |
labels | string | default "" |
jurisdiction | string | default "global" |
offered | boolean | default false |
upload_id | string | default "" |
trigger | string | default "user" |
acl | string | default "" |
lane | string | default "" |
batch_id | string | default "" |
collection_id | string | default "" |
doc_key | string | default "" |
collection_title | string | default "" |
Responses
GET /api/v1/datasets/usage
Get usage and earnings per dataset operationId dataset_usage
Usage and earnings for the datasets your organisation owns.
Parameters
| Name | In | Type | Notes |
|---|
from_ | query | string | null | |
to | query | string | null | |
Responses
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
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
| Field | Type | Notes |
|---|
dataset_id | string | null | |
mode required | string | |
org_type_label | string | null | |
attribution_text | string | null | |
Responses
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
| Name | In | Type | Notes |
|---|
item_id required | path | string | |
Responses
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
| Name | In | Type | Notes |
|---|
upload_id required | path | string | |
Responses
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
| Name | In | Type | Notes |
|---|
upload_id required | path | string | |
Responses
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
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
| Field | Type | Notes |
|---|
target_collection_id required | string | |
path_glob | string | null | fnmatch pattern over the document key, e.g. Avtal/* (* also crosses folders). |
mime | string[] | Only these types; empty = any. |
priority | integer | Lowest first. · default 100, min 0, max 100000 |
source_collection_id | string | null | Only uploads headed for this collection; none = every upload. |
Responses
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
| Name | In | Type | Notes |
|---|
rule_id required | path | string | |
Responses
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
| Name | In | Type | Notes |
|---|
limit | query | integer | default 50 |
cursor | query | string | null | |
Responses
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
| Field | Type | Notes |
|---|
title required | string | min length 1, max length 255 |
slug | string | null | Your 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_owner | string | default "", max length 255 |
license_basis | string | default "owner-license", max length 64 |
granted_uses | string[] | |
jurisdiction | string | default "global", max length 32 |
labels | string[] | |
Responses
GET /api/v1/collections/{collection_id}
Get one collection operationId get_collection
One of your collections: its title, slug, size and terms.
Parameters
| Name | In | Type | Notes |
|---|
collection_id required | path | string | |
Responses
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
| Name | In | Type | Notes |
|---|
collection_id required | path | string | |
Request body application/json
| Field | Type | Notes |
|---|
title | string | null | |
slug | string | null | |
Responses
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
| Name | In | Type | Notes |
|---|
collection_id required | path | string | |
folder | query | string | null | |
limit | query | integer | default 100 |
cursor | query | string | null | |
Responses
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
| Name | In | Type | Notes |
|---|
collection_id required | path | string | |
doc_id required | path | string | |
Responses
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
| Name | In | Type | Notes |
|---|
collection_id required | path | string | |
doc_id required | path | string | |
reason | query | string | default "owner_removed" |
Responses
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
| Name | In | Type | Notes |
|---|
collection_id required | path | string | |
parent | query | string | null | |
limit | query | integer | default 200 |
cursor | query | string | null | |
Responses
Schemas
ApiKeyCreateRequest
| Field | Type | Notes |
|---|
name | string | default "api key" |
scopes | string[] | |
sandbox | boolean | Create 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
| Field | Type | Notes |
|---|
id required | string | |
prefix required | string | |
name required | string | |
scopes | string[] | |
sandbox | boolean | default false |
api_key required | string | |
ApiKeyCurrentResponse
GET /api-keys/current: the credential this request was made with.
| Field | Type | Notes |
|---|
org_id required | string | |
auth_kind required | string | api_key, or oauth for an access token. |
sandbox | boolean | True for a sandbox key: every response is a synthetic fixture. · default false |
key_id | string | null | |
prefix | string | null | |
name | string | null | |
scopes | string[] | |
ApiKeyInfo
| Field | Type | Notes |
|---|
id required | string | |
prefix required | string | |
name required | string | |
scopes | string[] | |
sandbox | boolean | default false |
created_at | string | null | |
last_used_at | string | null | |
revoked_at | string | null | |
BillingProfileRequest
| Field | Type | Notes |
|---|
company_name required | string | min length 1, max length 255 |
org_number | string | null | |
address_line1 required | string | min length 1, max length 255 |
address_line2 | string | null | |
postal_code required | string | min length 1, max length 32 |
city required | string | min length 1, max length 128 |
country required | string | min length 2, max length 2 |
vat_id | string | null | |
invoice_email required | string | min length 3, max length 255 |
nace_section | string | null | |
buyer_segment | string | null | |
size_band | string | null | |
Body_upload_dataset
| Field | Type | Notes |
|---|
file | string | null | |
source_uri | string | default "" |
content_sha256 | string | default "" |
file_name | string | default "" |
dataset_id | string | default "" |
data_owner | string | default "" |
license | string | default "CC-BY-4.0" |
license_basis | string | default "owner-license" |
granted_uses | string | default "search,rag" |
labels | string | default "" |
jurisdiction | string | default "global" |
offered | boolean | default false |
upload_id | string | default "" |
trigger | string | default "user" |
acl | string | default "" |
lane | string | default "" |
batch_id | string | default "" |
collection_id | string | default "" |
doc_key | string | default "" |
collection_title | string | default "" |
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.
| Field | Type | Notes |
|---|
title required | string | min length 1, max length 255 |
slug | string | null | Your 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_owner | string | default "", max length 255 |
license_basis | string | default "owner-license", max length 64 |
granted_uses | string[] | |
jurisdiction | string | default "global", max length 32 |
labels | string[] | |
CollectionDocumentListResponse
CollectionDocumentResponse
A document: one file, archive member or export thread, with its versions.
| Field | Type | Notes |
|---|
doc_id required | string | |
collection_id required | string | |
doc_key required | string | |
folder required | string | |
title required | string | |
mime | string | null | |
bytes | integer | default 0 |
current_version required | string | |
state required | string | |
chunks_indexed | integer | default 0 |
chunks_quarantined | integer | default 0 |
created_at | string | null | |
updated_at | string | null | |
versions | DocumentVersionEntry[] | null | |
also_at | object[] | null | |
CollectionFolderListResponse
CollectionFolderResponse
| Field | Type | Notes |
|---|
folder_id required | string | |
path required | string | |
name required | string | |
depth | integer | default 0 |
document_count | integer | default 0 |
CollectionInfo
| Field | Type | Notes |
|---|
collection required | string | |
points | integer | 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.
| Field | Type | Notes |
|---|
collection_id required | string | |
dataset_id required | string | |
slug required | string | |
title required | string | |
kind | string | default "documents" |
sensitivity | string | default "standard" |
origin | string | default "upload" |
document_count | integer | default 0 |
bytes_total | integer | default 0 |
documents_listed | boolean | default true |
offered | boolean | default false |
license_basis | string | null | |
granted_uses | string[] | |
jurisdiction | string | null | |
created_at | string | null | |
updated_at | string | null | |
CollectionRuleDeleteResponse
| Field | Type | Notes |
|---|
rule_id required | string | |
deleted | boolean | default true |
CollectionRuleListResponse
CollectionRuleRequest
Send new uploads whose document key matches to a collection.
| Field | Type | Notes |
|---|
target_collection_id required | string | |
path_glob | string | null | fnmatch pattern over the document key, e.g. Avtal/* (* also crosses folders). |
mime | string[] | Only these types; empty = any. |
priority | integer | Lowest first. · default 100, min 0, max 100000 |
source_collection_id | string | null | Only uploads headed for this collection; none = every upload. |
CollectionRuleResponse
| Field | Type | Notes |
|---|
rule_id required | string | |
target_collection_id required | string | |
source_collection_id | string | null | |
priority | integer | default 100 |
path_glob | string | null | |
mime | string[] | |
created_at | string | null | |
CollectionUpdateRequest
| Field | Type | Notes |
|---|
title | string | null | |
slug | string | null | |
CollectionsResponse
| Field | Type | Notes |
|---|
embedder required | string | |
backend required | string | |
location required | string | |
collections | CollectionInfo[] | |
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.
| Field | Type | Notes |
|---|
tokens required | integer | > 0 |
DatasetEarningsPoint
One day of earnings on one dataset.
| Field | Type | Notes |
|---|
date required | string | |
tokens | integer | default 0 |
gross_tokens | integer | default 0 |
fee_tokens | integer | default 0 |
DatasetEarningsResponse
| Field | Type | Notes |
|---|
dataset_id required | string | |
from_ts | string | null | |
to_ts | string | null | |
total_tokens | integer | default 0 |
gross_tokens | integer | default 0 |
fee_tokens | integer | default 0 |
series | DatasetEarningsPoint[] | |
segments | DatasetEarningsSegment[] | |
min_buyers_per_segment | integer | default 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`.
| Field | Type | Notes |
|---|
segment required | string | |
label required | string | |
queries | integer | default 0 |
tokens | integer | default 0 |
DatasetRecordResponse
| Field | Type | Notes |
|---|
dataset_id required | string | |
data_owner | string | default "" |
warranties_ok | boolean | default false |
database_right | boolean | default false |
jurisdiction | string | default "global" |
provider_agreement_ref | string | null | |
granted_uses | string[] | |
license_basis | string | null | |
controller_role | string | null | |
legal_basis | string | null | |
transfer_restriction | string | null | |
labels | string[] | |
owner_tenant | string | null | |
offered | boolean | default false |
entitled | boolean | default false |
revoked | boolean | default false |
display_identity | object | null | |
indexed_points | integer | null | |
collection_id | string | null | |
title | string | null | |
slug | string | null | |
document_count | integer | null | |
DatasetUploadResponse
Result of a self-service upload: the registered dataset + what the pipeline ingest actually did (gate-passing chunks indexed, the rest quarantined).
| Field | Type | Notes |
|---|
dataset_id required | string | |
document_id | string | null | |
indexed | integer | default 0 |
quarantined | integer | default 0 |
documents | object[] | |
displaced | object[] | |
tiers | object | |
collection | string | null | |
labels | string[] | |
granted_uses | string[] | |
license_basis | string | null | |
offered | boolean | default false |
item_id | string | null | |
batch_id | string | null | |
duplicate | boolean | default false |
collection_id | string | null | |
doc_id | string | null | |
doc_key | string | null | |
DatasetUsage
| Field | Type | Notes |
|---|
hits | integer | default 0 |
tokens | integer | default 0 |
cost_eur | number | default 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.
| Field | Type | Notes |
|---|
dataset_id required | string | |
labels | string[] | |
data_owner | string | default "" |
queries | integer | default 0 |
hits | integer | default 0 |
tokens_attributed | integer | default 0 |
earned_eur | number | default 0 |
by_use_case | object | |
last_used_at | string | null | |
self_queries | integer | default 0 |
self_hits | integer | default 0 |
DatasetUsageResponse
| Field | Type | Notes |
|---|
from_ts | string | null | |
to_ts | string | null | |
datasets | DatasetUsageEntry[] | |
total_earned_eur | number | default 0 |
DayUsage
| Field | Type | Notes |
|---|
day required | string | |
tokens | integer | default 0 |
spend_eur | number | default 0 |
queries | integer | default 0 |
DisplayRequest
| Field | Type | Notes |
|---|
dataset_id | string | null | |
mode required | string | |
org_type_label | string | null | |
attribution_text | string | null | |
DocumentDeleteResponse
| Field | Type | Notes |
|---|
doc_id required | string | |
collection_id required | string | |
reason required | string | |
points_deleted | integer | default 0 |
originals_deleted | integer | default 0 |
versions | integer | default 0 |
DocumentVersionEntry
| Field | Type | Notes |
|---|
sha256 required | string | |
bytes | integer | default 0 |
observed_at | string | null | |
superseded_at | string | null | |
current | boolean | default false |
EraseResponse
| Field | Type | Notes |
|---|
dataset_id | string | null | |
tenant | string | null | |
reason | string | default "erasure_request" |
points_deleted | integer | default 0 |
revoked | boolean | default false |
record_deleted | boolean | default false |
suppressed | boolean | default false |
originals_deleted | integer | default 0 |
cache_purged | boolean | default false |
graph_rows_deleted | integer | default 0 |
relations_deleted | integer | default 0 |
GpaiSummaryResponse
| Field | Type | Notes |
|---|
general_information | object | |
data_sources | object[] | |
processing | object | |
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.
| Field | Type | Notes |
|---|
item_id required | string | |
batch_id | string | null | |
upload_id | string | null | |
dataset_id required | string | |
state required | string | |
duplicate | boolean | default false |
sha256 | string | null | |
lane | string | default "interactive" |
offered | boolean | default false |
collection_id | string | null | |
doc_key | string | null | |
IngestItemResponse
One file in the ingest queue, and where it stands.
| Field | Type | Notes |
|---|
item_id required | string | |
batch_id | string | null | |
upload_id | string | null | |
dataset_id required | string | |
file_name | string | null | |
bytes | integer | default 0 |
sha256 | string | null | |
state required | string | |
lane | string | default "interactive" |
attempts | integer | default 0 |
max_attempts | integer | default 0 |
error_class | string | null | |
error | string | null | |
indexed | integer | null | |
quarantined | integer | null | |
document_id | string | null | |
collection_id | string | null | |
doc_id | string | null | |
doc_key | string | null | |
duplicate_of | string | null | |
offer_refused | string | null | |
created_at | string | null | |
started_at | string | null | |
finished_at | string | null | |
LedgerDayPoint
One day of money moving, from the org's own ledger.
| Field | Type | Notes |
|---|
date required | string | |
spent_eur | number | default 0 |
earned_eur | number | default 0 |
spent_queries | integer | default 0 |
earned_queries | integer | default 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.
| Field | Type | Notes |
|---|
from_ts | string | null | |
to_ts | string | null | |
owns_datasets | boolean | default false |
total_spent_eur | number | default 0 |
total_earned_eur | number | default 0 |
net_eur | number | default 0 |
total_spent_queries | integer | default 0 |
total_earned_queries | integer | default 0 |
series | LedgerDayPoint[] | |
ListingCard
One listing a scope covers. Until collections exist a listing is a dataset.
| Field | Type | Notes |
|---|
listing_id required | string | |
title required | string | |
origin required | string | own or marketplace. |
source required | string | Who the data is from, as the partner chose to be shown; Your organisation for your own. |
verified | boolean | null | |
licence required | string | |
uses | string[] | |
jurisdiction | string | null | |
labels | string[] | |
offered | boolean | default false |
passages | integer | null | Indexed passages. |
scope required | string | The scope value that searches only this listing. |
ListingGroup
Marketplace passages of one listing (E12): which ranks came from it.
| Field | Type | Notes |
|---|
listing_id required | string | |
source | string | null | |
hits | integer | default 0 |
ranks | integer[] | |
ListingsResponse
| Field | Type | Notes |
|---|
scope required | string | |
listings | ListingCard[] | |
PricingResponse
GET /api/v1/pricing — the one price, for the dashboard and the public.
| Field | Type | Notes |
|---|
currency required | string | |
per_1k_tokens_eur required | number | |
own_data_per_1k_tokens_eur required | number | |
own_data_price_decided required | boolean | |
per_source_eur required | number | |
credits_per_eur required | integer | |
platform_fee_bps required | integer | |
partner_share_bps required | integer | |
token_unit required | string | |
estimate_tokens_per_hit required | integer | |
free_queries_per_org required | integer | |
QuotaResponse
| Field | Type | Notes |
|---|
rpm_limit required | integer | |
rpm_remaining required | integer | |
daily_quota required | integer | |
daily_remaining required | integer | |
monthly_quota required | integer | |
monthly_remaining required | integer | |
free_queries_remaining required | integer | |
wallet_balance_tokens required | integer | |
RecentQuery
One row of the dashboard's recent-queries table (mirrors the Trivda shape).
| Field | Type | Notes |
|---|
time required | string | |
query_id | string | null | |
collection | string | null | |
use_case | string | default "rag" |
hits | integer | default 0 |
tokens | integer | default 0 |
cost_eur | number | default 0 |
status | string | default "ok" |
SearchHit
| Field | Type | Notes |
|---|
rank required | integer | |
score required | number | |
text required | string | |
readiness_tier | string | null | |
source_uri | string | null | |
concept_ids | string[] | |
license | object | |
content_class | string | null | |
pii_tier | string | null | |
citation | object | null | |
provenance_id | string | null | |
display_identity | object | null | |
attribution | string | null | |
origin | string | null | |
listing_id | string | null | |
relations | string[] | null | Ids of the relations in this response's relations that concern this passage. Present only for an organisation with the context graph. |
SearchQueryRequest
| Field | Type | Notes |
|---|
query required | string | What to search for, in plain language. · min length 1, max length 4000 |
top_k | integer | How many passages to return at most. · default 8, min 1, max 50 |
domain | string | null | Optional subject domain (for example legal, finance, medical). It steers query expansion and, where one is configured, the domain's own index. |
content_type | string | Which kind of content to search: general (default) or a specialised family such as code; picks the index the query runs against. · default "general" |
use_case | string | What 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" |
collection | string | null | Optional index name. A scoped key may only name an index in its scopes. |
min_tier | string | null | Reserved; not applied yet. |
scope | string | null | Where 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
| Field | Type | Notes |
|---|
results | SearchHit[] | |
scope | string | null | The scope this search ran in (mine, marketplace, all, listing:<id>). |
listings | ListingGroup[] | The marketplace passages grouped by listing, best rank first. Your own passages are not grouped. |
query_expansion | object | |
used | object | |
relations | object[] | null | The 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. |
vocabularies | object[] | 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_id | string | null | |
latency_ms | integer | default 0 |
billing | object | null | What 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).
| Field | Type | Notes |
|---|
intent | string | null | What your organisation uses TRIVDA for: knowledge_bank, marketplace or null. |
default_scope required | string | The scope a search runs in when it names none, for this credential. |
default_source required | string | Why: key (the API key's default_scope:), intent or default. |
scopes | string[] | |
graph_evidence | boolean | Whether POST /api/v1/context/gather can build an evidence bundle for you. · default false |
SearchScopeUpdate
| Field | Type | Notes |
|---|
intent | string | null | knowledge_bank (searches default to your own data), marketplace, or null for the platform default (all). |
UploadCancelResponse
| Field | Type | Notes |
|---|
upload_id required | string | |
outcome required | string | |
dataset_id | string | null | |
points_deleted | integer | default 0 |
originals_deleted | integer | default 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).
| Field | Type | Notes |
|---|
upload_id required | string | |
state required | string | |
dataset_id | string | null | |
indexed | integer | null | |
quarantined | integer | null | |
error | string | null | |
item_id | string | null | |
batch_id | string | null | |
attempts | integer | null | |
UsageQueriesResponse
| Field | Type | Notes |
|---|
queries | RecentQuery[] | |
limit | integer | default 50 |
offset | integer | default 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).
| Field | Type | Notes |
|---|
consumed_eur | number | default 0 |
projected_eom_eur | number | default 0 |
total_hits | integer | default 0 |
total_tokens | integer | default 0 |
by_dataset | object | |
by_day | DayUsage[] | |
ValidationError
| Field | Type | Notes |
|---|
loc required | string | integer[] | |
msg required | string | |
type required | string | |
input | any | |
ctx | object | |
VocabularyInfo
| Field | Type | Notes |
|---|
vocab_id required | string | |
name required | string | |
publisher required | string | |
version required | string | |
licence required | string | SPDX id, or LicenseRef- for a custom licence |
licence_url required | string | |
source_url required | string | |
status required | string | active: loaded and linked. review: waiting for legal review, not loaded. excluded: never loaded into anything that serves results |
redistribute_ids required | boolean | |
redistribute_labels required | boolean | |
redistribute_definitions required | boolean | |
crosswalk_allowed required | boolean | |
attribution_required required | boolean | |
attribution | string | null | |
retrieved_at | string | null | When the loaded data was retrieved |
terms_checked_at required | string | When the licence terms were last read |
notes | string | default "" |
WalletResponse
| Field | Type | Notes |
|---|
balance_tokens | integer | default 0 |
free_queries_remaining | integer | default 0 |
credits_tokens | integer | default 0 |
earnings_tokens | integer | default 0 |
withdrawable_tokens | integer | default 0 |