Create function
create_functionCreate a Firecracker function on VPSnet by supplying a name, runtime OS ID, and code; optionally enable a public webhook for external callers.
Instructions
Create a Firecracker Function. Requires name, runtime_os_id, and code. Read list_functions for current runtimes and limits. Retain the idempotency key for creation recovery. webhook_enabled exposes a public URL for external callers. Invocations are usage-billed (CPU + memory seconds) from the account balance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Function source code | |
| name | No | Function name | |
| vcpus | No | 1-8 vCPUs, default 1 | |
| enabled | No | Whether the function can be invoked | |
| memory_mb | No | 64-8192 MB, default 256 | |
| entrypoint | No | Entrypoint command/handler | |
| description | No | Description (max 2000 chars) | |
| environment | No | Environment variables as JSON object string. Omit during unrelated edits to preserve existing values; never send back redacted placeholders. | |
| runtime_os_id | No | Runtime OS ID (see list_functions response for available runtimes) | |
| idempotency_key | No | Stable key for this exact creation. Reuse it after an uncertain response; do not create a second function. | |
| timeout_seconds | No | 1-300 seconds, default 30 | |
| webhook_enabled | No | Expose a public webhook URL for this function | |
| private_network_id | No | Private network ID from list_functions privateNetworking discovery. Omit to preserve an existing binding during update; null detaches it. Backend validates ownership and availability. | |
| rotate_webhook_secret | No | Rotate the webhook secret |