Skip to content

Prudai Developer API: modules

The operations of this part (Modules).

Base URL https://api.prudai.com/v1. Logging in is in Login, scopes in Scopes and permissions, errors in Errors. Overview.

MethodPathWhat it doesState
GET/v1/modulesList office modules and organization appsComing soon
POST/v1/modulesBuild a private module draftComing soon
POST/v1/modules/{id}/publishPublish an office moduleComing soon
POST/v1/modules/{id}/runsRun an accessible moduleComing soon

List office modules and organization apps

GET /v1/modules

Lists published workflow modules for the selected product plus IRMA, ORDO, VERA, ZIA and BEVER with effective enabled status. Workflow entries require the existing workflow capability; app entries remain visible without it. Product activation stays a request, never an entitlement change. ORDO has no chat product slug; its activation request uses the Console URL.

  • State: coming soon, not in production yet.
  • Scope: prudai:modules:read
  • Approval: none, no extra step.

Parameters

  • X-Product-Slug header · string
    Optional workflow product context; defaults to the first entitled chat product. Apps are always listed. One of: leo, leo-fiscaal, zia, vera, bever, irma, maia
  • limit query · integer
    default: 20 · min 1 · max 100
  • cursor query · string
    max length 200

Responses

StatusMeaning
200Requested data with completeness and follow-up actions.
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).
404Workflow, run or deliverable not found or inaccessible.
409State conflict, stale If-Match, or cancellation unavailable for the current run state.
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.
503Developer API or a required backing service is unavailable.
curl
curl -s "https://api.prudai.com/v1/modules" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo modules list

Build a private module draft

POST /v1/modules

Creates an own private module workflow through the existing builder validation. All step model tiers are standard or cheaper. Creating a private draft needs no approval; running spends credits and needs confirm, publication needs one Owner/Admin confirmation.

  • State: coming soon, not in production yet.
  • Scope: prudai:modules:write
  • Approval: none, no extra step.
  • Dry run: ?dryRun=true shows what would happen and stores nothing.
  • Idempotency: send Idempotency-Key; the same key with the same body does not run the action twice.

Parameters

  • X-Product-Slug header · string required
    Product context, checked against the current user and the workflow capability. One of: leo, leo-fiscaal, zia, vera, bever, irma, maia
  • dryRun query · string
    Validate and preview without changing definitions, enqueuing jobs or recording gate decisions. One of: true, false
  • Idempotency-Key header · string required
    Client-chosen key. Retry the same request safely; changed arguments with the same key are rejected. min length 8 · max length 255 · pattern ^[\x21-\x7E]+$

Body

JSON, required.

  • name string required
    max length 200
  • description string
    max length 2000 · may be null
  • graph WorkflowGraph required
  • graph.nodes array<object> required
  • graph.nodes[].id string required
    max length 128
  • graph.nodes[].type string required
    One of: input, persona, output, condition, hitl
  • graph.nodes[].label string required
    max length 300
  • graph.nodes[].prompt string
    max length 20000
  • graph.nodes[].artifact_ref WorkflowArtifactRef
    Exact immutable source version or expected current output version. Version zero denotes the historical empty baseline where supported.
  • graph.nodes[].condition object
  • graph.nodes[].hitl object
  • graph.nodes[].v1Execution string
    One of: noop-passthrough
  • graph.nodes[].description string
    max length 4000
  • graph.nodes[].presetId string
    max length 100
  • graph.nodes[].style string
    One of: onderzoekend, strategisch, adversarieel
  • graph.nodes[].modelTier string
    One of: mini, standard, pro
  • graph.nodes[].runWhenIntake object
  • graph.nodes[].machineTranslation object
  • graph.nodes[].documentPipeline object
  • graph.nodes[].slots object
  • graph.nodes[].statuteCheck boolean
  • graph.nodes[].inputSections array<object>
  • graph.nodes[].dossierTools boolean
  • graph.nodes[].promptAxes object
  • graph.nodes[].sourceIds array<string>
  • graph.nodes[].delivery array<object>
  • graph.nodes[].position object required
  • graph.edges array<object> required
  • graph.edges[].id string required
    max length 256
  • graph.edges[].source string required
    max length 128
  • graph.edges[].target string required
    max length 128
  • graph.edges[].branch string
    One of: ja, nee

Responses

StatusMeaning
200Idempotent replay or dry-run preview.
201Completed. With dryRun=true, returns a preview without side effects.
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).
404Workflow, run or deliverable not found or inaccessible.
409State conflict, stale If-Match, or cancellation unavailable for the current run state.
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.
503Developer API or a required backing service is unavailable.
curl
curl -s -X POST "https://api.prudai.com/v1/modules" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ ... }'
CLI (coming soon)
prudai leo modules create

Publish an office module

POST /v1/modules/{id}/publish

Requires one Owner/Admin confirmation through the existing approval service, including the creator when they hold that role. The recorded approval is the audit trail. Publishes the exact approved private module revision in the organization library; another organization cannot see it. A changed revision invalidates the grant.

  • State: coming soon, not in production yet.
  • Scope: prudai:modules:write
  • Approval: confirm, the user confirms exactly this call.
  • Dry run: ?dryRun=true shows what would happen and stores nothing.

Parameters

  • X-Product-Slug header · string required
    Product context, checked against the current user and the workflow capability. One of: leo, leo-fiscaal, zia, vera, bever, irma, maia
  • id path · string (uuid) required
  • dryRun query · string
    Validate and preview without changing definitions, enqueuing jobs or recording gate decisions. One of: true, false
  • x-prudai-approval header · string
    Approved one-use request id. Repeat the exact method, path, query and body. The grant is consumed before execution; obtain a new approval after a failed execution. Idempotency-Key is excluded from the approval fingerprint. pattern ^apr_[A-Za-z0-9]{24}$

Body

JSON, optional.

Responses

StatusMeaning
200Idempotent replay or dry-run preview.
202Waiting for human approval. Replay the exact request with its one-use approval grant.
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).
404Workflow, run or deliverable not found or inaccessible.
409State conflict, stale If-Match, or cancellation unavailable for the current run state.
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.
503Developer API or a required backing service is unavailable.
curl
curl -s -X POST "https://api.prudai.com/v1/modules/<id>/publish" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo" \
-H "Content-Type: application/json" \
-d '{}'
CLI (coming soon)
prudai leo modules publish

Run an accessible module

POST /v1/modules/{id}/runs

Starts an own private or published organization module as the signed-in person through the existing workflow engine and capability gates. Requires confirm approval because execution spends credits. The grant binds product, input, module version and exact revision.

  • State: coming soon, not in production yet.
  • Scope: prudai:modules:write
  • Approval: confirm, the user confirms exactly this call.
  • Dry run: ?dryRun=true shows what would happen and stores nothing.
  • Idempotency: send Idempotency-Key; the same key with the same body does not run the action twice.

Parameters

  • X-Product-Slug header · string required
    Product context, checked against the current user and the workflow capability. One of: leo, leo-fiscaal, zia, vera, bever, irma, maia
  • id path · string (uuid) required
  • dryRun query · string
    Validate and preview without changing definitions, enqueuing jobs or recording gate decisions. One of: true, false
  • x-prudai-approval header · string
    Approved one-use request id. Repeat the exact method, path, query and body. The grant is consumed before execution; obtain a new approval after a failed execution. Idempotency-Key is excluded from the approval fingerprint. pattern ^apr_[A-Za-z0-9]{24}$
  • Idempotency-Key header · string required
    Client-chosen key. Retry the same request safely; changed arguments with the same key are rejected. min length 8 · max length 255 · pattern ^[\x21-\x7E]+$

Body

JSON, required.

  • input object required
  • input.query string required
    max length 100000
  • input.projectId string (uuid)
  • input.documentIds array<string (uuid)>
  • input.artifact_ref WorkflowArtifactRef
    Exact immutable source version or expected current output version. Version zero denotes the historical empty baseline where supported.
  • input.artifact_ref.artifact_id string (uuid) required
  • input.artifact_ref.version integer required
    min 0
  • input.output_artifact_ref WorkflowArtifactRef
    Exact immutable source version or expected current output version. Version zero denotes the historical empty baseline where supported.
  • input.output_artifact_ref.artifact_id string (uuid) required
  • input.output_artifact_ref.version integer required
    min 0

Responses

StatusMeaning
200Idempotent replay or dry-run preview.
201Completed. With dryRun=true, returns a preview without side effects.
202Waiting for human approval. Replay the exact request with its one-use approval grant.
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).
404Workflow, run or deliverable not found or inaccessible.
409State conflict, stale If-Match, or cancellation unavailable for the current run state.
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.
503Developer API or a required backing service is unavailable.
curl
curl -s -X POST "https://api.prudai.com/v1/modules/<id>/runs" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"input": {
"query": "string",
"projectId": "00000000-0000-4000-8000-000000000000",
"documentIds": [
"00000000-0000-4000-8000-000000000000"
],
"artifact_ref": {
"artifact_id": "00000000-0000-4000-8000-000000000000",
"version": 1
},
"output_artifact_ref": {
"artifact_id": "00000000-0000-4000-8000-000000000000",
"version": 1
}
}
}'
CLI (coming soon)
prudai leo modules runs