{
  "openapi": "3.1.0",
  "info": {
    "title": "VIA Router",
    "version": "2.3.3",
    "description": "Protocol-neutral buyer-intent routing for agents and humans across software/services, commerce, information and travel. VIA federates live x402, MPP, UCP and web/catalog sources; current VIA payment settlement is x402 V2 in USDC on Base, with VIA Hash also available on Polygon.",
    "x-guidance": "Use VIA as a buyer-side goal router: send an objective plus optional budget/constraints, then let VIA compare live sources before external spend. Current VIA settlement is x402 V2 in USDC on Base; VIA Hash additionally accepts Polygon. Upstream discovery spans x402 markets, the MPP service directory, UCP commerce catalogs, Shopify, Apify and sourced web research. Returned supplier URLs do not imply supplier execution unless explicitly stated. For broad buyer intents use POST /_api/intent_exchange_quote first, then POST /_api/intent_exchange for the paid ranked match.",
    "contact": {
      "email": "luciacarvalhodasilva8@gmail.com",
      "url": "https://via-router.floot.app"
    }
  },
  "x-discovery": {
    "ownershipProofs": [
      "0x4dd30c8D8615B9d9F47e01ED5Ff7507a2415fdAA"
    ]
  },
  "servers": [
    {
      "url": "https://via-router.floot.app"
    }
  ],
  "x-service-info": {
    "categories": [
      "routing",
      "agent-commerce",
      "procurement",
      "search"
    ],
    "docs": {
      "homepage": "https://via-router.floot.app",
      "llms": "https://via-router.floot.app/llms.txt",
      "apiReference": "https://via-router.floot.app/openapi.json"
    },
    "currentSettlement": [
      "x402"
    ],
    "upstreamDiscovery": [
      "x402",
      "MPP",
      "UCP",
      "Shopify",
      "Apify",
      "web"
    ]
  },
  "paths": {
    "/_api/transit_order": {
      "get": {
        "operationId": "getTransitOrder",
        "summary": "Recover an external Transit order",
        "description": "Free status and receipt lookup for external Transit. Submit your own private UUIDv4 orderId before payment and reuse it on the signed request. An orderId marked provisional in a 402 is not valid for this lookup.",
        "parameters": [{"name":"orderId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],
        "responses": {
          "200": {
            "description":"Order state and stored result or refund when available. Polling never initiates a payment.",
            "headers":{
              "PAYMENT-RESPONSE":{"description":"Base64 x402 settlement receipt for a delivered order with a valid stored settlement.","schema":{"type":"string"}},
              "Retry-After":{"description":"Seconds before polling again when the order is processing or buyer_settled.","schema":{"type":"integer"}}
            }
          },
          "400": {"description":"Invalid order identifier"},
          "404": {"description":"Order not found"},
          "503": {"description":"Order status temporarily unavailable"}
        }
      }
    },
    "/_api/credits_card_checkout": {
      "post": {
        "operationId": "viaCardCreditCheckout",
        "summary": "Open or resume Stripe Checkout for prepaid agent credit",
        "description": "Customer authorization happens in Stripe Checkout. A confirmed payment credits the private key exactly once. Save the key and order UUID before opening Checkout. Sign in to the VIA account and send its private key as x-credit-token or Authorization: Bearer via_… (CORS enabled). Body {\"requestId\":\"<new UUID v4>\",\"amountCents\":500}: amountCents is integer USD cents from 500. method \"card\" (default): new card top-ups have no VIA processing fee. Bank-transfer top-ups are paused for tool-only accounts; existing orders keep their stored terms. GET /_api/credits_payment_methods returns the limits. A smaller amount returns 400 code amount_below_minimum. The response states creditCents, feeCents (zero for new orders) and totalCents. Give the returned checkoutUrl to the human payer, then poll GET /_api/credits_status?order=<requestId> until state=credited. Purchased credit does not expire. No subscription, bonus or supplier execution.",
        "security": [
          {
            "viaCreditToken": []
          }
        ],
        "parameters": [
          {
            "in": "header",
            "name": "x-credit-token",
            "required": false,
            "description": "Private VIA key. Alternatively send Authorization: Bearer via_…",
            "schema": {
              "type": "string",
              "pattern": "^via_[A-Za-z0-9_-]{43}$"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "UUID used as the order id when the body has no requestId. Repeat the request with the same key and the same header to get the same order and the same Stripe checkoutUrl.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "3f0c9a52-6d1e-4b7a-9d2e-1f0a5b6c7d8e"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amountCents"
                ],
                "properties": {
                  "requestId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Order UUID. Optional when a UUID Idempotency-Key header is sent."
                  },
                  "amountCents": {
                    "type": "integer",
                    "minimum": 500,
                    "maximum": 99999999
                  },
                  "method": {
                    "type": "string",
                    "enum": ["card", "bank_transfer"],
                    "default": "card"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Checkout URL, USD amount and order ID, or existing paid order state"
          },
          "409": {
            "description": "Order already used with other input, closed, or requiring reconciliation"
          },
          "503": {
            "description": "Checkout not confirmed; preserve the same order ID and key"
          },
          "400": {
            "description": "Invalid body, or amount below the 5 USD minimum (code amount_below_minimum, with minAmountCents and maxAmountCents)"
          },
          "401": {
            "description": "Missing or malformed VIA key (code invalid_api_key) or revoked key"
          }
        }
      }
    },
    "/_api/credits_status": {
      "get": {
        "operationId": "viaCardCreditStatus",
        "summary": "Credit payment readiness or private order reconciliation",
        "description": "Without a private key returns payment readiness and the minimum and maximum top-up in USD cents. With the x-credit-token header returns that key's available balance. Supply an order UUID to reconcile a linked Checkout Session through Stripe. Merely returning to the page never creates credit.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "x-credit-token",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Readiness or private credit balance, expiry and order state"
          },
          "404": {
            "description": "Order does not belong to this private key"
          },
          "503": {
            "description": "Payment status not confirmed; keep the same key and order"
          }
        }
      }
    },
    "/_api/intent_exchange_quote": {
      "post": {
        "operationId": "quoteViaIntentExchange",
        "summary": "Free VIA Intent Exchange feasibility quote",
        "description": "Check whether existing live markets/sources can satisfy a buyer intent and optional budget before paying for the ranked match.",
        "tags": [
          "intent-exchange",
          "buyer-intent",
          "quote",
          "marketplace"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "intent"
                ],
                "properties": {
                  "intent": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 1000
                  },
                  "market": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "services",
                      "commerce",
                      "information",
                      "travel"
                    ],
                    "default": "auto"
                  },
                  "country": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$",
                    "default": "US"
                  },
                  "maxBudgetUsd": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Feasibility, candidate/source counts and known price range"
          },
          "400": {
            "description": "Invalid request"
          }
        }
      }
    },
    "/_api/intent_exchange": {
      "get": {"operationId": "intent_exchange_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.10"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "matchViaIntentExchange",
        "summary": "Federated buyer-intent match for $0.10",
        "description": "Submit one buyer intent and optional budget. VIA searches existing live markets and sources and returns a ranked recommendation plus alternatives. V1 does not claim supplier bidding.",
        "tags": [
          "intent-exchange",
          "buyer-intent",
          "procurement",
          "marketplace",
          "agent-commerce",
          "x402"
        ],
        "x-keywords": [
          "intent exchange",
          "buyer intent marketplace",
          "agent procurement",
          "find provider for buyer intent",
          "federated marketplace"
        ],
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.10"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "intent"
                ],
                "properties": {
                  "intent": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 1000
                  },
                  "market": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "services",
                      "commerce",
                      "information",
                      "travel"
                    ],
                    "default": "auto"
                  },
                  "country": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$",
                    "default": "US"
                  },
                  "maxBudgetUsd": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ranked buyer-side match and settlement receipt"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No matching candidate; no settlement"
          }
        }
      }
    },
    "/_api/one_call_quote": {
      "post": {
        "operationId": "quoteViaOneCall",
        "summary": "Free VIA One-Call task quote",
        "description": "Free unsigned quote for VIA-owned tools only. Returns the current tool price in USDC on Base. No third-party execution or supplier payment.",
        "tags": [
          "agent",
          "one-call",
          "router",
          "quote",
          "x402"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "task"
                ],
                "properties": {
                  "task": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 1000
                  }
                }
              }
            }
          }
        },
        "responses": {
            "200": {
              "description": "Selected provider and combined quote"
            },
            "400": {
              "description": "No executable route available"
            }
          }
      }
    },
    "/_api/one_call_preflight": {
      "post": {
        "operationId": "preflightViaOneCall",
        "deprecated": true,
        "summary": "Unavailable: VIA One-Call paid preflight (use free quote)",
        "description": "Legacy paid preflight is unavailable; do not authorize any payment here. For a free VIA-owned tool quote use POST /_api/one_call_quote.",
        "x-operational-status": "disabled-for-new-paid-execution",
        "tags": [
          "one-call",
          "paid-service",
          "preflight",
          "provider-selection",
          "x402",
          "agent-tool"
        ],
        "x-keywords": [
          "one call paid service preflight",
          "find paid API before execution",
          "paid external service quote",
          "agent task preflight",
          "choose executable paid service"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "task"
                ],
                "properties": {
                  "task": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 1000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Discovery only: use POST /_api/one_call_quote for a free quote. No payment requested."
          },
          "400": {
            "description": "Invalid legacy request"
          },
          "503": {
            "description": "Legacy paid preflight is disabled; do not send a payment"
          }
        }
      }
    },
    "/_api/one_call": {
      "get": {"operationId": "one_call_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "dynamic", "currency": "USD", "min": "0.001", "max": "0.02"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}, "422": {"description": "Task not served by a VIA-owned tool; nothing charged"}}},
      "post": {
        "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "dynamic", "currency": "USD", "min": "0.001", "max": "0.02"}, "network": "eip155:8453", "asset": "USDC"},
        "operationId": "executeViaOneCall",
        "summary": "VIA One-Call — VIA-owned tools only",
        "description": "Run a VIA-owned tool only: API comparison or supported public page/PDF extraction and sourced research. No external supplier purchase or execution. A suitable request returns a live x402 offer in USDC on Base. Existing tool prices apply and the buyer budget is respected. A UUIDv4 orderId is optional; preserve it and the exact request on signed retry. Unsupported tasks do not return a payment challenge. Never transfer funds manually.",
        "tags": [
          "agent",
          "one-call",
          "router",
          "x402",
          "execute"
        ],
        "x-keywords": [
          "one call paid service",
          "compare API prices",
          "agent task router",
          "VIA-owned tools",
          "economic resolver"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "task"
                ],
                "properties": {
                  "task": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 1000
                  },
                  "orderId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional UUIDv4. If supplied, reuse on signed retries. Standard x402 same-body retries without orderId are supported."
                  }
                },
                "example": {
                  "task": "Compare API prices for PDF extraction"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "VIA-owned tool result and settlement receipt"
          },
          "400": {
            "description": "No executable route available"
          },
          "402": {
            "description": "Dynamic x402 payment challenge"
          },
          "503": {
            "description": "The requested VIA-owned tool is unavailable; no payment requested"
          }
        }
      }
    },
    "/_api/transit_quote": {
      "post": {
        "operationId": "quoteViaTransit",
        "summary": "Free VIA Transit quote",
        "description": "Read-only price inquiry. New paid Transit orders remain paused; this quote does not enable checkout or authorize payment.",
        "tags": [
          "gateway",
          "relay",
          "x402",
          "quote"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "targetUrl"
                ],
                "properties": {
                  "targetUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "GET",
                      "POST"
                    ],
                    "default": "POST"
                  },
                  "body": {},
                  "maxUpstreamUsd": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "Optional buyer-authorized supplier price ceiling for this request; no fixed VIA commercial ceiling."
                  }
                }
              }
            }
          }
        },
        "responses": {
            "200": {
              "description": "Transit quote"
            },
            "400": {
              "description": "Unsupported or invalid target"
            }
          }
      }
    },
    "/_api/transit": {
      "post": {
        "operationId": "executeViaTransit",
        "summary": "VIA Transit (paused for new paid orders)",
        "description": "External supplier purchases are paused. Do not send a new payment or reuse a signature elsewhere. Existing customers can recover an order or receipt from GET /_api/transit_order. For VIA-owned tools, start at POST /_api/one_call_quote.",
        "deprecated": true,
        "x-operational-status": "disabled-for-new-paid-execution",
        "tags": [
          "gateway",
          "relay",
          "x402",
          "one-call",
          "payments"
        ],
        "x-keywords": [
          "x402 gateway",
          "x402 relay",
          "one call paid API",
          "agent payment router"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "targetUrl",
                  "orderId"
                ],
                "properties": {
                  "orderId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Unique UUIDv4 per order. Preserve across retries."
                  },
                  "targetUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "GET",
                      "POST"
                    ],
                    "default": "POST"
                  },
                  "body": {},
                  "maxUpstreamUsd": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 100
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Historical recovery only; no new paid execution is offered"
          },
          "503": {
            "description": "New paid Transit orders are paused; no charge"
          }
        }
      }
    },
    "/_api/toll": {
      "get": {"operationId": "toll_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "viaRoute",
        "summary": "Find the best service for a task",
        "description": "Find and compare APIs/software services, products, information sources or travel research. Returns one recommendation and up to three alternatives. Supplier execution and supplier charges are separate.",
        "tags": [
          "routing",
          "api-comparison",
          "software-services",
          "product-search",
          "information-research",
          "travel-research"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              },
              "examples": {
                "apiComparison": {
                  "summary": "Compare APIs and software services",
                  "value": {
                    "intent": "Find a PDF text extraction API and compare alternatives",
                    "market": "services",
                    "country": "US",
                    "language": "en"
                  }
                },
                "productSearch": {
                  "summary": "Find products and compare offers",
                  "value": {
                    "intent": "Find noise cancelling headphones",
                    "market": "commerce",
                    "country": "US",
                    "language": "en"
                  }
                },
                "informationResearch": {
                  "summary": "Research current information",
                  "value": {
                    "intent": "Find current official sources about this topic",
                    "market": "information",
                    "country": "US",
                    "language": "en"
                  }
                },
                "travelResearch": {
                  "summary": "Research travel sources",
                  "value": {
                    "intent": "Find useful sources for a Lisbon weekend trip",
                    "market": "travel",
                    "country": "PT",
                    "language": "en"
                  }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Paid recommendation delivered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteResponse"
                }
              }
            }
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No matching route; payment not settled"
          }
        }
      }
    },
    "/_api/api_compare": {
      "get": {
        "operationId": "compareApisAndServicesGet",
        "summary": "Which API should I call",
        "description": "Same paid comparison as POST, for clients that call with a query string. Without a signed payment this returns an HTTP 402 x402 challenge and charges nothing. Send your own PAYMENT-SIGNATURE (or X-PAYMENT) to execute. Returns one recommendation plus up to three alternatives, or up to five options with maxResults=5, each with price, source, marketplace usage evidence when published and risk flags (supplierEvidence). Without the need parameter, GET returns a free unsigned quote only. Prepaid credit tokens are accepted on POST only.",
        "tags": ["api", "software", "service-discovery", "comparison"],
        "parameters": [
          { "name": "need", "in": "query", "required": true, "schema": { "type": "string", "minLength": 2, "maxLength": 500 }, "description": "Plain-language task, e.g. extract text from a PDF" },
          { "name": "maxResults", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 5 }, "description": "Total options to return; default is 1 + up to 3 alternatives" },
          { "name": "market", "in": "query", "required": false, "schema": { "type": "string", "enum": ["auto", "services", "commerce", "information", "travel"] } },
          { "name": "country", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^[A-Z]{2}$" } },
          { "name": "language", "in": "query", "required": false, "schema": { "type": "string", "enum": ["en", "pt"] } }
        ],
        "x-payment-info": {
          "protocols": [{ "x402": {} }],
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.01" },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": { "description": "Recommendation plus alternatives and supplierEvidence" },
          "402": { "description": "x402 payment challenge" },
          "422": { "description": "No result; no settlement" }
        }
      },
      "post": {
        "operationId": "compareApisAndServices",
        "summary": "Compare APIs and software services",
        "description": "Compare API prices and select a provider for a specific task. Returns one recommendation and up to three alternatives, with prices when available. Pay 0.01 USDC on Base via x402, or use prepaid credit with Authorization: Bearer YOUR_VIA_KEY (or x-credit-token); Idempotency-Key is optional. Use one payment method per request. Retry a prepaid request with the same body (and UUID if you sent one) to recover the result without another debit. The x402 route searches services. Prepaid commerce routing is available at /_api/credits_route.",
        "tags": [
          "api",
          "software",
          "service-discovery",
          "comparison"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              },
              "example": {
                "intent": "Compare prices for transactional email APIs",
                "country": "US",
                "language": "en"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Recommendation plus alternatives"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/route_task": {
      "get": {"operationId": "route_task_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "route-task",
        "summary": "Route a task to a service",
        "description": "Agent Economy task router for APIs, software services, products, sourced information and travel research.",
        "tags": [
          "route-task",
          "agent-economy",
          "router",
          "task-routing",
          "buyer-intent"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Recommendation plus alternatives"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/research_brief_written": {
      "get": {"operationId": "research_brief_written_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "researchBriefWrittenByAgent",
        "summary": "Written research brief with sources",
        "description": "Produce a source-backed research brief using current web and authoritative sources.",
        "tags": [
          "research-brief-written-by-agent",
          "research-brief",
          "agent-work",
          "sources",
          "citations"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Source-backed research brief"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/source_evidence": {
      "get": {"operationId": "source_evidence_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "source-evidence",
        "summary": "Check claim with sources",
        "description": "Produce source evidence for a claim or task using current and authoritative sources.",
        "tags": [
          "source-evidence",
          "evidence",
          "sources",
          "citations",
          "research"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Source evidence routes"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/product_offers": {
      "get": {"operationId": "product_offers_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "agentUtilitiesProductOffers",
        "summary": "Find product offers",
        "description": "Find product offers and compare prices for an agent buyer: send a shopping intent (for example noise cancelling headphones, running shoes, laptop stand, espresso machine) and get one recommendation plus alternatives from public merchant catalogs. Pay per request in USDC on Base, no account or API key.",
        "tags": [
          "agent-utilities-product-offers",
          "product-offers",
          "shopping",
          "commerce",
          "comparison"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Product offers and alternatives",
            "content": {
              "application/json": {
                "example": {
                  "paid": true,
                  "intent": "Find noise cancelling headphones and compare offers",
                  "viaTollUsd": 0.01,
                  "recommendation": {
                    "title": "Noise Cancelling Headphones",
                    "source": "Shopify Catalog"
                  },
                  "alternatives": [],
                  "settlement": {
                    "network": "eip155:8453",
                    "transaction": "0x..."
                  }
                }
              }
            }
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/research_brief": {
      "get": {"operationId": "research_brief_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "researchBriefAgentWorkLowCost",
        "summary": "Research brief",
        "description": "Produce a source-backed research brief for an agent task using current web and authoritative sources.",
        "tags": [
          "research-brief",
          "agent-work",
          "source-evidence",
          "research",
          "citations",
          "agent-tool"
        ],
        "x-keywords": [
          "research brief agent work",
          "research brief written by an agent",
          "source evidence",
          "source-backed research brief"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Source-backed research brief routes"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/provider_selection": {
      "get": {"operationId": "provider_selection_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "choosePaidProvider",
        "summary": "Choose a paid provider before external spend for $0.01",
        "description": "Choose and compare a paid x402/API provider before external spend (for example for PDF text extraction, OCR, web search or data enrichment). Searches live provider discovery sources and returns a recommended provider plus alternatives.",
        "tags": [
          "choose-provider",
          "paid-provider",
          "provider-selection",
          "before-paying",
          "external-spend",
          "x402",
          "api",
          "comparison",
          "agent-tool"
        ],
        "x-keywords": [
          "choose a paid provider before external spend",
          "provider selection before external spend",
          "provider selection before paying",
          "choose x402 provider",
          "compare providers before spend",
          "best API provider"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Recommended provider plus alternatives"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/find_cheapest_api": {
      "get": {
        "operationId": "find_cheapest_api_get",
        "summary": "Find the cheapest suitable API for $0.01",
        "description": "Find the cheapest suitable API for a task (PDF text extraction, web scraping, search, weather, email validation). GET-compatible low-cost x402 route for crawlers and autonomous agents. Query parameter intent describes the buyer task.",
        "tags": [
          "find-api",
          "cheapest-api",
          "api-pricing",
          "software",
          "comparison",
          "agent-tool"
        ],
        "parameters": [
          {
            "name": "intent",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "US"
            }
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Recommendation plus alternatives"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      },
      "post": {
        "operationId": "findCheapestApi",
        "summary": "Find the cheapest suitable API for $0.01",
        "description": "Low-cost acquisition route for autonomous agents. Finds a suitable API or software service and returns a recommendation plus alternatives. Market is fixed to services.",
        "tags": [
          "find-api",
          "cheapest-api",
          "api-pricing",
          "software",
          "comparison",
          "agent-tool"
        ],
        "x-keywords": [
          "find cheapest API",
          "cheapest API",
          "low cost API",
          "compare API prices",
          "best API price"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Recommendation plus alternatives"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/compare_api_prices": {
      "get": {"operationId": "compare_api_prices_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "compareApiPrices",
        "summary": "Compare API prices for $0.01",
        "description": "Low-cost acquisition route for autonomous agents comparing API or software-service prices. Returns a recommended option plus alternatives. Market is fixed to services.",
        "tags": [
          "compare-api-prices",
          "api-pricing",
          "cheapest-api",
          "software",
          "comparison",
          "agent-tool"
        ],
        "x-keywords": [
          "compare API prices",
          "API pricing",
          "cheapest API",
          "best API price",
          "low cost API"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Recommendation plus alternatives"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/official_sources_research": {
      "get": {"operationId": "official_sources_research_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "officialSourcesResearchEntry",
        "summary": "Find official sources",
        "description": "Low-cost acquisition route for autonomous agents needing official, primary or authoritative sources. Returns useful source routes and prefers primary or authoritative sources when available. Market is fixed to information.",
        "tags": [
          "official-sources",
          "authoritative-sources",
          "research",
          "citations",
          "web-research",
          "agent-tool"
        ],
        "x-keywords": [
          "official sources research",
          "research official sources",
          "authoritative sources",
          "primary sources",
          "official source lookup"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Official/authoritative source routes"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/cited_web_answer": {
      "get": {"operationId": "cited_web_answer_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "citedWebAnswer",
        "summary": "Answer question with citations",
        "description": "Ask one current question and get a concise answer route grounded in live web sources and citations. Built for fast autonomous-agent loops and current-information checks.",
        "tags": [
          "cited-web-answer",
          "web-answer",
          "live-web-search",
          "citations",
          "sources",
          "current-information",
          "agent-tool"
        ],
        "x-keywords": [
          "cited web answer",
          "web answer",
          "answer with citations",
          "live web answer",
          "current answer with sources",
          "live web search cited answers",
          "web search with sources"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Current sourced answer route"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/web_research_sources": {
      "get": {"operationId": "web_research_sources_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "web_research_sources",
        "summary": "Web search with citations",
        "description": "Low-cost live web research for autonomous agents. Search the current web and return useful sources/citations for a question, including official or authoritative sources when available. Market is fixed to information.",
        "tags": [
          "live-web-search",
          "cited-answer",
          "web-answer",
          "web-research",
          "sources",
          "citations",
          "current-information",
          "research",
          "agent-tool"
        ],
        "x-keywords": [
          "live web search cited answers",
          "live web search",
          "cited web answer",
          "web answer with citations",
          "web search with sources",
          "web research sources",
          "research with sources",
          "current web research",
          "cited research",
          "source-backed research"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Sourced research routes"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/product_search_compare": {
      "get": {"operationId": "product_search_compare_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "searchProductsCompareOffers",
        "summary": "Search products and compare offers",
        "description": "Low-cost acquisition route for autonomous agents searching products and comparing offers or prices. Market is fixed to commerce.",
        "tags": [
          "search-products",
          "compare-offers",
          "product-search",
          "compare-prices",
          "shopping",
          "offers",
          "commerce",
          "agent-tool"
        ],
        "x-keywords": [
          "search products and compare offers",
          "product search compare prices",
          "find products compare offers",
          "shopping search",
          "compare product prices",
          "best product price"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Product recommendation plus alternatives"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/product_search": {
      "get": {"operationId": "product_search_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "findProductsCompareOffers",
        "summary": "Compare product prices",
        "description": "Find a product, compare available commerce offers and return one recommended route plus alternatives from live connected catalogs. Use for shopping, product search, price comparison and offer comparison. Market is fixed to commerce.",
        "tags": [
          "find-products",
          "product-search",
          "commerce",
          "shopping",
          "price-comparison",
          "offer-comparison"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Product recommendation plus alternatives"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/find_product": {
      "get": {"operationId": "find_product_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "find_product",
        "summary": "Find a product",
        "description": "Find a product from connected commerce sources and return a recommended route plus alternatives. Optimized for agent queries such as find product, shopping search and product lookup.",
        "tags": [
          "find-product",
          "product-lookup",
          "shopping",
          "commerce"
        ],
        "x-keywords": [
          "find product",
          "product lookup",
          "shopping search",
          "buy product",
          "product offers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Product recommendation plus alternatives"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/compare_prices": {
      "get": {"operationId": "compare_prices_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "compare_prices",
        "summary": "Compare prices",
        "description": "Compare prices or offers for a buyer intent using connected live sources. Returns a recommendation plus alternatives when available.",
        "tags": [
          "compare-prices",
          "price-comparison",
          "offers",
          "shopping"
        ],
        "x-keywords": [
          "compare prices",
          "price comparison",
          "compare offers",
          "cheapest option",
          "best price"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Price/offer comparison"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/sourced_research": {
      "get": {"operationId": "sourced_research_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "researchBriefAgentWork",
        "summary": "Sourced research with citations",
        "description": "Produce a source-backed research brief for an agent task. Research a current question and return source URLs, preferring official and authoritative sources when available.",
        "tags": [
          "research-brief",
          "agent-work",
          "source-evidence",
          "web-research",
          "sources",
          "citations",
          "official-sources",
          "current-information"
        ],
        "x-keywords": [
          "research brief agent work",
          "research brief written by an agent",
          "source evidence",
          "source-backed research brief"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Sourced recommendation plus alternatives"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/research_with_sources": {
      "get": {"operationId": "research_with_sources_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "research_with_sources",
        "summary": "Research with sources for $0.01",
        "description": "Research a current question and return useful source routes, preferring official or authoritative sources when available.",
        "tags": [
          "research-with-sources",
          "answer-with-sources",
          "citations",
          "web-research"
        ],
        "x-keywords": [
          "research with sources",
          "answer with sources",
          "cited research",
          "official sources",
          "web research"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Sourced research result"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/travel_research": {
      "get": {"operationId": "travel_research_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "findTravelResearchSources",
        "summary": "Find travel research and current sources for $0.01",
        "description": "Find current travel research sources for destinations, planning and option comparison. Use for travel research, destination research and trip-planning source discovery. Does not claim booking availability or execute bookings. Market is fixed to travel.",
        "tags": [
          "travel-research",
          "trip-planning",
          "destinations",
          "travel-sources",
          "comparison"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Travel research recommendation plus alternatives"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/travel_options": {
      "get": {"operationId": "travel_options_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.01"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "travel_options",
        "summary": "Compare travel options",
        "description": "Find useful current travel options and sources for destination and trip-planning intents. Booking execution is separate.",
        "tags": [
          "travel-options",
          "travel-search",
          "trip-planning",
          "compare-travel"
        ],
        "x-keywords": [
          "travel options",
          "travel search",
          "trip planning",
          "compare travel",
          "destination research"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Travel options and sources"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No result; no settlement"
          }
        }
      }
    },
    "/_api/buyer_contract_quote": {
      "post": {
        "operationId": "checkBuyerContractFree",
        "summary": "Free preflight: can VIA satisfy these buyer constraints?",
        "description": "Free no-payment preflight. Returns satisfiableNow, qualifying candidate count and timestamp; candidate identities/details are withheld.",
        "tags": [
          "free",
          "preflight",
          "budget",
          "procurement",
          "constraints"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "required": ["intent"],
                "properties": {
                  "intent": {"type":"string","minLength":2,"maxLength":500,"description":"What the API or service should do; a budget alone is not a task."},
                  "market": {"type":"string","enum":["services","commerce"]},
                  "country": {"type":"string","pattern":"^[A-Z]{2}$"},
                  "language": {"type":"string"},
                  "constraints": {"type":"object"}
                },
                "example": {"intent":"Find a paid API for extracting selectable text from public PDF files","market":"services","country":"US","language":"en","constraints":{"minAlternatives":1,"requireKnownPrice":true}}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Free satisfiability check"
          },
          "422": {
            "description": "Specify a concrete buyer goal. No payment requested."
          }
        }
      }
    },
    "/_api/procure_under_budget": {
      "get": {"operationId": "procure_under_budget_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.02"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "findUnderBudgetWithAlternatives",
        "summary": "Find services under budget",
        "description": "Declare maximum supplier price and minimum alternatives. VIA settles only if enough qualifying candidates exist, then returns recommendation, alternatives and a PASS receipt.",
        "tags": [
          "budget",
          "procurement",
          "alternatives",
          "buyer-side",
          "constraints"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "required": ["intent"],
                "properties": {
                  "intent": {"type":"string","minLength":2,"maxLength":500,"description":"What the API or service should do; a budget alone is not a task."},
                  "market": {"type":"string","enum":["services","commerce"]},
                  "country": {"type":"string","pattern":"^[A-Z]{2}$"},
                  "language": {"type":"string"},
                  "constraints": {"type":"object"}
                },
                "example": {"intent":"Find a paid API for extracting selectable text from public PDF files","market":"services","country":"US","language":"en","constraints":{"minAlternatives":1,"requireKnownPrice":true}}
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Contract passed and paid result delivered"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "Constraints not satisfied; no settlement"
          }
        }
      }
    },
    "/_api/buyer_contract": {
      "get": {"operationId": "buyer_contract_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "0.02"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "procureUnderBudgetBuyerContract",
        "summary": "Buy within budget with constraints",
        "description": "Describe what the API, service or product must do, then set any price and shortlist constraints separately. A budget alone is not a task. VIA settles only when the shortlist passes the constraints; it does not buy from suppliers.",
        "tags": [
          "procurement",
          "under-budget",
          "buyer-side",
          "constraints",
          "alternatives",
          "comparison"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {"intent":"Find a paid API for extracting selectable text from public PDF files","market":"services","country":"US","language":"en","constraints":{"minAlternatives":1,"requireKnownPrice":true}},
                "required": [
                  "intent"
                ],
                "properties": {
                  "intent": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 500
                  },
                  "market": {
                    "type": "string",
                    "enum": [
                      "services",
                      "commerce"
                    ],
                    "default": "services"
                  },
                  "country": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$",
                    "default": "US"
                  },
                  "language": {
                    "type": "string",
                    "enum": ["en", "pt", "pt-BR", "es", "fr", "it", "de"],
                    "default": "en"
                  },
                  "constraints": {
                    "type": "object",
                    "properties": {
                      "maxSupplierPriceUsd": {
                        "type": "number",
                        "exclusiveMinimum": 0
                      },
                      "minAlternatives": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 3,
                        "default": 0
                      },
                      "allowedSources": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Apify Store",
                            "Circle Marketplace",
                            "Coinbase Bazaar",
                            "MPP Directory",
                            "Shopify Catalog",
                            "UCP Registry",
                            "UCP Direct",
                            "Sovrn Commerce"
                          ]
                        }
                      },
                      "requireKnownPrice": {
                        "type": "boolean",
                        "default": false
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Buyer Contract satisfied; shortlist plus machine-readable PASS receipt delivered"
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "Buyer Contract not satisfied; no payment settled"
          }
        }
      }
    },
    "/_api/deep_route": {
      "get": {"operationId": "deep_route_get", "summary": "Same paid service via GET: send the buyer task in ?need=", "parameters": [{"name": "need", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 500}}], "x-payment-info": {"protocols": [{"x402": {}}], "price": {"mode": "fixed", "currency": "USD", "amount": "1.00"}, "network": "eip155:8453", "asset": "USDC"}, "responses": {"200": {"description": "Paid result"}, "400": {"description": "Missing or invalid task; nothing charged"}, "402": {"description": "x402 payment required"}}},
      "post": {
        "operationId": "viaDeepRoute",
        "summary": "Deep research decision brief",
        "description": "Premium buyer-side decision route. Evaluates up to 8 real candidates and returns a decision brief, selection rationale and explicit watchouts in addition to recommendation and alternatives. Payment settles only after candidates and decision analysis are successfully prepared.",
        "tags": [
          "deep-research",
          "comparison",
          "travel-research",
          "information-research"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteRequest"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "1.00"
          },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Deep paid decision delivered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "paid",
                    "tier",
                    "intent",
                    "viaTollUsd",
                    "recommendation",
                    "alternatives",
                    "decisionBrief",
                    "selectionRationale",
                    "watchouts",
                    "sourcesConsidered",
                    "settlement"
                  ],
                  "properties": {
                    "paid": {
                      "type": "boolean",
                      "const": true
                    },
                    "tier": {
                      "type": "string",
                      "const": "deep"
                    },
                    "intent": {
                      "type": "string"
                    },
                    "viaTollUsd": {
                      "type": "number",
                      "const": 1
                    },
                    "recommendation": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "alternatives": {
                      "type": "array",
                      "maxItems": 7,
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "decisionBrief": {
                      "type": "string"
                    },
                    "selectionRationale": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "watchouts": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "sourcesConsidered": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 8
                    },
                    "settlement": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "x402 payment challenge"
          },
          "422": {
            "description": "No matching route; payment not settled"
          }
        }
      }
    },
    "/_api/credits_buy": {
      "post": {
        "operationId": "viaBuyCredits",
        "summary": "PAUSED: USDC credit packs are not on sale (HTTP 503 topups_paused, nothing charged)",
        "description": "Body {\"tier\":\"1\"|\"5\"|\"20\"|\"100\"}. Adds that many USD of credit to the key sent as Authorization: Bearer via_… (1 USDC = 1 USD, no fee). Without a key, the HTTP 402 quote registers a new key and returns it before you pay. Pay the PAYMENT-REQUIRED challenge and repeat the identical request with PAYMENT-SIGNATURE; credit is added exactly once. Purchased credit does not expire. Card top-ups of any amount from 5 USD: /credits or POST /_api/credits_card_checkout.",
        "tags": [
          "credits",
          "prepaid"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tier"
                ],
                "properties": {
                  "tier": {
                    "type": "string",
                    "enum": [
                      "1",
                      "5",
                      "20"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Credit token and funded balance returned"
          },
          "402": {
            "description": "x402 payment challenge for selected pack"
          }
        }
      }
    },
    "/_api/credits_route": {
      "post": {
        "operationId": "viaRouteWithCredits",
        "summary": "Route using prepaid credits",
        "description": "Consumes0.01 USD credit only when a services or commerce result is durably saved. Requires the credit key as Authorization: Bearer YOUR_VIA_KEY or x-credit-token. Idempotency-Key (UUID, or requestId in JSON) is optional: without it VIA derives one from key and input, so an identical retry returns the saved answer without another debit; send a new UUID to repeat the same task. A UUID reused with changed input returns409. No result means no debit. The same key and balance also pay VIA Extract (0.02 USD) and Web Text Lite (0.001 USD) on /_api/extract_page and /_api/extract_web_lite. The same balance also pays AI inference per token on /_api/v1/chat/completions. This credit does not fund third-party suppliers.",
        "tags": [
          "credits",
          "routing",
          "api-comparison",
          "product-search"
        ],
        "parameters": [
          {
            "name": "x-credit-token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditRouteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recommendation delivered and $0.01 credit atomically deducted"
          },
          "401": {
            "description": "Missing or invalid credit token"
          },
          "402": {
            "description": "Expired or insufficient credit"
          },
          "422": {
            "description": "No result; no credit deducted"
          }
        }
      }
    },
    "/_api/credits_balance": {
      "get": {
        "operationId": "viaCreditBalance",
        "summary": "Check VIA prepaid credit balance",
        "tags": [
          "credits"
        ],
        "parameters": [
          {
            "name": "x-credit-token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current credit balance and expiry"
          },
          "404": {
            "description": "Unknown credit token"
          }
        }
      }
    },
    "/_api/inference_x402": {
      "post": {
        "operationId": "viaInferenceX402",
        "deprecated": true,
        "summary": "CLOSED: per-request x402 inference is not on sale (HTTP 503 x402_unavailable, nothing charged). Use /_api/v1/chat/completions with a prepaid VIA key.",
        "description": "Not on sale; kept for reference only. Previously: send an OpenAI-style non-streaming chat body with a model id. Without PAYMENT-SIGNATURE: HTTP 402 with the exact price for this request in PAYMENT-REQUIRED (from 0.004 USDC; payee: VIA transit wallet 0x343d1a22B8E12b1A0a54731B4d157C556178c299). Sign it and repeat the identical POST with PAYMENT-SIGNATURE: the answer and the receipt (via.transaction, via.amountUsdc, via.payTo) come back; the payment settles first and, if the answer then cannot be produced, is refunded automatically to the paying wallet (refund.transaction in the 502 body); the same signed retry returns the stored answer without a second charge. An empty body returns the free model list.",
        "tags": ["inference", "x402"],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["model", "messages"], "properties": {
          "model": { "type": "string", "description": "A model id from GET /_api/v1/models (all are sold here by x402)." },
          "messages": { "type": "array", "minItems": 1, "items": { "type": "object", "required": ["role", "content"], "properties": { "role": { "type": "string", "enum": ["system", "developer", "user", "assistant"] }, "content": { "type": "string" } } } },
          "max_tokens": { "type": "integer", "minimum": 1, "maximum": 8192 }
        } } } } },
        "responses": {
          "200": { "description": "Chat completion plus the via receipt; PAYMENT-RESPONSE header" },
          "402": { "description": "Payment required (quote) or payment rejected; nothing charged" },
          "409": { "description": "Authorization already used; never charged twice" },
          "502": { "description": "Provider failure after settlement; automatic refund to the paying wallet (refund object)" },
          "503": { "description": "Temporarily unavailable; nothing charged" }
        }
      }
    },
    "/_api/v1/models": {
      "get": {
        "operationId": "viaListInferenceModels",
        "summary": "List VIA AI inference models and token prices (free)",
        "description": "OpenAI-compatible model list with live prices. HTTP 200 with the models on sale and their prices (an empty list means none is on sale); pricing.minimum_per_request appears only for models that have one (pricing.minimum_per_request). gpt-oss-120b is currently not available. Returns 404 if inference is unavailable.",
        "tags": ["inference"],
        "responses": {
          "200": { "description": "Model list with pricePerMillionTokensUsd {input, output}" },
          "404": { "description": "Inference unavailable" }
        }
      }
    },
    "/_api/v1/chat/completions": {
      "post": {
        "operationId": "viaChatCompletions",
        "summary": "PAUSED: no chat model is on sale (GET /_api/v1/models is empty; requests refused, nothing charged). When reopened: OpenAI-compatible chat completion billed per token from prepaid balance",
        "description": "Models (see GET /_api/v1/models for the live list): only ids listed by GET /_api/v1/models are sold, at the prices listed there; any other id is refused with nothing charged. Works with the official OpenAI SDKs: set base_url to https://via-router.floot.app/_api/v1 and api_key to your VIA key (a prepaid key funded by card at /credits). Idempotency-Key is optional (official SDKs send none); send one on retries to avoid a second charge. Accepted: temperature, top_p, stop, seed, frequency_penalty, presence_penalty, reasoning_effort, response_format (text or json_object), max_tokens or max_completion_tokens (up to 8192, default 2048), stream. stream=true is accepted and the answer is delivered as server-sent events once generation has finished (not token by token). Not supported: tools, n greater than 1, images. The maximum possible cost is reserved first, the real usage is charged after the answer and the rest is returned; a provider failure deducts nothing. Repeating the same request with the same Idempotency-Key returns the stored answer without a second charge. Response headers X-VIA-Receipt-Id, X-VIA-Charge-USD and X-VIA-Charge-Nano-USD carry the receipt. Error texts follow Accept-Language or the language of the user message; error codes are stable.",
        "tags": ["inference", "credits"],
        "parameters": [
          { "name": "Idempotency-Key", "in": "header", "required": false, "schema": { "type": "string" } }
        ],
        "requestBody": {
          "required": true,
          "content": { "application/json": { "schema": { "type": "object", "required": ["model", "messages"], "properties": {
            "model": { "type": "string", "description": "A model id from GET /_api/v1/models, (only ids in that list are sold)." },
            "messages": { "type": "array", "minItems": 1, "maxItems": 64, "items": { "type": "object", "required": ["role", "content"], "properties": { "role": { "type": "string", "enum": ["system", "developer", "user", "assistant"] }, "content": { "oneOf": [{ "type": "string", "maxLength": 100000 }, { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["text"] }, "text": { "type": "string" } } } }] } } } },
            "max_tokens": { "type": "integer", "minimum": 1, "maximum": 8192 },
            "max_completion_tokens": { "type": "integer", "minimum": 1, "maximum": 8192 },
            "temperature": { "type": "number", "minimum": 0, "maximum": 2 },
            "top_p": { "type": "number", "maximum": 1 },
            "stop": { "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" }, "maxItems": 4 }] },
            "seed": { "type": "integer" },
            "frequency_penalty": { "type": "number", "minimum": -2, "maximum": 2 },
            "presence_penalty": { "type": "number", "minimum": -2, "maximum": 2 },
            "reasoning_effort": { "type": "string", "enum": ["low", "medium", "high"] },
            "response_format": { "type": "object", "properties": { "type": { "type": "string", "enum": ["text", "json_object"] } } },
            "stream": { "type": "boolean" },
            "stream_options": { "type": "object", "properties": { "include_usage": { "type": "boolean" } } }
          } } } }
        },
        "responses": {
          "200": { "description": "Chat completion with usage; charged from the real usage" },
          "400": { "description": "Invalid request, model or unsupported parameter (error.param names it)" },
          "401": { "description": "Missing or unknown VIA key" },
          "402": { "description": "Insufficient or expired prepaid balance; nothing charged" },
          "409": { "description": "Idempotency-Key reused with different input or still processing" },
          "502": { "description": "Provider failure; nothing charged" }
        }
      }
    },
    "/_api/credits_receipt": {
      "get": {
        "operationId": "viaCreditReceipt",
        "summary": "Receipt for one prepaid request",
        "description": "Returns the settled charge for a request paid from prepaid credit. Requires the same key that paid; requestId is the UUID used as Idempotency-Key.",
        "tags": ["credits", "inference"],
        "parameters": [
          { "name": "x-credit-token", "in": "header", "required": true, "schema": { "type": "string" } },
          { "name": "requestId", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid" } }
        ],
        "responses": {
          "200": { "description": "Receipt with state, charged amount and rate" },
          "404": { "description": "No such request for this key" }
        }
      }
    },
    "/_api/extract_web_lite": {
  "post": {
    "operationId": "extractPublicWebTextLite",
    "summary": "Extract text from web page",
    "description": "Extract clean text, title and headings from a public HTML or plain-text web page up to 1 MiB for $0.001 USDC on Base. Maximum 10000 output characters; no PDF, OCR, JavaScript rendering or link collection. Extraction runs before settlement; failed extraction is not charged. Also payable with prepaid VIA credit (0.001 USD): send Authorization: Bearer YOUR_VIA_KEY (or x-credit-token); Idempotency-Key is optional, a retry of the same input never charges twice; failed extraction deducts nothing. Do not send both a credit key and PAYMENT-SIGNATURE.",
    "tags": [
      "web-scraping",
      "web-page",
      "extract-text",
      "text-extraction",
      "html"
    ],
    "requestBody": {
      "required": true,
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "type": "string",
                "minLength": 8,
                "maxLength": 2000,
                "description": "Public HTTP(S) HTML or plain-text URL; no PDF"
              },
              "maxChars": {
                "type": "integer",
                "minimum": 500,
                "maximum": 10000,
                "default": 10000
              },
              "includeLinks": {
                "type": "boolean",
                "const": false,
                "default": false
              }
            }
          },
          "example": {
            "url": "https://example.com/"
          }
        }
      }
    },
    "x-payment-info": {
      "protocols": [
        {
          "x402": {}
        }
      ],
      "price": {
        "mode": "fixed",
        "currency": "USD",
        "amount": "0.001"
      },
      "network": "eip155:8453",
      "networks": [
        "eip155:8453"
      ],
      "asset": "USDC"
    },
    "responses": {
      "200": {
        "description": "Extracted web text. The JSON body holds the result under a top-level `json` key (paid, url, finalUrl, contentType, title, headings, text, characters, truncated, viaTollUsd, settlement); the settlement receipt is also in the PAYMENT-RESPONSE header. Errors have no `json` key."
      },
      "400": {
        "description": "Invalid input; no charge"
      },
      "402": {
        "description": "Payment required (x402)"
      },
      "422": {
        "description": "PDF, unsupported, oversized or empty source; no charge"
      },
      "503": {
        "description": "Source unavailable; no charge"
      }
    }
  }
},
    "/_api/extract_page": {
      "post": {
        "operationId": "viaExtractPage",
        "summary": "Extract text from PDF",
        "description": "Fetches a public http(s) web page or text-based PDF and returns title, description, headings and clean text. Limits: one URL up to 5 MiB; default 30,000 output characters (maxChars 500-100000); no OCR (scanned PDFs without a text layer) or JavaScript rendering. The extraction runs before settlement: if the URL is blocked, unreachable, empty or unsupported, no payment is settled. Pay with x402 in USDC on Base, or with prepaid VIA credit (0.02 USD): send Authorization: Bearer YOUR_VIA_KEY (or x-credit-token); Idempotency-Key is optional, a retry of the same input never charges twice and a new Idempotency-Key buys the same URL again; failed extraction deducts nothing. Do not send both a credit key and PAYMENT-SIGNATURE.",
        "tags": ["extract", "web-scraping", "pdf", "text-extraction", "web-content"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["url"],
                "properties": {
                  "url": { "type": "string", "minLength": 8, "maxLength": 2000, "description": "Public http(s) URL of a web page or PDF" },
                  "maxChars": { "type": "integer", "minimum": 500, "maximum": 100000, "default": 30000 },
                  "includeLinks": { "type": "boolean", "default": false }
                }
              },
              "example": { "url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" }
            }
          }
        },
        "x-payment-info": {
          "protocols": [{ "x402": {} }],
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.02" },
          "network": "eip155:8453",
          "networks": ["eip155:8453"],
          "asset": "USDC"
        },
        "responses": {
          "200": { "description": "Extracted content. The JSON body holds the result under a top-level `json` key (paid, url, finalUrl, contentType, title, description, headings, pages, text, characters, truncated, links, viaTollUsd, settlement); the settlement receipt is also in the PAYMENT-RESPONSE header. Errors have no `json` key." },
          "400": { "description": "Invalid or blocked URL; no charge" },
          "402": { "description": "Payment required (x402)" },
          "422": { "description": "Content unsupported or empty; no charge" },
          "503": { "description": "Source unreachable; no charge, retryable" }
        }
      }
    },
    "/_api/via_direct": {
      "post": {
        "operationId": "viaDirect",
        "summary": "Hash, extract text, compare APIs or research",
        "description": "Send one request. VIA identifies the service it executes itself (hash 0.003, web text lite 0.001, document/page text 0.02, API comparison 0.01, sourced research 0.01), returns the x402 payment challenge for exactly that price, and after the signed retry executes and delivers the result with the settlement receipt. A request VIA cannot execute is answered immediately as unavailable (HTTP 422, available:false) with chargeInitiated:false; no supplier is searched and nothing is charged. An empty body returns the free catalog (also GET /_api/via_direct).",
        "tags": ["via-direct", "agent-tool", "hash", "extract", "compare", "research"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "task": { "type": "string", "minLength": 2, "maxLength": 1000, "description": "Plain-language task, e.g. 'Extract text from https://example.com/a.pdf', 'Compare PDF text extraction APIs'" },
                  "service": { "type": "string", "enum": ["hash", "sha256", "sha512", "web_text", "document_text", "api_comparison", "sourced_research"] },
                  "text": { "type": "string", "maxLength": 20000, "description": "Input for hash" },
                  "algorithm": { "type": "string", "enum": ["sha256", "sha512"] },
                  "url": { "type": "string", "description": "Public https URL for web_text / document_text" }
                }
              },
              "example": { "task": "Compare PDF text extraction APIs" }
            }
          }
        },
        "x-payment-info": {
          "protocols": [{ "x402": {} }],
          "price": { "mode": "dynamic", "currency": "USD", "min": "0.001", "max": "0.02" },
          "network": "eip155:8453",
          "asset": "USDC"
        },
        "responses": {
          "200": { "description": "Delivered result with PAYMENT-RESPONSE receipt (shape depends on the service)" },
          "402": { "description": "x402 payment challenge for the identified service" },
          "422": { "description": "Unavailable: VIA does not execute this request itself. Nothing charged." }
        }
      }
    },
    "/_api/hash_tool": {
      "post": {
        "operationId": "viaHashTool",
        "summary": "SHA256 hash of text",
        "description": "Generate a deterministic digest after x402 settlement in USDC on Base or Polygon. Returns the selected algorithm, hexadecimal and Base64 digests, UTF-8 input byte count and settlement receipt.",
        "tags": [
          "hash",
          "sha256",
          "sha512",
          "crypto",
          "utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20000
                  },
                  "algorithm": {
                    "type": "string",
                    "enum": [
                      "sha256",
                      "sha512"
                    ],
                    "default": "sha256"
                  }
                }
              },
              "example": {
                "text": "hello",
                "algorithm": "sha256"
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.003"
          },
          "network": "eip155:8453",
          "networks": [
            "eip155:8453",
            "eip155:137"
          ],
          "asset": "USDC"
        },
        "responses": {
          "200": {
            "description": "Paid hash result delivered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "paid",
                    "algo",
                    "hex",
                    "base64",
                    "bytes",
                    "settlement"
                  ],
                  "properties": {
                    "paid": {
                      "type": "boolean",
                      "const": true
                    },
                    "algo": {
                      "type": "string",
                      "enum": [
                        "sha256",
                        "sha512"
                      ]
                    },
                    "hex": {
                      "type": "string"
                    },
                    "base64": {
                      "type": "string"
                    },
                    "bytes": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "settlement": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or input"
          },
          "402": {
            "description": "x402 payment challenge"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "RouteRequest": {
        "type": "object",
        "required": [
          "intent"
        ],
        "properties": {
          "intent": {
            "type": "string",
            "minLength": 2,
            "maxLength": 500,
            "description": "Plain-language task or buying/research intent"
          },
          "market": {
            "type": "string",
            "enum": [
              "auto",
              "services",
              "commerce",
              "information",
              "travel"
            ],
            "default": "auto"
          },
          "country": {
            "type": "string",
            "pattern": "^[A-Z]{2}$",
            "default": "US"
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "pt"
            ],
            "default": "en"
          }
        }
      },
      "CreditRouteRequest": {
        "type": "object",
        "required": [
          "intent"
        ],
        "properties": {
          "intent": {
            "type": "string",
            "minLength": 2,
            "maxLength": 500
          },
          "market": {
            "type": "string",
            "enum": [
              "services",
              "commerce"
            ],
            "default": "services"
          },
          "country": {
            "type": "string",
            "pattern": "^[A-Z]{2}$",
            "default": "US"
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "pt"
            ],
            "default": "en"
          }
        }
      },
      "RouteResponse": {
        "type": "object",
        "required": [
          "paid",
          "intent",
          "viaTollUsd",
          "recommendation",
          "alternatives"
        ],
        "properties": {
          "paid": {
            "type": "boolean",
            "const": true
          },
          "intent": {
            "type": "string"
          },
          "viaTollUsd": {
            "type": "number"
          },
          "recommendation": {
            "type": "object",
            "additionalProperties": true
          },
          "alternatives": {
            "type": "array",
            "maxItems": 3,
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "settlement": {
            "type": "object",
            "additionalProperties": true
          }
        }
      }
    },
    "securitySchemes": {
      "viaCreditToken": {"type":"apiKey","in":"header","name":"x-credit-token","description":"Private prepaid VIA credit key. Keep out of URLs, public logs and repositories. Also accepted as Authorization: Bearer. Comparisons debit 0.01 USD, Extract 0.02 USD, Web Text Lite 0.001 USD. Idempotency-Key is optional."},
      "x402Payment": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 V2 payment credential supplied on the retry after the server returns HTTP 402 Payment Required. Free quote endpoints do not require this header."
      }
    }
  }
}
