Quote Somnia payment requirements
curl --request GET \
--url https://x402.20.208.46.195.nip.io/x402/payment-requirements/{agentSlug}import requests
url = "https://x402.20.208.46.195.nip.io/x402/payment-requirements/{agentSlug}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://x402.20.208.46.195.nip.io/x402/payment-requirements/{agentSlug}', 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/x402/payment-requirements/{agentSlug}",
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/x402/payment-requirements/{agentSlug}"
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/x402/payment-requirements/{agentSlug}")
.asString();require 'uri'
require 'net/http'
url = URI("https://x402.20.208.46.195.nip.io/x402/payment-requirements/{agentSlug}")
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,
"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
Quote Somnia payment requirements
Returns exact STT payment requirements for a registered Somnia agent without requesting the protected resource.
GET
/
x402
/
payment-requirements
/
{agentSlug}
Quote Somnia payment requirements
curl --request GET \
--url https://x402.20.208.46.195.nip.io/x402/payment-requirements/{agentSlug}import requests
url = "https://x402.20.208.46.195.nip.io/x402/payment-requirements/{agentSlug}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://x402.20.208.46.195.nip.io/x402/payment-requirements/{agentSlug}', 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/x402/payment-requirements/{agentSlug}",
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/x402/payment-requirements/{agentSlug}"
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/x402/payment-requirements/{agentSlug}")
.asString();require 'uri'
require 'net/http'
url = URI("https://x402.20.208.46.195.nip.io/x402/payment-requirements/{agentSlug}")
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,
"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>"
]
}
}
]
}Path Parameters
Example:
"research-agent"
⌘I