palbaseDocs

Palbase ai · API

POST/ai/workflows/runs/{run_id}/steps/{step_key}

Record or replay a memoized workflow step

Idempotently record a workflow step's output or return the previously memoized result when already completed.

Called by your server, with the project's secret key.

Path

run_idstring · requiredWorkflow run identifier
step_keystring · requiredDeterministic step key

Request body

kindstring · optional
statusstring · optional
inputobject · optional
outputobject · optional
errorstring · optional
sleep_secondsinteger · optional
timeout_secondsinteger · optional
match_topicstring · optional
match_filterobject · optional
approval_idstring · optional
curl
curl -X POST "https://<your-ref>.palbase.studio/ai/workflows/runs/<run_id>/steps/<step_key>" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"kind":"do","status":"string","input":{},"output":{},"error":"string","sleep_seconds":0,"timeout_seconds":0,"match_topic":"string","match_filter":{},"approval_id":"string"}'

Responses

200Memoized workflow step

400The request is malformed, or names what this module does not offer (the error names which)

401No valid credential

403A publishable key or a user's session: everything here is the project's server's, called with the secret key

404No such response, job or provider in this project

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation RecordWorkflowStep of ai's contract.