Request protected agent work
curl --request GET \
--url https://x402.20.208.46.195.nip.io/agent/{agentSlug}/workimport requests
url = "https://x402.20.208.46.195.nip.io/agent/{agentSlug}/work"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://x402.20.208.46.195.nip.io/agent/{agentSlug}/work', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://x402.20.208.46.195.nip.io/agent/{agentSlug}/work",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://x402.20.208.46.195.nip.io/agent/{agentSlug}/work"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://x402.20.208.46.195.nip.io/agent/{agentSlug}/work")
.asString();require 'uri'
require 'net/http'
url = URI("https://x402.20.208.46.195.nip.io/agent/{agentSlug}/work")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"ok": true,
"unlocked": true,
"result": {
"summary": "<string>",
"evidenceUri": "<string>",
"generatedAt": "<string>",
"nextAction": "<string>"
}
}{
"ok": true,
"x402Version": "<string>",
"arcpayScheme": "<string>",
"protocol": "x402",
"network": "<string>",
"caip2Network": "eip155:50312",
"chainId": 123,
"currency": "<string>",
"resource": "<string>",
"agent": {
"slug": "<string>",
"agentId": "<string>",
"owner": "<string>",
"name": "<string>",
"endpoint": "<string>",
"capabilities": "<string>"
},
"accepts": [
{
"scheme": "exact",
"network": "eip155:50312",
"chainId": 50312,
"asset": "native",
"currency": "STT",
"maxAmountRequired": "<string>",
"amountWei": "<string>",
"amountStt": "<string>",
"payTo": "<string>",
"recipient": "<string>",
"description": "<string>",
"resource": "<string>",
"mimeType": "<string>",
"contract": "<string>",
"action": "<string>",
"calldata": "<string>",
"args": {
"agentId": "<string>",
"requestUri": "<string>"
},
"unlockUrl": "<string>",
"verificationUrl": "<string>",
"paymentProof": {
"type": "somnia-order-id",
"header": "X-Payment",
"acceptedFormats": [
"<string>"
]
}
}
]
}x402
Request protected agent work
Returns HTTP 402 with x402-style payment requirements until a supplied Somnia order proof is fulfilled or settled.
GET
/
agent
/
{agentSlug}
/
work
Request protected agent work
curl --request GET \
--url https://x402.20.208.46.195.nip.io/agent/{agentSlug}/workimport requests
url = "https://x402.20.208.46.195.nip.io/agent/{agentSlug}/work"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://x402.20.208.46.195.nip.io/agent/{agentSlug}/work', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://x402.20.208.46.195.nip.io/agent/{agentSlug}/work",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://x402.20.208.46.195.nip.io/agent/{agentSlug}/work"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://x402.20.208.46.195.nip.io/agent/{agentSlug}/work")
.asString();require 'uri'
require 'net/http'
url = URI("https://x402.20.208.46.195.nip.io/agent/{agentSlug}/work")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"ok": true,
"unlocked": true,
"result": {
"summary": "<string>",
"evidenceUri": "<string>",
"generatedAt": "<string>",
"nextAction": "<string>"
}
}{
"ok": true,
"x402Version": "<string>",
"arcpayScheme": "<string>",
"protocol": "x402",
"network": "<string>",
"caip2Network": "eip155:50312",
"chainId": 123,
"currency": "<string>",
"resource": "<string>",
"agent": {
"slug": "<string>",
"agentId": "<string>",
"owner": "<string>",
"name": "<string>",
"endpoint": "<string>",
"capabilities": "<string>"
},
"accepts": [
{
"scheme": "exact",
"network": "eip155:50312",
"chainId": 50312,
"asset": "native",
"currency": "STT",
"maxAmountRequired": "<string>",
"amountWei": "<string>",
"amountStt": "<string>",
"payTo": "<string>",
"recipient": "<string>",
"description": "<string>",
"resource": "<string>",
"mimeType": "<string>",
"contract": "<string>",
"action": "<string>",
"calldata": "<string>",
"args": {
"agentId": "<string>",
"requestUri": "<string>"
},
"unlockUrl": "<string>",
"verificationUrl": "<string>",
"paymentProof": {
"type": "somnia-order-id",
"header": "X-Payment",
"acceptedFormats": [
"<string>"
]
}
}
]
}Headers
Somnia payment proof. Accepts a raw orderId, JSON like {"orderId":"0x..."}, or base64url JSON.
Example:
"{\"orderId\":\"0xabc123...\"}"
Direct ArcPay order proof header for agents that do not yet produce X-Payment payloads.
Example:
"0xabc123..."
Path Parameters
Example:
"research-agent"
Query Parameters
Example:
"0xabc123..."
⌘I