Price one machine (the x402 offer)
compute_quoteGets the exact price of one machine without paying: sends the create request with no payment and returns the API's HTTP 402 offer, one leg per network, each with the amount in USDC, the address it is paid to, the token, how long a signature stays good, and what to sign. The API checks the plan, the hours and the setup first, so a refusal costs nothing. Pass machine_id and hours instead to price a renewal of a running machine (any wallet may pay one). Where the API sells quarter-hours (compute_plans shows minutePrices), send minutes (15, 30 or 45) in place of hours. For a plan that lists regions (compute_plans shows them), send region. Send ai_usd (1, 5, 25 or 100) to buy that AI balance in the same payment: the paying wallet gets it, and a key on it arrives in the machine's sealed env as AGENTGATES_API_KEY. To buy, sign one leg with your own wallet and send the same request with an X-PAYMENT header (compute_docs has the whole contract).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "compute_quote"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | No | A plan id from compute_plans. Not with machine_id. | |
| port | No | With image: the container port behind 8080 (default 80). | |
| hours | No | Prepaid hours (within the plan's range), or hours to add on a renewal. Or send minutes. | |
| image | No | One container image, served on host port 8080, e.g. nginx:alpine. Or send compose. | |
| ai_usd | No | A new machine only: dollars of AI bought in the same payment, for the paying wallet; a key on that balance arrives in the machine's sealed env as AGENTGATES_API_KEY. Paid over x402 only. | |
| region | No | For a plan that lists regions (compute_plans shows them): the region to run in, by its id. Absent, the plan's first. | |
| compose | No | A docker-compose.yml as a string. It must publish a port. Or send image. | |
| minutes | No | In place of hours, where the API sells quarter-hours (compute_plans shows minutePrices): 15, 30 or 45 minutes, on every plan but GPU. A quarter-hour costs more per hour than an hour. | |
| machine_id | No | Price a renewal of this machine instead of a new one (with hours or minutes only). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| code | No | ||
| kind | No | ||
| legs | No | ||
| next | No | ||
| error | No | ||
| status | No | ||
| request | No | ||
| resource | No | ||
| description | No | ||
| x402Version | No |