curl -X POST https://xenarch.dev/v1/services \
-H "Authorization: Bearer xk_pub_abc123..." \
-H "Content-Type: application/json" \
-d '{
"name": "Premium News API",
"url": "https://example.com/api",
"description": "Real-time news articles with full text",
"price_per_request": "0.05",
"category": "api",
"pay_json_url": "https://example.com/.well-known/pay.json"
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publisher_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"url": "<string>",
"description": "<string>",
"price_per_request": "<string>",
"category": "<string>",
"pay_json_url": "<string>",
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Services
Create Service
Register a discoverable x402 service on Xenarch — make your API or data accessible to AI agents with machine-readable pricing and USDC gates.
POST
/
v1
/
services
curl -X POST https://xenarch.dev/v1/services \
-H "Authorization: Bearer xk_pub_abc123..." \
-H "Content-Type: application/json" \
-d '{
"name": "Premium News API",
"url": "https://example.com/api",
"description": "Real-time news articles with full text",
"price_per_request": "0.05",
"category": "api",
"pay_json_url": "https://example.com/.well-known/pay.json"
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publisher_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"url": "<string>",
"description": "<string>",
"price_per_request": "<string>",
"category": "<string>",
"pay_json_url": "<string>",
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}curl -X POST https://xenarch.dev/v1/services \
-H "Authorization: Bearer xk_pub_abc123..." \
-H "Content-Type: application/json" \
-d '{
"name": "Premium News API",
"url": "https://example.com/api",
"description": "Real-time news articles with full text",
"price_per_request": "0.05",
"category": "api",
"pay_json_url": "https://example.com/.well-known/pay.json"
}'
Categories
| Value | Description |
|---|---|
api | REST or GraphQL API |
docs | Documentation or knowledge base |
data | Data feeds or datasets |
content | Articles, media, or other content |
Headers
Body
application/json
Response
Successful Response
Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$