Skip to content

Legacy: Discovery Endpoints

WARNING

These endpoints are from Payre's earlier agent discovery system. They still work but are not part of the core payment flow. Most developers only need POST /v1/charges.

POST /resolve

Resolve a query to matching registered agents.

bash
curl -X POST https://api.payre.dev/resolve \
  -H "Content-Type: application/json" \
  -H "X-Payre-Key: pyr_sk_xxx" \
  -d '{"query": "book a flight to Tokyo", "topK": 3}'

Response:

json
{
  "results": [
    {
      "agentId": "flight-master",
      "score": 85,
      "protocol": "mcp"
    }
  ],
  "intent": {
    "name": "travel_booking",
    "confidence": 0.92
  }
}

POST /register

Register an agent passport.

bash
curl -X POST https://api.payre.dev/register \
  -H "Content-Type: application/json" \
  -H "X-Payre-Key: pyr_sk_xxx" \
  -d '{"id": "my-agent", "name": "My Agent", "protocol": "mcp", "endpoint": "https://..."}'

POST /intent/preview

Preview intent resolution without resolving to agents.

bash
curl -X POST https://api.payre.dev/intent/preview \
  -H "Content-Type: application/json" \
  -H "X-Payre-Key: pyr_sk_xxx" \
  -d '{"query": "translate this to Chinese"}'