Invoke an application endpoint
Submit a JSON payload to a named application endpoint.
endpointPath is the path apps endpoints reports, one or more lowercase segments joined by slashes (e.g. infer, or v1/chat/completions for a server that answers on a nested route). A leading slash is rejected.
The default is async: the command prints the accepted task id. Pass --wait to poll until the task is completed or failed, and --timeout to bound that wait.
--sync uses the sync invocation endpoint. If the platform wait window expires, the command polls the returned task id; it never treats expiry as a failure and never resubmits. --timeout bounds that sync call and the poll together, and requires --wait or --sync.
A client-generated task id is sent with every invoke. Omit --task-id to generate one. Resubmitting the same id returns the task it already names instead of starting a second run.
When no response arrives (a dropped connection, a body that cannot be read, or a server error from a proxy such as Cloudflare), the command fails with code responseLost, the task id it sent in taskUUID, and how to read that task. With --sync or --wait it polls that id first, so a run the worker finished is neither lost nor run again.
runware serverless apps invoke <appId> <endpointPath> [flags]
# list endpoint paths, then invoke asynchronously
runware serverless apps endpoints my-app
runware serverless apps invoke my-app infer -f payload.json
# wait for a completed task (sync, then poll if the wait window expires)
runware serverless apps invoke my-app infer --sync -f payload.json
# async invoke and poll
runware serverless apps invoke my-app infer --wait --timeout 2m -f payload.json
# retry a lost response without starting a second task
runware serverless apps invoke my-app infer --task-id 7c9e6679-7425-40de-944b-e07fc1f90ae7 -f payload.json
-f, --body string JSON payload file, or - for stdin (default {})
-h, --help help for invoke
--poll-interval duration Polling interval when waiting for a task (default 2s)
--sync Use sync invocation and wait for a terminal task
--task-id string Client task id (UUID); generated if omitted
--timeout duration Maximum time to wait (0 = no limit)
--wait Poll until the task is completed or failed
--debug Show full debug output
-e, --env name Environment the app runs in (default RUNWARE_ENV, else the config's environment, else production)
--environment name Alias for --env
-F, --format string CLI output format: table, json, yaml (default "table")
--transport string Transport protocol: ws (WebSocket) or http (REST) (default "ws")
-v, --verbose Show request/response details
- runware serverless apps - Manage deployed serverless applications