OneOS Docs
Genesis 0.3.3 Console

API reference

Gears

Durable workflows: register workflows, start runs, signal them and read their history.

Operations
36
Base path
https://os.one.ml/api/v1/gears
Scopes
gears.operations.read gears.runs.read gears.runs.write gears.signals.write gears.workflows.read gears.workflows.write
API keys
21 tested with an API key
SDK
genesis.call('gears_listFlowRuns', …) · helpers under genesis.gears
CLI
genesis gears
MCP
36 tools

Operations

OperationEndpointAPI key
List your engine runs, oldest firstGET/flow-runs—
Start a run of one of your definitionsPOST/flow-runs—
Get one of your engine runs (status, steps, output)GET/flow-runs/{id}—
Cancel a run (leased work is asked to stop; the run ends when every step closed)POST/flow-runs/{id}/cancel—
The run's hash-chained event historyGET/flow-runs/{id}/history—
Append steps to a gears.dynamic/v1 run (seal = no more come)POST/flow-runs/{id}/steps—
List your workflow engine definitions (gears.flow/v1, gears.dynamic/v1)GET/flows—
Register a workflow engine definition (immutable per version)POST/flows—
Get one of your definitionsGET/flows/{workflow}/{version}—
Check a definition without registering itPOST/flows/validate—
Read meter, audit, evidence, replay and probe recordsGET/operations/recordsTested with an API key
List workflow runsGET/runsTested with an API key
Start a workflow runPOST/runsTested with an API key
Get a workflow runGET/runs/{id}Tested with an API key
Cancel a running workflow runPOST/runs/{id}/cancelTested with an API key
Start a child workflow run under a parent runPOST/runs/{id}/childrenTested with an API key
Register a compensation (saga undo step) on a runPOST/runs/{id}/compensationsTested with an API key
Run a run's registered compensations in reverse orderPOST/runs/{id}/compensations/rollbackTested with an API key
Complete a running workflow run with its outputPOST/runs/{id}/completeTested with an API key
Fail a running workflow run with its errorPOST/runs/{id}/failTested with an API key
Read a run's journal historyGET/runs/{id}/historyTested with an API key
Resume a run by replaying its Flowers executionPOST/runs/{id}/resumeTested with an API key
Schedule a retry of a run stepPOST/runs/{id}/retriesTested with an API key
Execute a scheduled retry attempt and record its outcomePOST/runs/{id}/retries/{stepId}/{attempt}/executeTested with an API key
Send a signal to a running workflowPOST/runs/{id}/signalsTested with an API key
Record the Lanes and Stations references a run step composedPOST/runs/{id}/step-refsTested with an API key
Start a durable timer on a runPOST/runs/{id}/timersTested with an API key
Describe the Flowers durable runtime behind GearsGET/runtime/flowersTested with an API key
Report that the attempt you hold succeededPOST/tasks/{id}/complete—
Report that the attempt you hold failed (code `cancelled` after a cancel request)POST/tasks/{id}/fail—
Extend a lease you hold; answers whether the run asked you to stopPOST/tasks/{id}/heartbeat—
Take tasks from one of your queues (long poll up to 20 s)POST/tasks/poll—
List registered workflow definitionsGET/workflowsTested with an API key
Register a workflow definitionPOST/workflowsTested with an API key
Get a workflow definitionGET/workflows/{id}Tested with an API key
Delete (archive) a workflowDELETE/workflows/{id}—

Flow runs

List your engine runs, oldest first

GET/v1/gears/flow-runs

gears_listFlowRuns

Parameters

  • limitquery · integer
  • afterquery · string

Responses

  • 200A page of your runs
    Response fields
    • runsobject[]
    • runs[].[].run_idstring
    • runs[].[].workflowstring
    • runs[].[].versionstring
    • runs[].[].status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"
    • runs[].[].ownerstring
    • runs[].[].stepsobject[]
    • runs[].[].outputobject
    • runs[].[].errorobject
    • next_afterstring | null
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/flow-runs" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Start a run of one of your definitions

POST/v1/gears/flow-runs

Idempotency-Key optionalgears_startFlowRun

Parameters

  • Idempotency-Keyheader · string

    Optional; when present, retries with the same key return the original result instead of acting twice

Request body application/json

  • workflowstringrequired
  • versionstringrequired
  • inputobject

    The run input (at most 256 KiB; pass refs for content)

Responses

  • 200Replayed for the same Idempotency-Key and body
    Response fields
    • runobject
    • run.run_idstring
    • run.workflowstring
    • run.versionstring
    • run.status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"
    • run.ownerstring
    • run.stepsobject[]
    • run.outputobject
    • run.errorobject
    • createdboolean
  • 201Started
    Response fields
    • runobject
    • run.run_idstring
    • run.workflowstring
    • run.versionstring
    • run.status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"
    • run.ownerstring
    • run.stepsobject[]
    • run.outputobject
    • run.errorobject
    • createdboolean
  • 404workflow_not_found
  • 409idempotency_key_reused
  • 429owner_runs_limit
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/flow-runs" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflow": "string",
    "version": "string"
  }'

Get one of your engine runs (status, steps, output)

GET/v1/gears/flow-runs/{id}

gears_getFlowRun

Parameters

  • idpath · stringrequired

Responses

  • 200The run
    Response fields
    • runobject
    • run.run_idstring
    • run.workflowstring
    • run.versionstring
    • run.status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"
    • run.ownerstring
    • run.stepsobject[]
    • run.outputobject
    • run.errorobject
    • createdboolean
  • 404run_not_found (also for another principal's run)
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/flow-runs/$ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Cancel

Cancel a run (leased work is asked to stop; the run ends when every step closed)

POST/v1/gears/flow-runs/{id}/cancel

gears_cancelFlowRun

Parameters

  • idpath · stringrequired

Request body application/json

  • reasonstring

    max length 512

Responses

  • 200The run (cancelling or cancelled)
    Response fields
    • runobject
    • run.run_idstring
    • run.workflowstring
    • run.versionstring
    • run.status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"
    • run.ownerstring
    • run.stepsobject[]
    • run.outputobject
    • run.errorobject
    • createdboolean
  • 409run_closed
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/flow-runs/$ID/cancel" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Cancel a running workflow run

POST/v1/gears/runs/{id}/cancel

Tested with an API keyIdempotency-Key optionalgears_cancelRun

Takes no body. The run must still be Running; with an Idempotency-Key a retry returns the cancelled run. A run with no Flowers execution is cancelled in Gears alone. Running children are then handled by their closePolicy.

Parameters

  • idpath · stringrequired
  • Idempotency-Keyheader · string

    Optional; when present, retries with the same key return the original result instead of acting twice

Responses

  • 200Run cancelled
    Response fields
    • idstringrequired
    • scopeobject
    • scope.platformIdstring
    • scope.organizationIdstring
    • scope.workspaceIdstring
    • scope.projectIdstring
    • scope.environmentIdstring
    • workflowIdstringrequired
    • workflowVersionstringrequired
    • status"Running" | "Succeeded" | "Failed" | "Cancelled"required
    • actorIdstringrequired
    • inputRefstringrequired
    • contextFrameIdstring | null
    • stationSessionIdstring | null
    • createdAtstring | null (date-time)

      When the run was submitted (runs start Running on submission), RFC 3339 UTC. null when not recorded (runs from before 23 Nov 2026 that came through the 4 Nov store import).

    • updatedAtstring | null (date-time)

      Last change to the run, RFC 3339 UTC. null when not recorded.

    • finishedAtstring | null (date-time)

      When the run reached its terminal status, RFC 3339 UTC. null while Running or when not recorded.

  • 403gears.runs.write required
  • 404Not found in your scope
  • 409Run is already terminal
  • 502The Flowers runtime could not cancel the execution
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/cancel" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY"

History

The run's hash-chained event history

GET/v1/gears/flow-runs/{id}/history

gears_getFlowRunHistory

Parameters

  • idpath · stringrequired

Responses

  • 200History
    Response fields
    • run_idstring
    • chain_verifiedboolean
    • eventsobject[]
  • 404run_not_found
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/flow-runs/$ID/history" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Read a run's journal history

GET/v1/gears/runs/{id}/history

gears.runs.readTested with an API keygears_getRunHistory

Parameters

  • idpath · stringrequired

Responses

  • 200Journal entries in sequence order
    Response fields
    • sequenceintegerrequired
    • runIdstringrequired
    • kindstringrequired
    • actorIdstring
    • detailRefstring | null
  • 404Not found in your scope
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/runs/$ID/history" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Steps

Append steps to a gears.dynamic/v1 run (seal = no more come)

POST/v1/gears/flow-runs/{id}/steps

gears_appendFlowRunSteps

Parameters

  • idpath · stringrequired

Request body application/json

  • stepsobject[]
  • sealboolean

Responses

  • 200The run
    Response fields
    • runobject
    • run.run_idstring
    • run.workflowstring
    • run.versionstring
    • run.status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"
    • run.ownerstring
    • run.stepsobject[]
    • run.outputobject
    • run.errorobject
    • createdboolean
  • 409not_dynamic, run_sealed or run_closed
  • 422invalid_definition
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/flow-runs/$ID/steps" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Flows

List your workflow engine definitions (gears.flow/v1, gears.dynamic/v1)

GET/v1/gears/flows

gears_listFlows

Responses

  • 200Your definitions in this scope
    Response fields
    • flowsobject[]
    • flows[].[].workflowstring
    • flows[].[].versionstring
    • flows[].[].formatstring
    • flows[].[].digeststring
    • flows[].[].ownerstring
    • flows[].[].deprecatedboolean
    • flows[].[].stepsinteger
    • flows[].[].documentobject
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/flows" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Register a workflow engine definition (immutable per version)

POST/v1/gears/flows

gears_registerFlow

Request body application/json

  • format"gears.flow/v1" | "gears.dynamic/v1"required
  • workflowstringrequired
  • versionstringrequired
  • stepsobject[]

Responses

  • 200The same document was already registered
    Response fields
    • flowobject
    • flow.workflowstring
    • flow.versionstring
    • flow.formatstring
    • flow.digeststring
    • flow.ownerstring
    • flow.deprecatedboolean
    • flow.stepsinteger
    • flow.documentobject
    • createdboolean
  • 201Registered
    Response fields
    • flowobject
    • flow.workflowstring
    • flow.versionstring
    • flow.formatstring
    • flow.digeststring
    • flow.ownerstring
    • flow.deprecatedboolean
    • flow.stepsinteger
    • flow.documentobject
    • createdboolean
  • 409version_exists (same version, different document)
  • 422invalid_definition; every problem is listed
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/flows" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "format": "gears.flow/v1",
    "workflow": "string",
    "version": "string"
  }'

Get one of your definitions

GET/v1/gears/flows/{workflow}/{version}

gears_getFlow

Parameters

  • versionpath · stringrequired
  • workflowpath · stringrequired

Responses

  • 200The definition
    Response fields
    • flowobject
    • flow.workflowstring
    • flow.versionstring
    • flow.formatstring
    • flow.digeststring
    • flow.ownerstring
    • flow.deprecatedboolean
    • flow.stepsinteger
    • flow.documentobject
  • 404workflow_not_found
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/flows/$WORKFLOW/$VERSION" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Check a definition without registering it

POST/v1/gears/flows/validate

gears_validateFlow

Request body application/json

  • format"gears.flow/v1" | "gears.dynamic/v1"required
  • workflowstringrequired
  • versionstringrequired
  • stepsobject[]

Responses

  • 200Validation result
    Response fields
    • validboolean
    • digeststring
    • stepsinteger
    • problemsobject[]
    • problems[].[].pathstring
    • problems[].[].codestring
    • problems[].[].messagestring
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/flows/validate" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "format": "gears.flow/v1",
    "workflow": "string",
    "version": "string"
  }'

Operations

Read meter, audit, evidence, replay and probe records

GET/v1/gears/operations/records

gears.operations.readTested with an API keygears_listOperationalRecords

Responses

  • 200Operational records for your scope
    Response fields
    • meterRecordsobject[]
    • meterRecords[].[].productstring
    • meterRecords[].[].gardenMeterstring
    • meterRecords[].[].quantitynumber
    • meterRecords[].[].scopeKeystring
    • auditRecordsobject[]
    • auditRecords[].[].productstring
    • auditRecords[].[].auditActionstring
    • auditRecords[].[].actorIdstring
    • auditRecords[].[].targetRefstring
    • evidenceRecordsobject[]
    • evidenceRecords[].[].productstring
    • evidenceRecords[].[].evidenceRefstring
    • evidenceRecords[].[].evidenceKindstring
    • replayEvidenceobject[]
    • replayEvidence[].[].productstring
    • replayEvidence[].[].replayEnginestring
    • replayEvidence[].[].runIdstring
    • replayEvidence[].[].journalSequenceinteger
    • replayEvidence[].[].evidenceRefstring
    • probeEventsobject[]
    • probeEvents[].[].productstring
    • probeEvents[].[].eventTypestring
    • probeEvents[].[].actorIdstring
    • probeEvents[].[].targetRefstring
  • 403gears.operations.read or gears.audit.read required
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/operations/records" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Runs

List workflow runs

GET/v1/gears/runs

gears.runs.readTested with an API keygears_listRuns

Responses

  • 200Runs in your scope
    Response fields
    • idstringrequired
    • scopeobject
    • scope.platformIdstring
    • scope.organizationIdstring
    • scope.workspaceIdstring
    • scope.projectIdstring
    • scope.environmentIdstring
    • workflowIdstringrequired
    • workflowVersionstringrequired
    • status"Running" | "Succeeded" | "Failed" | "Cancelled"required
    • actorIdstringrequired
    • inputRefstringrequired
    • contextFrameIdstring | null
    • stationSessionIdstring | null
    • createdAtstring | null (date-time)

      When the run was submitted (runs start Running on submission), RFC 3339 UTC. null when not recorded (runs from before 23 Nov 2026 that came through the 4 Nov store import).

    • updatedAtstring | null (date-time)

      Last change to the run, RFC 3339 UTC. null when not recorded.

    • finishedAtstring | null (date-time)

      When the run reached its terminal status, RFC 3339 UTC. null while Running or when not recorded.

  • 403gears.runs.read required
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/runs" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Start a workflow run

POST/v1/gears/runs

gears.runs.writeTested with an API keyIdempotency-Key optionalgears_startRun

Parameters

  • Idempotency-Keyheader · string

    Optional; when present, retries with the same key return the original result instead of acting twice

Request body application/json

  • workflowIdstringrequired
  • workflowVersionstringrequired
  • actorIdstringrequired
  • inputRefstringrequired

    Reference to the run input

  • contextFrameIdstring
  • stationSessionIdstring

Responses

  • 201Run started
    Response fields
    • idstringrequired
    • scopeobject
    • scope.platformIdstring
    • scope.organizationIdstring
    • scope.workspaceIdstring
    • scope.projectIdstring
    • scope.environmentIdstring
    • workflowIdstringrequired
    • workflowVersionstringrequired
    • status"Running" | "Succeeded" | "Failed" | "Cancelled"required
    • actorIdstringrequired
    • inputRefstringrequired
    • contextFrameIdstring | null
    • stationSessionIdstring | null
    • createdAtstring | null (date-time)

      When the run was submitted (runs start Running on submission), RFC 3339 UTC. null when not recorded (runs from before 23 Nov 2026 that came through the 4 Nov store import).

    • updatedAtstring | null (date-time)

      Last change to the run, RFC 3339 UTC. null when not recorded.

    • finishedAtstring | null (date-time)

      When the run reached its terminal status, RFC 3339 UTC. null while Running or when not recorded.

  • 400Invalid body
  • 403gears.runs.write required
  • 404Workflow not found in your scope
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflowId": "string",
    "workflowVersion": "string",
    "actorId": "string",
    "inputRef": "string"
  }'

Get a workflow run

GET/v1/gears/runs/{id}

gears.runs.readTested with an API keygears_getRun

Parameters

  • idpath · stringrequired

Responses

  • 200Run
    Response fields
    • idstringrequired
    • scopeobject
    • scope.platformIdstring
    • scope.organizationIdstring
    • scope.workspaceIdstring
    • scope.projectIdstring
    • scope.environmentIdstring
    • workflowIdstringrequired
    • workflowVersionstringrequired
    • status"Running" | "Succeeded" | "Failed" | "Cancelled"required
    • actorIdstringrequired
    • inputRefstringrequired
    • contextFrameIdstring | null
    • stationSessionIdstring | null
    • createdAtstring | null (date-time)

      When the run was submitted (runs start Running on submission), RFC 3339 UTC. null when not recorded (runs from before 23 Nov 2026 that came through the 4 Nov store import).

    • updatedAtstring | null (date-time)

      Last change to the run, RFC 3339 UTC. null when not recorded.

    • finishedAtstring | null (date-time)

      When the run reached its terminal status, RFC 3339 UTC. null while Running or when not recorded.

  • 404Not found in your scope
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/runs/$ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Children

Start a child workflow run under a parent run

POST/v1/gears/runs/{id}/children

Tested with an API keygears_startChildRun

Does not read an Idempotency-Key.

Parameters

  • idpath · stringrequired

Request body application/json

  • workflowIdstringrequired
  • workflowVersionstringrequired
  • actorIdstringrequired
  • inputRefstringrequired

    Reference to the child run input

  • contextFrameIdstring
  • stationSessionIdstring
  • closePolicy"terminate_on_parent_complete" | "abandon_on_parent_complete" | "wait_for_completion"required

    What happens to the child when the parent run ends. terminate_on_parent_complete cancels the child if it is still running when the parent completes, fails or is cancelled. abandon_on_parent_complete lets the child keep running. wait_for_completion refuses to complete the parent (409) while the child is running, and cancels the child if the parent fails or is cancelled. Any other value is rejected with 422 before a child run is recorded.

Responses

  • 201Child run started
    Response fields
    • parentRunIdstringrequired
    • childRunIdstringrequired
    • workflowIdstringrequired
    • workflowVersionstringrequired
    • actorIdstringrequired
    • inputRefstringrequired
    • closePolicy"terminate_on_parent_complete" | "abandon_on_parent_complete" | "wait_for_completion"required

      What happens to the child when the parent run ends. terminate_on_parent_complete cancels the child if it is still running when the parent completes, fails or is cancelled. abandon_on_parent_complete lets the child keep running. wait_for_completion refuses to complete the parent (409) while the child is running, and cancels the child if the parent fails or is cancelled. Any other value is rejected with 422 before a child run is recorded.

    • childRunRefstringrequired
    • childExecutionRefstringrequired
    • statusstringrequired
  • 400Invalid body
  • 403gears.runs.write required
  • 404Parent run or workflow not found in your scope
  • 409Parent run is already terminal
  • 422closePolicy is not one of the ChildClosePolicy values; the error lists the allowed values
  • 502The Flowers runtime could not spawn the child; the child run is recorded as Failed, never left Running
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/children" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflowId": "string",
    "workflowVersion": "string",
    "actorId": "string",
    "inputRef": "string",
    "closePolicy": "terminate_on_parent_complete"
  }'

Compensations

Register a compensation (saga undo step) on a run

POST/v1/gears/runs/{id}/compensations

Tested with an API keygears_registerCompensation

Does not read an Idempotency-Key.

Parameters

  • idpath · stringrequired

Request body application/json

  • namestringrequired
  • actionRefstringrequired

    Reference to the undo action

  • payloadRefstringrequired
  • actorIdstringrequired

Responses

  • 201Compensation registered
    Response fields
    • runIdstringrequired
    • namestringrequired
    • actionRefstringrequired
    • payloadRefstringrequired
    • actorIdstringrequired
    • stackIndexintegerrequired
    • compensationRefstringrequired
    • statusstringrequired
  • 400Invalid body
  • 403gears.runs.write required
  • 404Not found in your scope
  • 502The Flowers runtime could not register the compensation
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/compensations" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "actionRef": "string",
    "payloadRef": "string",
    "actorId": "string"
  }'

Run a run's registered compensations in reverse order

POST/v1/gears/runs/{id}/compensations/rollback

Tested with an API keygears_rollbackCompensations

Does not read an Idempotency-Key.

Parameters

  • idpath · stringrequired

Request body application/json

  • actorIdstringrequired

Responses

  • 200Rollback results
    Response fields
    • runIdstringrequired
    • actorIdstringrequired
    • resultsobject[]required
    • results[].[].namestringrequired
    • results[].[].stackIndexintegerrequired
    • results[].[].successbooleanrequired
    • results[].[].attemptsintegerrequired
    • results[].[].compensationRefstringrequired
    • results[].[].errorstring | null
  • 400Invalid body
  • 403gears.runs.write required
  • 404Not found in your scope
  • 502The Flowers runtime could not roll back
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/compensations/rollback" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "actorId": "string"
  }'

Complete

Complete a running workflow run with its output

POST/v1/gears/runs/{id}/complete

Tested with an API keyIdempotency-Key optionalgears_completeRun

Running children are then handled by their closePolicy.

Parameters

  • idpath · stringrequired
  • Idempotency-Keyheader · string

    Optional; when present, retries with the same key return the original result instead of acting twice

Request body application/json

  • actorIdstringrequired
  • outputRefstringrequired

    Reference to the run output

Responses

  • 200Run succeeded
    Response fields
    • idstringrequired
    • scopeobject
    • scope.platformIdstring
    • scope.organizationIdstring
    • scope.workspaceIdstring
    • scope.projectIdstring
    • scope.environmentIdstring
    • workflowIdstringrequired
    • workflowVersionstringrequired
    • status"Running" | "Succeeded" | "Failed" | "Cancelled"required
    • actorIdstringrequired
    • inputRefstringrequired
    • contextFrameIdstring | null
    • stationSessionIdstring | null
    • createdAtstring | null (date-time)

      When the run was submitted (runs start Running on submission), RFC 3339 UTC. null when not recorded (runs from before 23 Nov 2026 that came through the 4 Nov store import).

    • updatedAtstring | null (date-time)

      Last change to the run, RFC 3339 UTC. null when not recorded.

    • finishedAtstring | null (date-time)

      When the run reached its terminal status, RFC 3339 UTC. null while Running or when not recorded.

  • 400Invalid body
  • 403gears.runs.write required
  • 404Not found in your scope
  • 409Run is already terminal, or a wait_for_completion child is still running
  • 502The Flowers runtime could not complete the execution
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/complete" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "actorId": "string",
    "outputRef": "string"
  }'

Report that the attempt you hold succeeded

POST/v1/gears/tasks/{id}/complete

gears_completeTask

Parameters

  • idpath · stringrequired

Request body application/json

  • lease_nointegerrequired
  • outputobject

Responses

  • 200The run
    Response fields
    • runobject
    • run.run_idstring
    • run.workflowstring
    • run.versionstring
    • run.status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"
    • run.ownerstring
    • run.stepsobject[]
    • run.outputobject
    • run.errorobject
    • createdboolean
  • 409lease_lost
  • 413output_too_large (16 KiB; return refs)
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/tasks/$ID/complete" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lease_no": 1
  }'

Fail

Fail a running workflow run with its error

POST/v1/gears/runs/{id}/fail

Tested with an API keyIdempotency-Key optionalgears_failRun

A run with no Flowers execution is failed in Gears alone. Running children are then handled by their closePolicy.

Parameters

  • idpath · stringrequired
  • Idempotency-Keyheader · string

    Optional; when present, retries with the same key return the original result instead of acting twice

Request body application/json

  • actorIdstringrequired
  • errorRefstringrequired

    Reference to the run error

Responses

  • 200Run failed
    Response fields
    • idstringrequired
    • scopeobject
    • scope.platformIdstring
    • scope.organizationIdstring
    • scope.workspaceIdstring
    • scope.projectIdstring
    • scope.environmentIdstring
    • workflowIdstringrequired
    • workflowVersionstringrequired
    • status"Running" | "Succeeded" | "Failed" | "Cancelled"required
    • actorIdstringrequired
    • inputRefstringrequired
    • contextFrameIdstring | null
    • stationSessionIdstring | null
    • createdAtstring | null (date-time)

      When the run was submitted (runs start Running on submission), RFC 3339 UTC. null when not recorded (runs from before 23 Nov 2026 that came through the 4 Nov store import).

    • updatedAtstring | null (date-time)

      Last change to the run, RFC 3339 UTC. null when not recorded.

    • finishedAtstring | null (date-time)

      When the run reached its terminal status, RFC 3339 UTC. null while Running or when not recorded.

  • 400Invalid body
  • 403gears.runs.write required
  • 404Not found in your scope
  • 409Run is already terminal
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/fail" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "actorId": "string",
    "errorRef": "string"
  }'

Report that the attempt you hold failed (code `cancelled` after a cancel request)

POST/v1/gears/tasks/{id}/fail

gears_failTask

Parameters

  • idpath · stringrequired

Request body application/json

  • lease_nointegerrequired
  • errorobjectrequired
  • error.codestringrequired

    max length 64

  • error.messagestringrequired

    max length 1024

  • error.retryableboolean

Responses

  • 200The run
    Response fields
    • runobject
    • run.run_idstring
    • run.workflowstring
    • run.versionstring
    • run.status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"
    • run.ownerstring
    • run.stepsobject[]
    • run.outputobject
    • run.errorobject
    • createdboolean
  • 409lease_lost
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/tasks/$ID/fail" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lease_no": 1,
    "error": {
      "code": "string",
      "message": "string"
    }
  }'

Resume

Resume a run by replaying its Flowers execution

POST/v1/gears/runs/{id}/resume

Tested with an API keygears_resumeRun

Takes no body and does not read an Idempotency-Key.

Parameters

  • idpath · stringrequired

Responses

  • 200Run resumed
    Response fields
    • idstringrequired
    • scopeobject
    • scope.platformIdstring
    • scope.organizationIdstring
    • scope.workspaceIdstring
    • scope.projectIdstring
    • scope.environmentIdstring
    • workflowIdstringrequired
    • workflowVersionstringrequired
    • status"Running" | "Succeeded" | "Failed" | "Cancelled"required
    • actorIdstringrequired
    • inputRefstringrequired
    • contextFrameIdstring | null
    • stationSessionIdstring | null
    • createdAtstring | null (date-time)

      When the run was submitted (runs start Running on submission), RFC 3339 UTC. null when not recorded (runs from before 23 Nov 2026 that came through the 4 Nov store import).

    • updatedAtstring | null (date-time)

      Last change to the run, RFC 3339 UTC. null when not recorded.

    • finishedAtstring | null (date-time)

      When the run reached its terminal status, RFC 3339 UTC. null while Running or when not recorded.

  • 403gears.runs.write required
  • 404Not found in your scope
  • 409Run is already terminal (a finished run has nothing to resume)
  • 502The Flowers runtime could not replay the execution
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/resume" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Retries

Schedule a retry of a run step

POST/v1/gears/runs/{id}/retries

Tested with an API keyIdempotency-Key optionalgears_scheduleRetry

Parameters

  • idpath · stringrequired
  • Idempotency-Keyheader · string

    Optional; when present, retries with the same key return the original result instead of acting twice

Request body application/json

  • stepIdstringrequired
  • attemptintegerrequired

    min 0 · max 4294967295

  • maxAttemptsintegerrequired

    min 0 · max 4294967295

  • backoffMsintegerrequired

    min 0

  • reasonRefstringrequired
  • actorIdstringrequired

Responses

  • 202Retry scheduled
    Response fields
    • runIdstringrequired
    • stepIdstringrequired
    • attemptintegerrequired
    • maxAttemptsintegerrequired
    • backoffMsintegerrequired
    • reasonRefstringrequired
    • actorIdstringrequired
    • retryRefstringrequired
    • statusstringrequired
    • journalSequenceintegerrequired
  • 400Invalid body
  • 403gears.runs.write required
  • 404Not found in your scope
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/retries" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "stepId": "string",
    "attempt": 0,
    "maxAttempts": 0,
    "backoffMs": 0,
    "reasonRef": "string",
    "actorId": "string"
  }'

Execute a scheduled retry attempt and record its outcome

POST/v1/gears/runs/{id}/retries/{stepId}/{attempt}/execute

Tested with an API keyIdempotency-Key optionalgears_executeRetry

Send exactly one of outputRef or errorRef.

Parameters

  • attemptpath · stringrequired
  • stepIdpath · stringrequired
  • idpath · stringrequired
  • Idempotency-Keyheader · string

    Optional; when present, retries with the same key return the original result instead of acting twice

Request body application/json

  • actorIdstringrequired
  • outputRefstring

    Output of a successful attempt (exactly one of outputRef and errorRef)

  • errorRefstring

    Error of a failed attempt (exactly one of outputRef and errorRef)

Responses

  • 200Retry attempt recorded, with its outputRef or errorRef
    Response fields
    • runIdstring
    • stepIdstring
    • attemptinteger
    • status"completed" | "failed"
    • outputRefstring | null

      Set when the attempt worked

    • errorRefstring | null

      Set when the attempt failed

    • journalobject

      The journal entry the attempt was recorded as

  • 400Invalid body, attempt, or not exactly one of outputRef and errorRef
  • 403gears.runs.write required
  • 404Not found in your scope
  • 502The Flowers runtime could not execute the retry
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/retries/$STEP_ID/$ATTEMPT/execute" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "actorId": "string"
  }'

Signals

Send a signal to a running workflow

POST/v1/gears/runs/{id}/signals

gears.signals.writeTested with an API keyIdempotency-Key optionalgears_signalRun

Parameters

  • idpath · stringrequired
  • Idempotency-Keyheader · string

    Optional; when present, retries with the same key return the original result instead of acting twice

Request body application/json

  • namestringrequired
  • payloadRefstringrequired
  • actorIdstringrequired

Responses

  • 202Signal accepted
    Response fields

    A JSON object.

  • 403gears.signals.write required
  • 404Not found in your scope
  • 409Run is already terminal
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/signals" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "payloadRef": "string",
    "actorId": "string"
  }'

Step refs

Record the Lanes and Stations references a run step composed

POST/v1/gears/runs/{id}/step-refs

Tested with an API keyIdempotency-Key optionalgears_recordStepRefs

Parameters

  • idpath · stringrequired
  • Idempotency-Keyheader · string

    Optional; when present, retries with the same key return the original result instead of acting twice

Request body application/json

  • stepIdstringrequired
  • actorIdstringrequired
  • lanesContextFrameRefstring
  • stationsMachineStepRefstring

Responses

  • 202Step references recorded
    Response fields

    A JSON object.

  • 400Invalid body
  • 403gears.runs.write required
  • 404Not found in your scope
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/step-refs" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "stepId": "string",
    "actorId": "string"
  }'

Timers

Start a durable timer on a run

POST/v1/gears/runs/{id}/timers

Tested with an API keyIdempotency-Key optionalgears_startTimer

Parameters

  • idpath · stringrequired
  • Idempotency-Keyheader · string

    Optional; when present, retries with the same key return the original result instead of acting twice

Request body application/json

  • durationMsintegerrequired

    min 0

  • actorIdstringrequired

Responses

  • 201Timer started
    Response fields
    • timerIdstringrequired
    • runIdstringrequired
    • actorIdstringrequired
    • durationMsintegerrequired
    • timerRefstringrequired
    • statusstringrequired
  • 400Invalid body
  • 403gears.runs.write required
  • 404Not found in your scope
  • 502The Flowers runtime could not start the timer
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/timers" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "durationMs": 0,
    "actorId": "string"
  }'

Runtime

Describe the Flowers durable runtime behind Gears

GET/v1/gears/runtime/flowers

Tested with an API keygears_getRuntime

Responses

  • 200Flowers runtime contract
    Response fields
    • engineIdstring
    • runtimeTypestring
    • configTypestring
    • executionContextTypestring
    • workflowHandlerTraitstring
    • defaultDispatchModestring
    • durablePrimitivesstring[]
  • 400Tenant scope is incomplete
  • 403gears.runs.read required
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/runtime/flowers" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Heartbeat

Extend a lease you hold; answers whether the run asked you to stop

POST/v1/gears/tasks/{id}/heartbeat

gears_heartbeatTask

Parameters

  • idpath · stringrequired

Request body application/json

  • lease_nointegerrequired
  • progressobject

Responses

  • 200The new lease end
    Response fields
    • lease_until_msinteger
    • cancel_requestedboolean
  • 409lease_lost
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/tasks/$ID/heartbeat" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lease_no": 1
  }'

Tasks

Take tasks from one of your queues (long poll up to 20 s)

POST/v1/gears/tasks/poll

gears_pollTasks

Request body application/json

  • queuestringrequired

    1-4 /-separated segments; your own queue

  • holderstringrequired

    This worker instance (1-128 bytes)

  • maxinteger

    min 1 · max 32

  • wait_msinteger

    min 0 · max 20000

Responses

  • 200Leased tasks (possibly none)
    Response fields
    • tasksobject[]
    • tasks[].[].task_idstring
    • tasks[].[].lease_nointeger
    • tasks[].[].lease_until_msinteger
    • tasks[].[].run_idstring
    • tasks[].[].stepstring
    • tasks[].[].attemptinteger
    • tasks[].[].kindstring
    • tasks[].[].queuestring
    • tasks[].[].inputobject
    • tasks[].[].contextobject
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/tasks/poll" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "queue": "string",
    "holder": "string"
  }'

Workflows

List registered workflow definitions

GET/v1/gears/workflows

gears.workflows.readTested with an API keygears_listWorkflows

Responses

  • 200Workflow definitions in your scope
    Response fields
    • scopeobject
    • scope.platformIdstring
    • scope.organizationIdstring
    • scope.workspaceIdstring
    • scope.projectIdstring
    • scope.environmentIdstring
    • workflowIdstringrequired
    • workflowVersionstringrequired
    • namestringrequired
    • definitionRefstringrequired
    • registeredBystringrequired
  • 403gears.workflows.read required
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/workflows" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Register a workflow definition

POST/v1/gears/workflows

gears.workflows.writeTested with an API keyIdempotency-Key optionalgears_registerWorkflow

Parameters

  • Idempotency-Keyheader · string

    Optional; when present, retries with the same key return the original result instead of acting twice

Request body application/json

  • workflowIdstringrequired
  • workflowVersionstringrequired
  • namestringrequired
  • definitionRefstringrequired

    Reference to the stored workflow definition

  • registeredBystringrequired

    Actor registering the definition

Responses

  • 201Workflow registered
    Response fields
    • scopeobject
    • scope.platformIdstring
    • scope.organizationIdstring
    • scope.workspaceIdstring
    • scope.projectIdstring
    • scope.environmentIdstring
    • workflowIdstringrequired
    • workflowVersionstringrequired
    • namestringrequired
    • definitionRefstringrequired
    • registeredBystringrequired
  • 400Invalid body
  • 403gears.workflows.write required
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/workflows" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflowId": "string",
    "workflowVersion": "string",
    "name": "string",
    "definitionRef": "string",
    "registeredBy": "string"
  }'

Get a workflow definition

GET/v1/gears/workflows/{id}

gears.workflows.readTested with an API keygears_getWorkflow

Parameters

  • idpath · stringrequired

Responses

  • 200Workflow definition
    Response fields
    • scopeobject
    • scope.platformIdstring
    • scope.organizationIdstring
    • scope.workspaceIdstring
    • scope.projectIdstring
    • scope.environmentIdstring
    • workflowIdstringrequired
    • workflowVersionstringrequired
    • namestringrequired
    • definitionRefstringrequired
    • registeredBystringrequired
  • 404Not found in your scope
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/workflows/$ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Delete (archive) a workflow

DELETE/v1/gears/workflows/{id}

gears_deleteWorkflow

Needs gears.workflows.write (as registering does). Archives every version of this workflow id in your selected scope (org, project, workspace, environment): it leaves listWorkflows and getWorkflow, and starting a run of an archived version answers 409 workflow_archived until that version is registered again. Runs are kept. A repeat by the owner answers the same 200. Another scope's workflow and an unknown id are 404. No request body (an empty body, {} or null is accepted).

Parameters

  • idpath · stringrequired

Responses

  • 200Archived (or already archived by this scope)
    Response fields
    • idstringrequired
    • deletedtruerequired
    • archivedboolean

      true when the resource is kept as history (archived) rather than erased

  • 400A request body was sent
  • 403gears.workflows.write required
  • 404Not found in your scope
  • 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/gears/workflows/$ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

L1fe AI Inc. · Built from Genesis 0.3.3 and the live gateway on 2026-10-25. Support