Endpoints called by job executors using run tokens
Pause a run to wait for an external event
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "http://localhost:8080/sdk/v1/runs/string/wait-for-event" \ -H "Content-Type: application/json" \ -d '{ "event_key": "string" }'{
"status": "waiting",
"event_key": "string",
"expires_at": "2019-08-24T14:15:22Z",
"trigger_id": "string"
}curl -X GET "http://localhost:8080/sdk/v1/runs/string/payload"{}Log an event
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "http://localhost:8080/sdk/v1/runs/string/log" \ -H "Content-Type: application/json" \ -d '{}'Report progress
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "http://localhost:8080/sdk/v1/runs/string/progress" \ -H "Content-Type: application/json" \ -d '{}'Send heartbeat
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Response Body
curl -X POST "http://localhost:8080/sdk/v1/runs/string/heartbeat"Attach annotations
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "http://localhost:8080/sdk/v1/runs/string/annotate" \ -H "Content-Type: application/json" \ -d '{ "property1": "string", "property2": "string" }'Save a checkpoint
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "http://localhost:8080/sdk/v1/runs/string/checkpoint" \ -H "Content-Type: application/json" \ -d '{}'Report AI model usage
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "http://localhost:8080/sdk/v1/runs/string/usage" \ -H "Content-Type: application/json" \ -d '{ "provider": "string", "model": "string" }'Record a tool call
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "http://localhost:8080/sdk/v1/runs/string/tool-call" \ -H "Content-Type: application/json" \ -d '{}'Upsert structured output
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "http://localhost:8080/sdk/v1/runs/string/output" \ -H "Content-Type: application/json" \ -d '{}'Mark run completed
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "http://localhost:8080/sdk/v1/runs/string/complete" \ -H "Content-Type: application/json" \ -d '{}'Mark run failed
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "http://localhost:8080/sdk/v1/runs/string/fail" \ -H "Content-Type: application/json" \ -d '{}'Spawn a child job run
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "http://localhost:8080/sdk/v1/runs/string/spawn" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"job_id": "string",
"project_id": "string",
"status": "delayed",
"attempt": 0,
"payload": {},
"result": {},
"metadata": {
"property1": "string",
"property2": "string"
},
"error": "string",
"triggered_by": "string",
"scheduled_at": "2019-08-24T14:15:22Z",
"started_at": "2019-08-24T14:15:22Z",
"finished_at": "2019-08-24T14:15:22Z",
"heartbeat_at": "2019-08-24T14:15:22Z",
"next_retry_at": "2019-08-24T14:15:22Z",
"expires_at": "2019-08-24T14:15:22Z",
"parent_run_id": "string",
"priority": 0,
"idempotency_key": "string",
"job_version": 0,
"workflow_step_run_id": "string",
"max_attempts_override": 0,
"timeout_secs_override": 0,
"retry_backoff": "string",
"retry_initial_delay_secs": 0,
"retry_max_delay_secs": 0,
"execution_trace": {
"queue_wait_ms": 0,
"dequeue_ms": 0,
"connect_ms": 0,
"ttfb_ms": 0,
"transfer_ms": 0,
"total_ms": 0,
"dispatch_ms": 0
},
"debug_mode": true,
"continuation_of": "string",
"lineage_depth": 0,
"tags": {
"property1": "string",
"property2": "string"
},
"job_version_id": "string",
"created_by": "string",
"batch_id": "string",
"concurrency_key": "string",
"created_at": "2019-08-24T14:15:22Z"
}Create a continuation run
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "http://localhost:8080/sdk/v1/runs/string/continue" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"job_id": "string",
"project_id": "string",
"status": "delayed",
"attempt": 0,
"payload": {},
"result": {},
"metadata": {
"property1": "string",
"property2": "string"
},
"error": "string",
"triggered_by": "string",
"scheduled_at": "2019-08-24T14:15:22Z",
"started_at": "2019-08-24T14:15:22Z",
"finished_at": "2019-08-24T14:15:22Z",
"heartbeat_at": "2019-08-24T14:15:22Z",
"next_retry_at": "2019-08-24T14:15:22Z",
"expires_at": "2019-08-24T14:15:22Z",
"parent_run_id": "string",
"priority": 0,
"idempotency_key": "string",
"job_version": 0,
"workflow_step_run_id": "string",
"max_attempts_override": 0,
"timeout_secs_override": 0,
"retry_backoff": "string",
"retry_initial_delay_secs": 0,
"retry_max_delay_secs": 0,
"execution_trace": {
"queue_wait_ms": 0,
"dequeue_ms": 0,
"connect_ms": 0,
"ttfb_ms": 0,
"transfer_ms": 0,
"total_ms": 0,
"dispatch_ms": 0
},
"debug_mode": true,
"continuation_of": "string",
"lineage_depth": 0,
"tags": {
"property1": "string",
"property2": "string"
},
"job_version_id": "string",
"created_by": "string",
"batch_id": "string",
"concurrency_key": "string",
"created_at": "2019-08-24T14:15:22Z"
}List all run state keys
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Response Body
curl -X GET "http://localhost:8080/sdk/v1/runs/string/state"Set run state key
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "http://localhost:8080/sdk/v1/runs/string/state" \ -H "Content-Type: application/json" \ -d '{}'Get run state key
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Response Body
curl -X GET "http://localhost:8080/sdk/v1/runs/string/state/string"Delete run state key
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Response Body
curl -X DELETE "http://localhost:8080/sdk/v1/runs/string/state/string"Report in-container resource usage
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "http://localhost:8080/sdk/v1/runs/string/resources" \ -H "Content-Type: application/json" \ -d '{}'Push LLM stream chunk
Authorization
runToken JWT run token issued by the trigger response.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "http://localhost:8080/sdk/v1/runs/string/stream" \ -H "Content-Type: application/json" \ -d '{}'