Prudai Developer API: bronnen
De broncatalogus, zoeken in bronnen, documenten ophalen en citaten controleren.
Basis-URL https://api.prudai.com/v1. Inloggen staat in Inloggen, scopes in Scopes en rechten, fouten in Fouten. Overzicht.
| Methode | Pad | Wat het doet | Stand |
|---|---|---|---|
POST | /v1/citations/verify | Citaten controleren | Binnenkort |
GET | /v1/sources | De broncatalogus opvragen | Op productie |
GET | /v1/sources/{source_id}/documents/{document_id} | Een brondocument ophalen | Op productie |
POST | /v1/sources/search | In bronnen zoeken | Op productie |
Citaten controleren
POST /v1/citations/verify
Verify citations (phase 1).
Checks a list of citations, an ECLI, an article reference such as
art. 6:162 BW, a CELEX number or a Kamerstuk reference, each with an optional
quote. Per citation you get whether it exists, what it resolved to (source,
document, URL, title, date, location), whether the quote matches (quote_match) and a
reason. Use it to check the output of any model or author, not only Prudai’s.
It works for reference_only sources too: Prudai confirms that the document and
location exist and, where Prudai holds the text, whether the quote matches, without
passing the text on (matched_passage is only returned for full_text sources).
Free at launch (request kind verify_citations, cost_credits: 0; fair-use limits
apply), up to 50 citations per request.
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:citations:read - Goedkeuring:
none, geen extra stap.
Parameters
X-Client-Request-Id
Your own correlation id. Stored as request metadata and echoed in usage exports; not used for idempotency. max. lengte 128 · patroon^[\x21-\x7E]+$
Body
JSON, verplicht.
citationsverplichtcitations[].referenceverplicht
An ECLI, article reference, CELEX number or Kamerstuk reference as written. max. lengte 300citations[].kind
Type of reference;autolets Prudai detect it. Een van:auto,ecli,article,celex,kamerstuk· standaard:"auto"citations[].quote
Optional text that is claimed to appear at that reference. max. lengte 5000citations[].client_ref
Your own id, echoed back. max. lengte 100citations[].as_of
Overrides the request-levelas_offor this citation.jurisdictions
Optional hint for ambiguous article references.as_of
Check each citation against the version in force on this date (“was this article in force, with this wording, on this date?”), where the source provides versions. Default today.
Antwoorden
| Status | Betekenis |
|---|---|
200 | One result per submitted citation, in request order. |
400 | Malformed request or unsupported parameter (for example client-sent tools). |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
409 | A request with the same Idempotency-Key is still running. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
500 | Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits). |
502 | An upstream model provider or source failed. Not charged, except work that completed before the failure (reported in details.charged_credits). |
503 | Temporarily unavailable (service_unavailable). Free operations never return credit_check_unavailable. |
Velden in data (200)
object
citation_verificationrequest_id
patroon^req_[A-Za-z0-9]{24}$resultsresults[].index
Position of the citation in the request. min. 0results[].client_ref
kannullzijnresults[].reference
The reference as submitted.results[].as_of
The date the citation was checked against.results[].in_force
Whether the resolved article was in force onas_of; null when the source provides no validity (case law, sources without versions).quote_matchcompares against the wording valid onas_of. kannullzijnresults[].exists
True = found in a served source. False = not found where it should be (for example an ECLI that does not exist). Null = could not be checked (reason_codesays why). kannullzijnresults[].resolved
kannullzijnresults[].quote_match
exact= the quote appears verbatim;normalized= it appears after normalising whitespace, punctuation, case and diacritics;not_found= it does not appear at the resolved location;not_checked= no quote was sent, or Prudai holds no text for that source (metadata-only licence). Een van:exact,normalized,not_found,not_checkedresults[].matched_passage
The matching passage, only forfull_textsources; null otherwise. kannullzijnresults[].reason_code
Een van:found,not_found,ambiguous_reference,unsupported_reference,source_not_served,source_unavailable,quote_not_found,no_quote_sent,text_not_held,not_in_force_on_date,validity_unknownresults[].reason
Short human-readable explanation. Branch onreason_code, not on this text. max. lengte 300prudaiprudai.request_id
patroon^req_[A-Za-z0-9]{24}$prudai.request_kind
Een van:search,routed_search,fetch,references,elements,verify_citations,source_answerprudai.cost_credits
Credit amount; 1 credit = EUR 0.01. Prudai rounds to at most three decimals (internally integer millicredits); do not rely on binary floating-point equality.prudai.price_list_version
Version of the published price list this metered request was priced with (see the credits and billing guide), also for free operations (priced at 0). A new version is published with its effective date whenever a model or provider price changes. Treat the value as an opaque identifier.
curl -s -X POST "https://api.prudai.com/v1/citations/verify" \ -H "Authorization: Bearer $PRUDAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "citations": [ { "reference": "ECLI:NL:HR:…", "kind": "auto", "quote": "string", "client_ref": "string", "as_of": "2026-11-05" } ], "jurisdictions": [ "string" ], "as_of": "2026-11-05" }'prudai leo citations verifyDe broncatalogus opvragen
GET /v1/sources
List sources (phase 1).
Free at launch. The catalogue of sources this key may search, with jurisdiction,
kind and licence. Sources whose redistribution status is none or unknown in
Prudai’s licence register are not served at all and therefore never listed.
- Stand: op productie.
- Scope:
prudai:sources:read - Goedkeuring:
none, geen extra stap.
Parameters
jurisdiction
Filter on jurisdiction code, comma-separated (NL,EU,DE,FR, …).kind
Een van:legislation,case_law,decisions,parliamentary,official_publications,register,guidance,literature,otheraccess
Only sources with this access level.full_text, the licence permits redistribution (doorleveren: jain Prudai’s licence register): search snippets andfetchare available.reference_only, metadata and a link to the publisher only. Een van:full_text,reference_onlylimit
standaard:100· min. 1 · max. 200after
max. lengte 200
Antwoorden
| Status | Betekenis |
|---|---|
200 | One page of sources. |
400 | Malformed request or unsupported parameter (for example client-sent tools). |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
500 | Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits). |
Velden in data (200)
object
listdatadata[].id
Public source id from the Prudai source catalogue. max. lengte 80 · patroon^[a-z0-9]+(-[a-z0-9]+)*$data[].object
sourcedata[].namedata[].jurisdiction
EU,INT(international bodies such as the European Patent Office) or an ISO 3166-1 alpha-2 country code. patroon^(EU|INT|[A-Z]{2})$data[].kind
Een van:legislation,case_law,decisions,parliamentary,official_publications,register,guidance,literature,otherdata[].publisher
kannullzijndata[].url
kannullzijndata[].access
full_text, the licence permits redistribution (doorleveren: jain Prudai’s licence register): search snippets andfetchare available.reference_only, metadata and a link to the publisher only. Een van:full_text,reference_onlydata[].licencedata[].licence.namedata[].licence.attribution
Attribution you must show when you display results from this source. kannullzijndata[].licence.terms_url
kannullzijndata[].licence.verified_on
Date Prudai last verified the licence at the primary source.has_morenext_cursor
kannullzijn
curl -s "https://api.prudai.com/v1/sources" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo sources list{ "object": "list", "data": [ { "id": "string", "object": "source", "name": "string", "jurisdiction": "string", "kind": "legislation", "publisher": "string", "url": "https://voorbeeld.nl", "access": "full_text", "licence": { "name": "CC0 1.0", "attribution": "string", "terms_url": "https://voorbeeld.nl", "verified_on": "2026-11-05" } } ], "has_more": false, "next_cursor": "string"}Een brondocument ophalen
GET /v1/sources/{source_id}/documents/{document_id}
Fetch a document’s full text (phase 1).
Returns the full text of one document, only for sources with
access: full_text. For a reference_only source the response is
403 redistribution_not_permitted; use the url from the search hit instead.
Free at launch (request kind fetch, cost_credits: 0; fair-use limits apply).
Documents are bounded to 200,000 characters and the transport to 2 MiB; incomplete
text has completeness.truncated: true. Wetten article identifiers accept
BWBR.../artikel <number>; historical text is returned only when its validity
period can be confirmed. Articles outside the bounded read are unavailable.
- Stand: op productie.
- Scope:
prudai:source_texts:read - Goedkeuring:
none, geen extra stap.
Parameters
source_idverplicht
Public source id from the Prudai source catalogue. max. lengte 80 · patroon^[a-z0-9]+(-[a-z0-9]+)*$document_idverplicht
Document id from a search hit (URL-encoded; ECLI and CELEX ids contain colons). max. lengte 300as_of
The version in force on this date, where the source provides versions (legislation). Default today. A date in the future is refused (422). A document with no version in force on this date gives 404 with details.reason_codenot_in_force_on_date.format
Both formats return the standard JSONSourceDocumentenvelope.json(default) selects plain text indata.content;markdownselects Markdown there withdata.content_format: markdown. Neither format drops the envelope metadata. Een van:json,markdown· standaard:"json"
Antwoorden
| Status | Betekenis |
|---|---|
200 | The document. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
500 | Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits). |
502 | An upstream model provider or source failed. Not charged, except work that completed before the failure (reported in details.charged_credits). |
503 | Temporarily unavailable (service_unavailable). Free operations never return credit_check_unavailable. |
504 | Source deadline exceeded (timeout, details.reason_code upstream_timeout). |
Velden in data (200)
object
source_documentsource_id
Public source id from the Prudai source catalogue. max. lengte 80 · patroon^[a-z0-9]+(-[a-z0-9]+)*$document_idtitleurl
kannullzijnidentifiersidentifiers.ecli
patroon^ECLI:[A-Z]{2}:[A-Z0-9.]+:[0-9]{4}:[A-Z0-9.]+$· kannullzijnidentifiers.celex
max. lengte 40 · kannullzijnidentifiers.other
Another stable identifier (e.g. a BWB id or Kamerstuk number). max. lengte 200 · kannullzijndate
kannullzijnlanguage
BCP 47 language tag of the text.content_format
Een van:text,markdowncontent
The full text as published by the source (pseudonymised where the source pseudonymises).attribution
kannullzijnretrieved_atvalidity
Validity of legislation, where the source provides it. All three fields are null when the source does not publish validity (for example case law, or a source without versions).validity.in_force
In force on the request’sas_ofdate (default today). kannullzijnvalidity.valid_from
kannullzijnvalidity.valid_to
Null while still in force, or when unknown. kannullzijnprudaiprudai.request_id
patroon^req_[A-Za-z0-9]{24}$prudai.request_kind
Een van:search,routed_search,fetch,references,elements,verify_citations,source_answerprudai.cost_credits
Credit amount; 1 credit = EUR 0.01. Prudai rounds to at most three decimals (internally integer millicredits); do not rely on binary floating-point equality.prudai.price_list_version
Version of the published price list this metered request was priced with (see the credits and billing guide), also for free operations (priced at 0). A new version is published with its effective date whenever a model or provider price changes. Treat the value as an opaque identifier.
curl -s "https://api.prudai.com/v1/sources/<source_id>/documents/<document_id>" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo sources-documents get{ "object": "source_document", "source_id": "string", "document_id": "string", "title": "string", "url": "https://voorbeeld.nl", "identifiers": { "ecli": "string", "celex": "string", "other": "string" }, "date": "2026-11-05", "language": "nl", "content_format": "text", "content": "string", "attribution": "string", "retrieved_at": "2026-11-05T09:30:00.000Z", "validity": { "in_force": false, "valid_from": "2026-11-05", "valid_to": "2026-11-05" }, "prudai": { "request_id": "string", "request_kind": "search", "cost_credits": 1, "price_list_version": "2026-11-01" }}In bronnen zoeken
POST /v1/sources/search
Search sources (phase 1).
Searches the sources. With mode: auto Prudai selects the
sources (deterministic routing; no model fallback) and returns a
context.routing block that explains the choice; envelope next proposes ready-made calls. With
mode: explicit you name the sources in source_ids.
Free at launch (cost_credits: 0, request kind search or routed_search; fair-use
limits apply, 429 fair_use_limited). Every hit carries
passages[] (verified passages with location; quotes only for access: full_text).
Snippets are only returned for sources with access: full_text.
This release uses keyword and identifier search. With search_mode: hybrid (the
default) a search over several sources asks every selected source for one page
(at most four upstream calls at a time), ranks the hits on the query and on a source
prior that follows the question (shown as confidence in context.routing), and
fills the page from all sources; a source that is down or a text that cannot be
fetched is a gap in notIncluded. With search_mode: keyword pages traverse sources
in catalog order, one source per page. Date sorting and facets apply to the returned
page. Only publication-date
filtering is supported. Sources without an adapter are reported in notIncluded.
There are no EU sources in the current licensed catalog. Upstream reads are limited
to 2 MiB, documents to 200,000 characters, and excerpts to 2,000 characters.
Retrieved excerpts use the document location unless an exact article is available;
keyword excerpts select a literal matching term when present. Missing source text
is reported instead of being marked verified.
- Stand: op productie.
- Scope:
prudai:sources:read - Goedkeuring:
none, geen extra stap. - Idempotentie: stuur
Idempotency-Keymee; dezelfde sleutel met dezelfde body voert de actie niet twee keer uit.
Parameters
Idempotency-Key
Client-chosen unique key (we suggest a UUID) to make retries safe. Stored for 24 hours per credential and organisation (service key or personal token). Same key and same body: stored result is replayed and charged once. The knowledge-base operations (createKnowledgeBase,uploadKnowledgeBaseDocument) work differently: the key is bound to the organisation or knowledge base and lives as long as the object; see their descriptions. min. lengte 8 · max. lengte 255 · patroon^[\x21-\x7E]+$X-Client-Request-Id
Your own correlation id. Stored as request metadata and echoed in usage exports; not used for idempotency. max. lengte 128 · patroon^[\x21-\x7E]+$
Body
JSON, verplicht.
queryverplicht
max. lengte 2000mode
Een van:auto,explicit· standaard:"auto"source_ids
Required withmode: explicit; explicit selections take precedence over identifier routing.kind
Een van:legislation,case_law,decisions,parliamentary,official_publications,register,guidance,literature,otherjurisdictionsdate_fromdate_tosearch_mode
This release performs keyword and identifier search; semantic retrieval is not included and is reported in notIncluded. hybrid (default) ranks the keyword hits of all selected sources together; keyword traverses sources in catalog order, one source per page. Een van:keyword,semantic,hybrid· standaard:"hybrid"sort
Ordering within the returned source page. relevance with search_mode hybrid ranks across sources; date orderings apply within the page only. Een van:relevance,date_desc,date_asc· standaard:"relevance"date_field
This release supports publication_date only. Other values return unsupported_parameter. Een van:publication_date,decision_date,valid_from· standaard:"publication_date"as_of
Search legislation as it was in force on this date, where the source provides versions. Default today. A date in the future is refused (422).document_ids
Search only within these documents.document_ids[].source_idverplicht
Public source id from the Prudai source catalogue. max. lengte 80 · patroon^[a-z0-9]+(-[a-z0-9]+)*$document_ids[].document_idverplicht
max. lengte 300facets
Facet counts for the returned page, not the entire upstream result set. Een van:source_id,jurisdiction,kind,yearcursor
next_cursorof the previous page; the other fields must be unchanged. max. lengte 500max_results
Page size. Pages traverse sources deterministically; usecursorfor further pages. standaard:10· min. 1 · max. 50max_passages_per_hit
Verified passages to return per hit (0= none). Same price. standaard:3· min. 0 · max. 5
Antwoorden
| Status | Betekenis |
|---|---|
200 | Search results. |
400 | Malformed request or unsupported parameter (for example client-sent tools). |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
409 | A request with the same Idempotency-Key is still running. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
500 | Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits). |
502 | An upstream model provider or source failed. Not charged, except work that completed before the failure (reported in details.charged_credits). |
503 | Temporarily unavailable (service_unavailable). Free operations never return credit_check_unavailable. |
504 | Source deadline exceeded (timeout, details.reason_code upstream_timeout). |
Velden in data (200)
object
source_searchrequest_id
patroon^req_[A-Za-z0-9]{24}$mode
Een van:auto,explicitresultsresults[].source_id
Public source id from the Prudai source catalogue. max. lengte 80 · patroon^[a-z0-9]+(-[a-z0-9]+)*$results[].document_id
max. lengte 300results[].titleresults[].url
kannullzijnresults[].identifiersresults[].identifiers.ecli
patroon^ECLI:[A-Z]{2}:[A-Z0-9.]+:[0-9]{4}:[A-Z0-9.]+$· kannullzijnresults[].identifiers.celex
max. lengte 40 · kannullzijnresults[].identifiers.other
Another stable identifier (e.g. a BWB id or Kamerstuk number). max. lengte 200 · kannullzijnresults[].date
kannullzijnresults[].snippet
Verbatim excerpt; only forfull_textsources, otherwise null. kannullzijnresults[].passages
Verified passages in this document that bear on the query, in bothautoandexplicitmode: exact location (article, paragraph, legal consideration “r.o.”, section), verbatimquoteandverifiedfrom the same citation check the chat API uses. Forreference_onlysources each passage has the location butquote: null.results[].passages[].passage_id
Id of the passage within this response (referenced byclaims[].passage_ids). max. lengte 100results[].passages[].location
Where in the document the passage sits.results[].passages[].element_id
Element id fromGET …/elements, when known. kannullzijnresults[].passages[].start_offset
Start of the passage in the fetched text (UTF-16 code units, likeurl_citation); null forreference_onlysources. min. 0 · kannullzijnresults[].passages[].end_offset
min. 0 · kannullzijnresults[].passages[].validity
Validity of legislation, where the source provides it. All three fields are null when the source does not publish validity (for example case law, or a source without versions).results[].passages[].quote
Verbatim text of the passage. Null forreference_onlysources. max. lengte 4000 · kannullzijnresults[].passages[].verified
True = the identifier and location were found in the source and, for afull_textsource, the quote matches the retrieved text verbatim. False = the check failed; such passages are never used byPOST /sources/answer.results[].validity
Validity of legislation, where the source provides it. All three fields are null when the source does not publish validity (for example case law, or a source without versions).results[].validity.in_force
In force on the request’sas_ofdate (default today). kannullzijnresults[].validity.valid_from
kannullzijnresults[].validity.valid_to
Null while still in force, or when unknown. kannullzijnresults[].access
full_text, the licence permits redistribution (doorleveren: jain Prudai’s licence register): search snippets andfetchare available.reference_only, metadata and a link to the publisher only. Een van:full_text,reference_onlyresults[].attribution
kannullzijnhas_morenext_cursor
kannullzijnfacets
Present whenfacetswas requested; one array of value counts per facet. kannullzijnprudaiprudai.request_id
patroon^req_[A-Za-z0-9]{24}$prudai.request_kind
Een van:search,routed_search,fetch,references,elements,verify_citations,source_answerprudai.cost_credits
Credit amount; 1 credit = EUR 0.01. Prudai rounds to at most three decimals (internally integer millicredits); do not rely on binary floating-point equality.prudai.price_list_version
Version of the published price list this metered request was priced with (see the credits and billing guide), also for free operations (priced at 0). A new version is published with its effective date whenever a model or provider price changes. Treat the value as an opaque identifier.
curl -s -X POST "https://api.prudai.com/v1/sources/search" \ -H "Authorization: Bearer $PRUDAI_TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "query": "string", "mode": "auto", "source_ids": [ "string" ], "kind": "legislation", "jurisdictions": [ "string" ], "date_from": "2026-11-05", "date_to": "2026-11-05", "search_mode": "hybrid", "sort": "relevance", "date_field": "publication_date", "as_of": "2026-11-05", "document_ids": [ { "source_id": "string", "document_id": "string" } ], "facets": [ "source_id" ], "cursor": "string", "max_results": 10, "max_passages_per_hit": 3 }'prudai leo sources search