x402 Native · Base Mainnet
Three AI agent services — Cron, Notify, and Docs — payable with a single HTTP header. No API keys. No accounts. Just USDC on Base.
Call any endpoint. If you don't include payment, the service returns a 402 with the Payment header. Your agent pays and retries — automatically.
1. Request without payment
const res = await fetch('https://api.chancelove.ai/cron/schedule', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ url: 'https://your-agent.ai/webhook', schedule: 'in 24 hours' })
})
// → 402 { payment: 'Accept: application/json', maxAmountRequired: '0.005', payTo: '0x6e...' }
2. Agent pays and retries
const res = await fetch('https://api.chancelove.ai/cron/schedule', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Payment': 'Accept: application/json'
},
body: JSON.stringify({ url: 'https://your-agent.ai/webhook', schedule: 'in 24 hours' })
})
// → 200 { jobId: 'job_abc123', scheduledFor: '...' }
x402 SDK handles this automatically
The @coinbase/cdp-mpp SDK or any EIP-3009 compatible wallet reads the 402, pays, and retries — your agent just calls the endpoint.
Schedule one-shot or recurring HTTP callbacks
Schedule an HTTP callback to fire at a specified time. The callback fires once (one-shot) or on a recurring schedule.
| Field | Type | Description |
|---|---|---|
url | string | The URL to call when the trigger fires |
schedule | string | Time expression: "in 24 hours", "2026-04-01T12:00:00Z", "every monday 9am" |
method | string | HTTP method: "GET", "POST", "PUT". Default: "GET" |
body | object | Request body sent to the URL (JSON) |
headers | object | Custom HTTP headers to include in the callback request |
await fetch('https://api.chancelove.ai/cron/schedule', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Payment': 'Accept: application/json' },
body: JSON.stringify({
url: 'https://your-agent.ai/webhook',
schedule: 'in 24 hours',
body: { event: 'follow-up', leadId: '12345' }
})
})
List all scheduled jobs. Requires Authorization: Bearer <API_KEY>.
Send emails, webhooks, and SMS to humans
Deliver a notification via email, webhook, or SMS. One call, no configuration.
| Field | Type | Description |
|---|---|---|
channel | string | "email" · "webhook" · "sms" |
to | string | Email address, webhook URL, or phone number |
subject | string | Subject line (email only) |
message | string | Content of the notification |
await fetch('https://api.chancelove.ai/notify/send', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Payment': 'Accept: application/json' },
body: JSON.stringify({
channel: 'email',
to: '[email protected]',
subject: 'Your report is ready',
message: 'AI agent completed task #42. Invoice attached.'
})
})
Convert HTML to polished PDF documents
Convert HTML to a PDF document. Your AI agent generates invoices, reports, or receipts and delivers them to end users — automatically.
| Field | Type | Description |
|---|---|---|
html | string | Full HTML document to convert to PDF. Include inline CSS for best results. |
data | object | Optional data object — injected into template placeholders like {'{'} {'{'}amount{'}'}' {'}'} |
await fetch('https://api.chancelove.ai/docs/generate', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Payment': 'Accept: application/pdf' },
body: JSON.stringify({
html: '<html><body><h1>Invoice #{'}{'{'}invoiceId{'}'}'{'}</h1><p>Amount: ${'}{'{'}amount{'}'}'{'}</p></body></html>',
data: { invoiceId: 'INV-2026-001', amount: 149.00 }
})
})
// → 200 PDF binary