Use when an agent must be woken later without its own scheduler
1gateway.dev/v1/agent/timer
Use when an agent must be woken later without its own scheduler. Input: https webhook; at (ISO) or delay_seconds (10 s-30 days); JSON payload (4 KB, echoed); every_seconds + times (2-100) to repeat, or cron + tz + times (1-100, 366 days). Output: id, one-time secret, next fire time, status URL. Signed POST, retried 1/5/30 min. Free status and cancel. $0.003; repeats $0.002 each. Example: POST {"we
GET
https://1gateway.dev/v1/agent/timerUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://1gateway.dev/v1/agent/timer?delay_seconds=3600&every_seconds=3600&payload=%7B%22task%22%3A%22check+order+42%22%7D×=24&webhook=https%3A%2F%2Fexample.com%2Fhooks%2Fwake");
console.log(await res.json());Example input
{
"delay_seconds": "3600",
"every_seconds": "3600",
"payload": "{\"task\":\"check order 42\"}",
"times": "24",
"webhook": "https://example.com/hooks/wake"
}