Ga naar inhoud

Prudai Developer API: workflowuitvoeringen

Workflow runs, human gates and deliverables; personal tokens only. Starting or continuing a run spends credits.

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/artifacts/{id}/runsList workflow runs that produced an artifactBinnenkort
GET/v1/workflow-runsList the caller’s workflow runsBinnenkort
GET/v1/workflow-runs/{id}Get workflow status, steps and eventsBinnenkort
POST/v1/workflow-runs/{id}/cancelStop a workflow runBinnenkort
POST/v1/workflow-runs/{id}/continueContinue a resumable workflow runBinnenkort
GET/v1/workflow-runs/{id}/deliverablesList workflow run deliverablesBinnenkort
GET/v1/workflow-runs/{id}/deliverables/{deliverable_id}/downloadDownload a workflow deliverableBinnenkort
POST/v1/workflow-runs/{id}/gateAnswer a waiting human gateBinnenkort
GET/v1/workflow-runs/{id}/tablesList named tables produced by a workflow runBinnenkort
POST/v1/workflows/{id}/runsStart a workflow definition runBinnenkort
POST/v1/workflows/templates/{id}/runsStart a curated workflow template runBinnenkort

List workflow runs that produced an artifact

GET /v1/artifacts/{id}/runs

Returns metadata only after checking the artifact source access and the run owner. The exact total is unknown (completeness.total is null); next contains the next page when more rows exist. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

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

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
  • 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/artifacts/<id>/runs" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo"
CLI (binnenkort)
prudai leo artifacts runs
Antwoord 200
[
{
"run_id": "00000000-0000-4000-8000-000000000000",
"artifact_ref": {
"artifact_id": "00000000-0000-4000-8000-000000000000",
"version": 1
},
"created_at": "2026-11-05T09:30:00.000Z"
}
]

List the caller's workflow runs

GET /v1/workflow-runs

Only workflow runs are included. The existing app listing is capped; when the complete total is unknown completeness.total is null and notIncluded explains the source limit. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

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

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
  • projectId query · string (uuid)
  • status query · string
    max. lengte 80
  • 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/workflow-runs" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo"
CLI (binnenkort)
prudai leo workflow-runs list

Get workflow status, steps and events

GET /v1/workflow-runs/{id}

Returns the app run state including logs, progress, budget and any waiting gate. Once completed, next points to listWorkflowRunDeliverables. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

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

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

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.

Velden in data (200)

  • artifact_ref WorkflowArtifactRef
    Exact immutable source version or expected current output version. Version zero denotes the historical empty baseline where supported.
  • artifact_ref.artifact_id string (uuid)
  • artifact_ref.version integer
    min. 0
  • previousAttempt object
  • previousAttempt.status string
  • previousAttempt.finishedAt string
    kan null zijn
  • previousAttempt.archivedAt string
  • previousAttempt.result string
  • previousAttempt.error string
    kan null zijn
  • previousAttempt.deliverableCount number
  • jobId string
  • status string
  • topic string
  • createdAt string
  • projectId string
  • projectDocumentIds array<string>
  • documentMode string
    Een van: auto, selection, none
  • effectiveProjectDocumentIds array<string>
  • projectName string
  • logs array<object>
  • logs[].agent string
  • logs[].message string
  • logs[].timestamp string
  • result any
  • error string
    kan null zijn
  • warnings string
    kan null zijn
  • uiUrl string
  • meta object
  • documentScope object
  • queue object
  • queue.state string
  • queue.position number
    kan null zijn
  • queue.etaSeconds number
    kan null zijn
  • queue.reason string
    kan null zijn
  • queue.checkedAt string
    kan null zijn
  • budgetUsage object
  • progress object
  • budget object
  • budget.limits object
  • budget.limits.maxEstimatedTokens number

Deze lijst stopt na 40 velden.

curl
curl -s "https://api.prudai.com/v1/workflow-runs/<id>" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo"
CLI (binnenkort)
prudai leo workflow-runs get

Stop a workflow run

POST /v1/workflow-runs/{id}/cancel

Stops the caller’s own run. At a waiting human gate it submits the gate abort. A queued or running run is stopped cooperatively: no further step starts, the steps already in flight finish, and the run ends as aborted with everything that completed as partial result (the run history is kept, nothing is deleted); the response is status: stopping and getWorkflowRun shows aborted shortly after. A run that is still waiting in the queue (for example for capacity) starts no step at all: it ends as aborted with an empty partial result, without a model call and therefore without cost, as soon as it is picked up; until then getWorkflowRun still shows queued. A run that has already ended returns 409 workflow_cancel_unavailable. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:workflow_runs:write
  • Goedkeuring: none, geen extra stap.
  • 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

Body

JSON, verplicht.

Antwoorden

StatusBetekenis
200Completed. 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/workflow-runs/<id>/cancel" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo" \
-H "Content-Type: application/json" \
-d '{}'
CLI (binnenkort)
prudai leo workflow-runs cancel

Continue a resumable workflow run

POST /v1/workflow-runs/{id}/continue

Preserves completed steps and starts a fresh budget window through the existing app continuation service. The owner continues their own run directly, as in the app; the run budget still applies. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:workflow_runs:write
  • Goedkeuring: none, geen extra stap.
  • 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

Body

JSON, verplicht.

Antwoorden

StatusBetekenis
200Completed. 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/workflow-runs/<id>/continue" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo" \
-H "Content-Type: application/json" \
-d '{}'
CLI (binnenkort)
prudai leo workflow-runs continue

List workflow run deliverables

GET /v1/workflow-runs/{id}/deliverables

A run of your own without deliverables (yet) returns an empty list, not 404. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

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

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

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/workflow-runs/<id>/deliverables" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo"
CLI (binnenkort)
prudai leo workflow-runs-deliverables list

Download a workflow deliverable

GET /v1/workflow-runs/{id}/deliverables/{deliverable_id}/download

Returns the original rendered bytes with Content-Type and Content-Disposition, as in the app. This binary response is an explicit exception to the JSON envelope. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

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

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
  • deliverable_id path · string verplicht
    max. lengte 64
  • format query · string
    Een van: docx, csv, json, markdown

Antwoorden

StatusBetekenis
200The rendered deliverable.
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.

Formaat van het antwoord: application/vnd.openxmlformats-officedocument.wordprocessingml.document, text/csv, text/markdown.

curl
curl -s "https://api.prudai.com/v1/workflow-runs/<id>/deliverables/<deliverable_id>/download" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo"
CLI (binnenkort)
prudai leo workflow-runs-deliverables download
Antwoord 200
"string"

Answer a waiting human gate

POST /v1/workflow-runs/{id}/gate

Approve, request revision or abort the exact waiting node. Decisions use the existing decision-event record and run ownership checks. An abort is final: the response carries status aborted (the run ends with its partial result). Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:workflow_runs:write
  • Goedkeuring: none, geen extra stap.
  • 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

Body

JSON, verplicht.

  • nodeId string verplicht
    max. lengte 128
  • decision string verplicht
    Een van: approve, revise, abort
  • note string
    max. lengte 4000

Antwoorden

StatusBetekenis
200Completed. 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/workflow-runs/<id>/gate" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo" \
-H "Content-Type: application/json" \
-d '{
"nodeId": "string",
"decision": "approve",
"note": "string"
}'
CLI (binnenkort)
prudai leo workflow-runs gate

List named tables produced by a workflow run

GET /v1/workflow-runs/{id}/tables

Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

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

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

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/workflow-runs/<id>/tables" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo"
CLI (binnenkort)
prudai leo workflow-runs tables

Start a workflow definition run

POST /v1/workflows/{id}/runs

Starting spends credits and requires confirm approval. next points to getWorkflowRun. Per-run costs are not yet listed in /v1/usage (planned); the run budget is shown on getWorkflowRun. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:workflow_runs: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/workflows/<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 workflows runs

Start a curated workflow template run

POST /v1/workflows/templates/{id}/runs

Validates intake and selected sources through the same app service. Starting spends credits and requires confirm approval. next points to getWorkflowRun. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:workflow_runs: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 verplicht
    max. lengte 120 · patroon ^[a-z0-9]+(?:-[a-z0-9]+)*$
  • 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.

  • artifact_ref WorkflowArtifactRef
    Exact immutable source version or expected current output version. Version zero denotes the historical empty baseline where supported.
  • artifact_ref.artifact_id string (uuid) verplicht
  • artifact_ref.version integer verplicht
    min. 0
  • output_artifact_ref WorkflowArtifactRef
    Exact immutable source version or expected current output version. Version zero denotes the historical empty baseline where supported.
  • output_artifact_ref.artifact_id string (uuid) verplicht
  • output_artifact_ref.version integer verplicht
    min. 0
  • intake object
  • projectId string (uuid)
  • enabledSourceIds array<string>

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/workflows/templates/<id>/runs" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"artifact_ref": {
"artifact_id": "00000000-0000-4000-8000-000000000000",
"version": 1
},
"output_artifact_ref": {
"artifact_id": "00000000-0000-4000-8000-000000000000",
"version": 1
},
"intake": {},
"projectId": "00000000-0000-4000-8000-000000000000",
"enabledSourceIds": [
"string"
]
}'
CLI (binnenkort)
prudai leo workflows-templates runs