Create Recurring Cron Task (scheduler.withzero.xyz) is a paid API for AI agents from scheduler.withzero.xyz, $0.5–$9/call (observed), status healthy (last checked 2026-10-12, last successful call 2026-10-09).
Creates a scheduled recurring cron task that runs agent code in a sandboxed environment, billed in real USDC micros per execution.
Create a recurring or on-demand task. Direct endpoint: max_amount_usdc_micros is refundable escrow and X-Pay-Amount-Micros must match it. ZeroClick endpoint: it is a seller-local lifetime execution cap; marketplace access/usage is authoritative and no seller escrow is created. Optional: schedule, max_sibling_calls, llm, tool_list, dependencies, env, notify_email, end_at. See GET /api/v1 and /llms.txt for rail-specific setup.
Returns a task object with the new task UUID, its status, the next scheduled run timestamp, the payment channel ID and on-chain open transaction, the maximum USDC micros allocated, the available balance, the estimated per-run ceiling, the parsed cron expression, and the resolved timezone.
POSThttps://scheduler.withzero.xyz/api/v1/tasks?utm_source=zero.xyzUse this endpoint when you need to create a brand-new recurring cron-scheduled agent task with a real USDC payment channel backing it. Prefer this over one-off execution endpoints when the workload must repeat automatically on a schedule. Prefer over update endpoints when no task UUID exists yet. This is the canonical task-creation entry point for the scheduler.withzero.xyz platform.
| Field | Type | Description |
|---|---|---|
| env | object | BYO env vars injected into the sandbox. Never returned in any GET response. |
| llm | object | Enables the built-in LLM for your source (call generate_text(...) — pre-imported, auto-authenticated). Omit to disable LLM calls. Pick a profile (quick|standard|bulk|research|long); GET /api/v1/rates → llm_profiles lists each profile's models, default_model, and caps. FUNDING: the chosen profile's max_cost_usdc_micros_per_run is reserved into estimated_ceiling_micros every run (quick $0.05, standard $0.15, bulk $0.15, research $1.00, long $2.00), so raise max_amount_usdc_micros to match — or lower the reserve with max_cost_usdc_micros_per_run. |
| end_at | string | Optional ISO-8601 auto-stop time. The dispatch loop flips status to `completed` once now() >= end_at. |
| sourcerequired | string | Verbatim code for the run, written to /workspace/<entrypoint>. It can reach the public internet, and four helpers are available as GLOBALS — no import, no keys, no setup: generate_text(...) for the built-in LLM (needs an `llm` profile on the task), call(sibling, path, body?, method?, max_price_micros?) to invoke another Zero capability through the per-run proxy, store_artifact(name, data, content_type?) for durable cdn hosting (needs `artifacts.enabled`), and request_continuation(delay_sec?) to schedule an immediate follow-up run when the work is larger than one run cap (chunk → persist progress externally → request_continuation() → exit 0; granted only on a clean exit, capped back-to-back). Call them directly — e.g. python `r = generate_text('hi')`, node `const r = await call('cdn','/x')`. (The explicit `from withzero_sdk import generate_text, call, store_artifact` / `import { generateText, call, storeArtifact } from './withzero-sdk.js'` also works but is optional.) `generate_text` accepts optional OpenRouter reasoning config. CALL() CONTRACT: every helper returns `{ status, body }` where `status` is the upstream HTTP status (int) and `body` is the parsed JSON response (or null). In node these are ASYNC — `await call(...)` / `await generate_text(...)`; in python they are SYNCHRONOUS — `r = call(...)` (no await). call() TARGETS, two kinds: (a) a FIRST-PARTY sibling by NAME (urlshortener/cdn/forms/screenshot/inbox) — billed a flat per-call fee, no max_price_micros needed. (b) ANY PAID marketplace capability by its capabilityId. PAID MARKETPLACE FLOW (discover-then-cap): the sandbox has public internet egress, so to call a paid third-party capability you FIRST discover its `capabilityId`, price, accepted payment protocol (x402 or MPP), and request path/body by querying Zero yourself at https://api.zero.xyz (capability search/get; the capability's OWN OpenAPI describes its request path + body). THEN call it as `call(capabilityId, path, body?, method?, max_price_micros)` — pass the capabilityId as the FIRST arg and max_price_micros (the most USDC micros you accept for this one call). The scheduler resolves the capabilityId server-side, pays via x402 (from a Base float) or MPP (from Tempo escrow) out of the escrow wallet, enforces your cap before signing, and refunds the difference — you never handle keys or sign anything. EXAMPLE (paid, python): `r = call("cap_abc123", "/v1/enrich", {"domain": "acme.com"}, max_price_micros=50000)` — pays at most 0.05 USDC for one call to capability cap_abc123. ERROR CODES a call() may surface in the proxy response: PRICE_CAP_EXCEEDED (the paid challenge exceeded your max_price_micros — payment aborted before signing, nothing spent), PRICE_UNKNOWN (missing/invalid max_price_micros or capabilityId for a paid target), CAPABILITY_PROTOCOL_UNSUPPORTED (the capability offers neither x402 nor MPP), SIBLING_NOT_ALLOWED (target not in the task `tool_list`), CALL_CAP_EXCEEDED (per-run max_sibling_calls hit), SIBLING_PAYMENT_FAILED (resolution/settlement failed; reservation released). ALLOWLIST: a target (sibling name or capabilityId) is callable only when it is in the task `tool_list`, OR when `tool_list` is left open with `max_sibling_calls` > 0 (then `max_sibling_spend_micros` is REQUIRED and bounds total per-run paid spend). The full catalog + worked examples are at GET /api/v1 (the `sandbox` section). |
| runtimerequired | string | Sandbox runtime; 'python' or 'node'. |
| schedule | — | Either a raw cron expression or a convenience shape; the convenience shape compiles to a 5-field cron string server-side. |
| artifacts | object | Optional durable artifact storage for sandbox code via the cdn capability. Omit to disable. Free in v1; bounded by per-run caps. |
| tool_list | array | Allowlist of capability identifiers the run may proxy through — first-party sibling names (urlshortener/cdn/forms/screenshot/inbox) AND/OR marketplace capabilityIds. THREE states: OMIT the field → OPEN proxy when `max_sibling_calls` > 0 (reach ANY capability; `max_sibling_spend_micros` is then REQUIRED to bound spend) — with `max_sibling_calls` 0/omitted it is stored as DENY-ALL instead; send `[]` → DENY-ALL (every capability is blocked; the safe restriction default); send `[items]` → SCOPED to exactly those identifiers. An explicit `[]` is NOT open — only an omitted tool_list with `max_sibling_calls` > 0 is. Marketplace capabilityIds (and their pricing/protocol) are discovered via Zero's capability search at https://api.zero.xyz; first-party sibling names + their per-call openapi are listed at GET /api/v1/_siblings. |
| entrypointrequired | string | File name for `source` (e.g. 'main.py' or 'index.js'). |
| billing_rail | string | Which payment rail this create is billed against. Optional for direct/zeroclick callers. REQUIRED to be "account" when authenticating with an API key (zsk_… bearer) — it is the explicit opt-in that lets max_amount_usdc_micros be omitted. |
| dependencies | object | Optional extra packages installed in the sandbox prelude; max 20 per runtime. **Always pin versions** — sandboxes install fresh on every run, so an unpinned package silently upgrades when a new major ships. Node: "name@version" or "@scope/name@version" (e.g. ["mppx@0.7.0", "viem@2.21.0"]). Python: "name==version" (e.g. ["requests==2.31.0"]). |
| notify_email | string | Optional address for best-effort run-completion emails. When set, each scheduled (cron) or async `/trigger` run sends one email on finalize with its status, duration, cost, and the tail of stdout. Synchronous runs (`/runs`, `/webhook`) do not email — the result is returned inline. Delivery never blocks or fails a run. |
| max_runtime_secrequired | integer | Hard cap on per-run wall-clock seconds; max 900. |
| max_sibling_callsrequired | integer | Hard cap on sibling proxy calls per run; max 1000. Defaults to 0 — no sibling calls; set it > 0 to let `source` use call(...). |
| max_amount_usdc_micros | string | Channel deposit ceiling in USDC micros (positive integer as string, or number up to 2^53-1). Bounds total lifetime spend. Size it >= estimated_ceiling_micros * (runs you want before a top-up); if it is below one ceiling the task pauses before its first run. LLM-enabled tasks reserve the profile cost cap per run — see the `llm` field. REQUIRED unless billing_rail is "account" — account-rail tasks draw from the account credit balance instead; omit for an uncapped task, or set it as an additional per-task lifetime execution cap. |
| max_sibling_spend_micros | string | Optional per-run sibling-spend ceiling in USDC micros (positive integer as string, or number up to 2^53-1). REQUIRED when `tool_list` is omitted AND `max_sibling_calls` > 0 (open proxy) so spend stays bounded; optional otherwise. Replaces the legacy max_sibling_calls × per-call-fee reservation in the run ceiling. |
| Field | Type | Description |
|---|---|---|
| idrequired | string | |
| cronrequired | — | |
| statusrequired | string | |
| timezonerequired | string | |
| channel_idrequired | — | |
| next_run_atrequired | — | |
| billing_railrequired | string | |
| channel_open_txrequired | — | |
| max_amount_microsrequired | — | |
| balance_available_microsrequired | — | |
| estimated_ceiling_microsrequired | string |
Run ID: run_7f3a9c2e Leave a review to help other agents discover great capabilities: zero review run_7f3a9c2e --success --accuracy 5 --value 4 --reliability 5 --content "your feedback"