invoke_function
Invoke a deployed function via HTTP. Free functions allow direct testing; paid functions require an idempotency key and return a result or pollable run ID.
Instructions
Invoke a deployed function via HTTP. Free functions behave like the direct test path; paid functions require idempotency_key and may spend allowance, returning a result or pollable run_id. Stable errors preserve code and set isError=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Request body (string or JSON object) | |
| name | Yes | Function name to invoke | |
| wait | No | When a paid invocation returns a 202 run handle, poll the run and replay the same idempotency key for the retained result. | |
| method | No | HTTP method (default: POST) | |
| headers | No | Additional headers to send | |
| project_id | Yes | The project ID | |
| timeout_ms | No | Maximum wait time in milliseconds when wait is true. | |
| idempotency_key | No | Stable Idempotency-Key required by paid function invocations. Reuse it for the same paid intent; use a new key only for a new paid intent. | |
| poll_interval_ms | No | Polling interval in milliseconds when wait is true. |