Functions

Start a run

POST /v1/functions/{id}/runs
Permission
write:functions
Tokens
API key, CLI user token

Start a run of a function with an input. A run is a background job, so read it until its status is completed, failed, or cancelled. Set wait to hold the request for up to 45 seconds and get the run back as it is then.

Path parameters

idstringrequired
{
"wait": bool
}

Request

inputobject

The input the handler receives. It must satisfy the function's `input.json_schema` when the function declares one.

waitboolean

Hold the request until the run finishes, for up to 45 seconds, and return the run as it is then. Leave it out to return at once with the run in `queued`.

Response

runFunctionRunrequired

The run.

On this page

No Headings
Schedule a demo
For HumansFor Agents