tinyx402

Agent run (SSE)

Same as Agent run, but streams progress as Server-Sent Events, including a live browser view URL.

POST/api/v1/agent/run-sse50000 base units · 0.05 USDT

The body is identical to /api/v1/agent/run. The response is text/event-stream. Each upstream event is relayed with its type lowercased as the event name, and the payment receipt is appended at the end.

Events

EventData
started{ run_id }
streaming_url{ streaming_url }, a live view of the browser you can embed in an iframe
progress{ purpose }, what the agent is doing
complete{ status, result, error? }
payment{ success, transaction, payer, network, paymentResponse }
error{ error: "run_failed", message, charged: false }
done{ ok }
text
event: started
data: {"type":"STARTED","run_id":"a1b2…"}

event: streaming_url
data: {"type":"STREAMING_URL","streaming_url":"https://…"}

event: complete
data: {"type":"COMPLETE","status":"COMPLETED","result":{…}}

event: payment
data: {"success":true,"transaction":"0x…","payer":"0x…","network":"eip155:1874"}

event: done
data: {"ok":true}

Billing

The payment is verified before the stream opens and settled only when complete arrives with status: "COMPLETED". If the run fails or is cancelled, or the stream breaks first, you get event: error and the authorization is never submitted.