Ga naar inhoud

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.

MethodePadWat het doetStand
POST/v1/citations/verifyCitaten controlerenBinnenkort
GET/v1/sourcesDe broncatalogus opvragenOp productie
GET/v1/sources/{source_id}/documents/{document_id}Een brondocument ophalenOp productie
POST/v1/sources/searchIn bronnen zoekenOp 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 header · string
    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.

  • citations array<CitationToVerify> verplicht
  • citations[].reference string verplicht
    An ECLI, article reference, CELEX number or Kamerstuk reference as written. max. lengte 300
  • citations[].kind string
    Type of reference; auto lets Prudai detect it. Een van: auto, ecli, article, celex, kamerstuk · standaard: "auto"
  • citations[].quote string
    Optional text that is claimed to appear at that reference. max. lengte 5000
  • citations[].client_ref string
    Your own id, echoed back. max. lengte 100
  • citations[].as_of string (date)
    Overrides the request-level as_of for this citation.
  • jurisdictions array<string>
    Optional hint for ambiguous article references.
  • as_of string (date)
    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

StatusBetekenis
200One result per submitted citation, in request order.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
409A request with the same Idempotency-Key is still running.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
500Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits).
502An upstream model provider or source failed. Not charged, except work that completed before the failure (reported in details.charged_credits).
503Temporarily unavailable (service_unavailable). Free operations never return credit_check_unavailable.

Velden in data (200)

  • object string
    citation_verification
  • request_id string
    patroon ^req_[A-Za-z0-9]{24}$
  • results array<CitationVerifyResult>
  • results[].index integer
    Position of the citation in the request. min. 0
  • results[].client_ref string
    kan null zijn
  • results[].reference string
    The reference as submitted.
  • results[].as_of string (date)
    The date the citation was checked against.
  • results[].in_force boolean
    Whether the resolved article was in force on as_of; null when the source provides no validity (case law, sources without versions). quote_match compares against the wording valid on as_of. kan null zijn
  • results[].exists boolean
    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_code says why). kan null zijn
  • results[].resolved object
    kan null zijn
  • results[].quote_match string
    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_checked
  • results[].matched_passage object
    The matching passage, only for full_text sources; null otherwise. kan null zijn
  • results[].reason_code string
    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_unknown
  • results[].reason string
    Short human-readable explanation. Branch on reason_code, not on this text. max. lengte 300
  • prudai SourcesPrudaiResult
  • prudai.request_id string
    patroon ^req_[A-Za-z0-9]{24}$
  • prudai.request_kind string
    Een van: search, routed_search, fetch, references, elements, verify_citations, source_answer
  • prudai.cost_credits number
    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 string
    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
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"
}'
CLI (binnenkort)
prudai leo citations verify

De 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 query · array<string>
    Filter on jurisdiction code, comma-separated (NL, EU, DE, FR, …).
  • kind query · array<string>
    Een van: legislation, case_law, decisions, parliamentary, official_publications, register, guidance, literature, other
  • access query · string
    Only sources with this access level. full_text, the licence permits redistribution (doorleveren: ja in Prudai’s licence register): search snippets and fetch are available. reference_only, metadata and a link to the publisher only. Een van: full_text, reference_only
  • limit query · integer
    standaard: 100 · min. 1 · max. 200
  • after query · string
    max. lengte 200

Antwoorden

StatusBetekenis
200One page of sources.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
500Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits).

Velden in data (200)

  • object string
    list
  • data array<Source>
  • data[].id string
    Public source id from the Prudai source catalogue. max. lengte 80 · patroon ^[a-z0-9]+(-[a-z0-9]+)*$
  • data[].object string
    source
  • data[].name string
  • data[].jurisdiction string
    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 string
    Een van: legislation, case_law, decisions, parliamentary, official_publications, register, guidance, literature, other
  • data[].publisher string
    kan null zijn
  • data[].url string (uri)
    kan null zijn
  • data[].access string
    full_text, the licence permits redistribution (doorleveren: ja in Prudai’s licence register): search snippets and fetch are available. reference_only, metadata and a link to the publisher only. Een van: full_text, reference_only
  • data[].licence SourceLicence
  • data[].licence.name string
  • data[].licence.attribution string
    Attribution you must show when you display results from this source. kan null zijn
  • data[].licence.terms_url string (uri)
    kan null zijn
  • data[].licence.verified_on string (date)
    Date Prudai last verified the licence at the primary source.
  • has_more boolean
  • next_cursor string
    kan null zijn
curl
curl -s "https://api.prudai.com/v1/sources" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (binnenkort)
prudai leo sources list
Antwoord 200
{
"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_id path · string verplicht
    Public source id from the Prudai source catalogue. max. lengte 80 · patroon ^[a-z0-9]+(-[a-z0-9]+)*$
  • document_id path · string verplicht
    Document id from a search hit (URL-encoded; ECLI and CELEX ids contain colons). max. lengte 300
  • as_of query · string (date)
    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_code not_in_force_on_date.
  • format query · string
    Both formats return the standard JSON SourceDocument envelope. json (default) selects plain text in data.content; markdown selects Markdown there with data.content_format: markdown. Neither format drops the envelope metadata. Een van: json, markdown · standaard: "json"

Antwoorden

StatusBetekenis
200The document.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
500Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits).
502An upstream model provider or source failed. Not charged, except work that completed before the failure (reported in details.charged_credits).
503Temporarily unavailable (service_unavailable). Free operations never return credit_check_unavailable.
504Source deadline exceeded (timeout, details.reason_code upstream_timeout).

Velden in data (200)

  • object string
    source_document
  • source_id string
    Public source id from the Prudai source catalogue. max. lengte 80 · patroon ^[a-z0-9]+(-[a-z0-9]+)*$
  • document_id string
  • title string
  • url string (uri)
    kan null zijn
  • identifiers DocumentIdentifiers
  • identifiers.ecli string
    patroon ^ECLI:[A-Z]{2}:[A-Z0-9.]+:[0-9]{4}:[A-Z0-9.]+$ · kan null zijn
  • identifiers.celex string
    max. lengte 40 · kan null zijn
  • identifiers.other string
    Another stable identifier (e.g. a BWB id or Kamerstuk number). max. lengte 200 · kan null zijn
  • date string (date)
    kan null zijn
  • language string
    BCP 47 language tag of the text.
  • content_format string
    Een van: text, markdown
  • content string
    The full text as published by the source (pseudonymised where the source pseudonymises).
  • attribution string
    kan null zijn
  • retrieved_at string (date-time)
  • validity 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).
  • validity.in_force boolean
    In force on the request’s as_of date (default today). kan null zijn
  • validity.valid_from string (date)
    kan null zijn
  • validity.valid_to string (date)
    Null while still in force, or when unknown. kan null zijn
  • prudai SourcesPrudaiResult
  • prudai.request_id string
    patroon ^req_[A-Za-z0-9]{24}$
  • prudai.request_kind string
    Een van: search, routed_search, fetch, references, elements, verify_citations, source_answer
  • prudai.cost_credits number
    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 string
    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
curl -s "https://api.prudai.com/v1/sources/<source_id>/documents/<document_id>" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (binnenkort)
prudai leo sources-documents get
Antwoord 200
{
"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-Key mee; dezelfde sleutel met dezelfde body voert de actie niet twee keer uit.

Parameters

  • Idempotency-Key header · string
    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 header · string
    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.

  • query string verplicht
    max. lengte 2000
  • mode string
    Een van: auto, explicit · standaard: "auto"
  • source_ids array<string>
    Required with mode: explicit; explicit selections take precedence over identifier routing.
  • kind string
    Een van: legislation, case_law, decisions, parliamentary, official_publications, register, guidance, literature, other
  • jurisdictions array<string>
  • date_from string (date)
  • date_to string (date)
  • search_mode string
    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 string
    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 string
    This release supports publication_date only. Other values return unsupported_parameter. Een van: publication_date, decision_date, valid_from · standaard: "publication_date"
  • as_of string (date)
    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 array<object>
    Search only within these documents.
  • document_ids[].source_id string verplicht
    Public source id from the Prudai source catalogue. max. lengte 80 · patroon ^[a-z0-9]+(-[a-z0-9]+)*$
  • document_ids[].document_id string verplicht
    max. lengte 300
  • facets array<string>
    Facet counts for the returned page, not the entire upstream result set. Een van: source_id, jurisdiction, kind, year
  • cursor string
    next_cursor of the previous page; the other fields must be unchanged. max. lengte 500
  • max_results integer
    Page size. Pages traverse sources deterministically; use cursor for further pages. standaard: 10 · min. 1 · max. 50
  • max_passages_per_hit integer
    Verified passages to return per hit (0 = none). Same price. standaard: 3 · min. 0 · max. 5

Antwoorden

StatusBetekenis
200Search results.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
409A request with the same Idempotency-Key is still running.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
500Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits).
502An upstream model provider or source failed. Not charged, except work that completed before the failure (reported in details.charged_credits).
503Temporarily unavailable (service_unavailable). Free operations never return credit_check_unavailable.
504Source deadline exceeded (timeout, details.reason_code upstream_timeout).

Velden in data (200)

  • object string
    source_search
  • request_id string
    patroon ^req_[A-Za-z0-9]{24}$
  • mode string
    Een van: auto, explicit
  • results array<SourceSearchHit>
  • results[].source_id string
    Public source id from the Prudai source catalogue. max. lengte 80 · patroon ^[a-z0-9]+(-[a-z0-9]+)*$
  • results[].document_id string
    max. lengte 300
  • results[].title string
  • results[].url string (uri)
    kan null zijn
  • results[].identifiers DocumentIdentifiers
  • results[].identifiers.ecli string
    patroon ^ECLI:[A-Z]{2}:[A-Z0-9.]+:[0-9]{4}:[A-Z0-9.]+$ · kan null zijn
  • results[].identifiers.celex string
    max. lengte 40 · kan null zijn
  • results[].identifiers.other string
    Another stable identifier (e.g. a BWB id or Kamerstuk number). max. lengte 200 · kan null zijn
  • results[].date string (date)
    kan null zijn
  • results[].snippet string
    Verbatim excerpt; only for full_text sources, otherwise null. kan null zijn
  • results[].passages array<Passage>
    Verified passages in this document that bear on the query, in both auto and explicit mode: exact location (article, paragraph, legal consideration “r.o.”, section), verbatim quote and verified from the same citation check the chat API uses. For reference_only sources each passage has the location but quote: null.
  • results[].passages[].passage_id string
    Id of the passage within this response (referenced by claims[].passage_ids). max. lengte 100
  • results[].passages[].location PassageLocation
    Where in the document the passage sits.
  • results[].passages[].element_id string
    Element id from GET …/elements, when known. kan null zijn
  • results[].passages[].start_offset integer
    Start of the passage in the fetched text (UTF-16 code units, like url_citation); null for reference_only sources. min. 0 · kan null zijn
  • results[].passages[].end_offset integer
    min. 0 · kan null zijn
  • results[].passages[].validity 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 string
    Verbatim text of the passage. Null for reference_only sources. max. lengte 4000 · kan null zijn
  • results[].passages[].verified boolean
    True = the identifier and location were found in the source and, for a full_text source, the quote matches the retrieved text verbatim. False = the check failed; such passages are never used by POST /sources/answer.
  • results[].validity 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 boolean
    In force on the request’s as_of date (default today). kan null zijn
  • results[].validity.valid_from string (date)
    kan null zijn
  • results[].validity.valid_to string (date)
    Null while still in force, or when unknown. kan null zijn
  • results[].access string
    full_text, the licence permits redistribution (doorleveren: ja in Prudai’s licence register): search snippets and fetch are available. reference_only, metadata and a link to the publisher only. Een van: full_text, reference_only
  • results[].attribution string
    kan null zijn
  • has_more boolean
  • next_cursor string
    kan null zijn
  • facets object
    Present when facets was requested; one array of value counts per facet. kan null zijn
  • prudai SourcesPrudaiResult
  • prudai.request_id string
    patroon ^req_[A-Za-z0-9]{24}$
  • prudai.request_kind string
    Een van: search, routed_search, fetch, references, elements, verify_citations, source_answer
  • prudai.cost_credits number
    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 string
    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
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
}'
CLI (binnenkort)
prudai leo sources search