Create Task
application/json- body
name?stringHuman-readable task name
kind?stringTask kind (standard or federated)
"standard""federated"image_url?stringURL for the Wasm binary. Accepts two forms: (1) OCI registry reference (e.g. docker.io/myorg/app:v1) — proplet fetches via the registry proxy; (2) plain HTTP/HTTPS URL (e.g. https://releases.example.com/app.wasm) — proplet fetches directly (max 100 MB). The scheme (http:// or https://) is used to detect which path to take.
file?stringBase64-encoded Wasm binary (alternative to image_url)
cli_args?array<string>Command-line arguments passed to the Wasm module
inputs?array<string|number>Input values passed to the Wasm module (strings or numbers; numbers are coerced to strings)
env?Environment variables for the Wasm module
daemon?booleanIf true, task runs continuously until stopped
encrypted?booleanIf true, the Wasm binary is encrypted (requires KBS)
kbs_resource_path?stringKBS resource path for encrypted binaries (TEE only)
proplet_id?stringTarget proplet ID; mutually exclusive with broadcast
broadcast?booleanIf true, task runs on all proplets simultaneously; mutually exclusive with proplet_id
depends_on?array<string>List of task IDs this task depends on
run_if?stringRun condition based on dependency status
"success""failure"monitoring_profile?CPU/memory usage monitoring configuration
mode?stringTask mode for FL tasks
"infer""train"priority?integerDispatch priority (0-100, default 50)
0 <= value <= 100schedule?stringCron expression for scheduled tasks
timezone?stringTimezone for scheduled tasks (default UTC)
is_recurring?booleanIf true, task re-runs according to schedule
metadata?Arbitrary key-value metadata attached to the task (max 1 MB serialized)
Task created (the file field is redacted in the response)
curl -X POST 'http://localhost:7070/tasks' \ -H 'Content-Type: application/json' \ -d '{ "name": "main", "file": "AGFzbQEAAAABBwFgAn9/AX8DAgEABwgBBG1haW4AAAoJAQcAIAAgAWoL", "inputs": [ 10, 20 ]}'