Skip to content

Run the function once in a separate, time-boxed process and relay its answer.

POST
/v0/projects/{id}/functions/{name}/invoke
curl --request POST \
--url https://infra-hyphae.run/v0/projects/example/functions/example/invoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '"example"'

Body: JSON ≤ 32 KiB (or empty). The worker receives on stdin { body, headers_subset, project_id, function } and must write one JSON object { status, headers?, body } ≤ 1 MiB to stdout. The response is the function’s own status, allowed headers, and body (string → text, anything else → JSON), marked with X-Hyphae-Function and X-Hyphae-Function-Version. Cloud-side outcomes: 501 function_runtime_missing (no deno/node), 504 function_timeout (process group killed after CLOUDD_FN_TIMEOUT_MS, default 5000), 502 function_bad_output (crash, non-JSON, oversize), 429 function_busy (two invocations of this project already running). Environment given to the worker: CLOUD_ORIGIN, PROJECT_ID, FUNCTION_NAME, plus the project’s function secrets as NAME=value; never a hyp1_ key. The function is trusted project code, not sandboxed — see claims.md. Session owner only. The invocation is receipted; the body is not stored.

id
required
string
/^prj_[0-9a-f]{16}$/
name
required
string
/^[a-z0-9_]{1,40}$/
Media typeapplication/json
Examplegenerated
example

The function’s answer.

The function’s own 4xx (with X-Hyphae-Function), or a Cloud error (400, 401, 404, 413, 429).

The function’s own 5xx (with X-Hyphae-Function), or a Cloud error (501, 502, 504).