Skip to content
API explorerProductOpen console

Complete a run segment

POST
/runtime/v1/runs/{runId}/complete
curl --request POST \
--url https://mw.omazy.ai/api/v1/runtime/v1/runs/3fa85f64-5717-4562-b3fc-2c963f66afa6/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "state": "done", "stop_reason": "example", "outcome_md": "example", "session_id": "example", "usage": { "input_tokens": 1, "output_tokens": 1, "cached_input_tokens": 1 }, "total_cost_usd": 1, "num_turns": 1, "error": "example" }'

Reports the segment’s result, revokes the run’s MCP key and releases the lease. state paused keeps a run waiting on a human.

runId
required
string
Example
3fa85f64-5717-4562-b3fc-2c963f66afa6
Media typeapplication/json
object
state
required
string
Allowed values: done partial error cancelled paused
stop_reason

Harness StopReason, e.g. outcome, max_iterations, max_budget, error_upstream.

string
outcome_md
string
session_id
string
usage
object
input_tokens
integer
output_tokens
integer
cached_input_tokens
integer
total_cost_usd
number
num_turns
integer
error
string

No content

Bad request

Unauthorized

Forbidden

Not found

Runtime_lease_expired

Omazy CX documentation. One voice. Every channel. Always on.

Founded by Mosthofa Imran · imran@omazy.ai