Heartbeat a run
POST
/runtime/v1/runs/{runId}/heartbeat
const url = 'https://mw.omazy.ai/api/v1/runtime/v1/runs/3fa85f64-5717-4562-b3fc-2c963f66afa6/heartbeat';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"usage":{"input_tokens":1,"output_tokens":1,"cached_input_tokens":1},"cost_usd":1,"session_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”runId
required
string
Example
3fa85f64-5717-4562-b3fc-2c963f66afa6Request Bodyrequired
Section titled “Request Bodyrequired”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"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
success
boolean
data
data
object
control
required
string
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
© 2026 Omazy CX