Ga naar inhoud

Prudai Developer API: kantoormodules

Private and published office modules and app availability; personal tokens only, following the existing app access and approval rules.

Basis-URL https://api.prudai.com/v1. Inloggen staat in Inloggen, scopes in Scopes en rechten, fouten in Fouten. Overzicht.

MethodePadWat het doetStand
GET/v1/modulesList office modules and organization appsBinnenkort
POST/v1/modulesBuild a private module draftBinnenkort
POST/v1/modules/{id}/publishPublish an office moduleBinnenkort
POST/v1/modules/{id}/runsRun an accessible moduleBinnenkort

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.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:modules:read
  • Goedkeuring: none, geen extra stap.

Parameters

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

Antwoorden

StatusBetekenis
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 (binnenkort)
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.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:modules:write
  • Goedkeuring: none, geen extra stap.
  • Dry run: ?dryRun=true laat zien wat er zou gebeuren en slaat niets op.
  • Idempotentie: stuur Idempotency-Key mee; dezelfde sleutel met dezelfde body voert de actie niet twee keer uit.

Parameters

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

Body

JSON, verplicht.

  • name string verplicht
    max. lengte 200
  • description string
    max. lengte 2000 · kan null zijn
  • graph WorkflowGraph verplicht
  • graph.nodes array<object> verplicht
  • graph.nodes[].id string verplicht
    max. lengte 128
  • graph.nodes[].type string verplicht
    Een van: input, persona, output, condition, hitl
  • graph.nodes[].label string verplicht
    max. lengte 300
  • graph.nodes[].prompt string
    max. lengte 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
    Een van: noop-passthrough
  • graph.nodes[].description string
    max. lengte 4000
  • graph.nodes[].presetId string
    max. lengte 100
  • graph.nodes[].style string
    Een van: onderzoekend, strategisch, adversarieel
  • graph.nodes[].modelTier string
    Een van: 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 verplicht
  • graph.edges array<object> verplicht
  • graph.edges[].id string verplicht
    max. lengte 256
  • graph.edges[].source string verplicht
    max. lengte 128
  • graph.edges[].target string verplicht
    max. lengte 128
  • graph.edges[].branch string
    Een van: ja, nee

Antwoorden

StatusBetekenis
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 (binnenkort)
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.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:modules:write
  • Goedkeuring: confirm, de gebruiker bevestigt precies deze aanroep.
  • Dry run: ?dryRun=true laat zien wat er zou gebeuren en slaat niets op.

Parameters

  • X-Product-Slug header · string verplicht
    Product context, checked against the current user and the workflow capability. Een van: leo, leo-fiscaal, zia, vera, bever, irma, maia
  • id path · string (uuid) verplicht
  • dryRun query · string
    Validate and preview without changing definitions, enqueuing jobs or recording gate decisions. Een van: 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. patroon ^apr_[A-Za-z0-9]{24}$

Body

JSON, optioneel.

Antwoorden

StatusBetekenis
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 (binnenkort)
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.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:modules:write
  • Goedkeuring: confirm, de gebruiker bevestigt precies deze aanroep.
  • Dry run: ?dryRun=true laat zien wat er zou gebeuren en slaat niets op.
  • Idempotentie: stuur Idempotency-Key mee; dezelfde sleutel met dezelfde body voert de actie niet twee keer uit.

Parameters

  • X-Product-Slug header · string verplicht
    Product context, checked against the current user and the workflow capability. Een van: leo, leo-fiscaal, zia, vera, bever, irma, maia
  • id path · string (uuid) verplicht
  • dryRun query · string
    Validate and preview without changing definitions, enqueuing jobs or recording gate decisions. Een van: 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. patroon ^apr_[A-Za-z0-9]{24}$
  • Idempotency-Key header · string verplicht
    Client-chosen key. Retry the same request safely; changed arguments with the same key are rejected. min. lengte 8 · max. lengte 255 · patroon ^[\x21-\x7E]+$

Body

JSON, verplicht.

  • input object verplicht
  • input.query string verplicht
    max. lengte 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) verplicht
  • input.artifact_ref.version integer verplicht
    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) verplicht
  • input.output_artifact_ref.version integer verplicht
    min. 0

Antwoorden

StatusBetekenis
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 (binnenkort)
prudai leo modules runs