Skip to content
API explorerProductOpen console

Heartbeat a run

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

Extends the lease, records spend and the Claude session id, and answers continue, pause or cancel.

runId
required
string
Example
3fa85f64-5717-4562-b3fc-2c963f66afa6
Media typeapplication/json
object
usage
object
input_tokens
integer
output_tokens
integer
cached_input_tokens
integer
cost_usd
number
session_id

The Claude session being driven, so a requeued run can resume it.

string
Examplegenerated
{
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"cached_input_tokens": 1
},
"cost_usd": 1,
"session_id": "example"
}

OK

Media typeapplication/json
object
success
boolean
data
data
object
control
required
string
Allowed values: continue pause cancel
reason
string
lease_expires_at
required
string format: date-time
Example
{
"data": {
"control": "continue"
}
}

Bad request

Unauthorized

Forbidden

Not found

Runtime_lease_expired: this runner no longer holds the run

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

Founded by Mosthofa Imran · imran@omazy.ai