{"components":{"schemas":{"CreditReceipt":{"properties":{"cents":{"const":500,"description":"Purchase amount in USD cents. Credit is applied only when state is settled.","type":"integer"},"created_at":{"description":"Unix time in seconds.","type":"integer"},"id":{"type":"string"},"request_key":{"$ref":"#/components/schemas/RequestKey"},"settlement":{"type":["object","null"]},"state":{"enum":["settling","settled","failed","unknown"],"type":"string"},"transaction":{"type":["string","null"]},"updated_at":{"description":"Unix time in seconds.","type":"integer"}},"required":["id","request_key","state","cents","transaction","settlement","created_at","updated_at"],"type":"object"},"PaymentQuote":{"properties":{"accepts":{"items":{"properties":{"amount":{"const":"5000000","description":"5 USDC in six-decimal atomic units.","type":"string"},"asset":{"const":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","type":"string"},"extra":{"type":"object"},"maxTimeoutSeconds":{"const":120,"type":"integer"},"network":{"const":"eip155:8453","type":"string"},"payTo":{"description":"Use the recipient from the current live quote.","pattern":"^0x[0-9a-fA-F]{40}$","type":"string"},"scheme":{"const":"exact","type":"string"}},"required":["scheme","network","asset","amount","payTo","maxTimeoutSeconds"],"type":"object"},"minItems":1,"type":"array"},"error":{"type":"string"},"extensions":{"type":"object"},"resource":{"properties":{"description":{"type":"string"},"mimeType":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["url"],"type":"object"},"x402Version":{"const":2,"type":"integer"}},"required":["x402Version","resource","accepts","extensions"],"type":"object"},"QuotePreview":{"properties":{"purchase_method":{"const":"POST","type":"string"},"purchase_url":{"format":"uri","type":"string"},"quote":{"$ref":"#/components/schemas/PaymentQuote"}},"required":["purchase_method","purchase_url","quote"],"type":"object"},"RequestKey":{"description":"One unique owner-approved purchase identifier, retained for status checks and safe retries.","maxLength":100,"minLength":16,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"securitySchemes":{"apiKey":{"description":"Private RouteMyAgent router token (an_ prefix) created by the account owner. This is not an NVIDIA key, wallet secret or CDP credential. Obtain it through the signed-in RouteMyAgent dashboard. Public unsigned quote requests do not require it.","scheme":"bearer","type":"http"},"nvidiaByok":{"description":"Your NVIDIA API key, required for inference execution and same-request replay. Never put it in prompts, tool arguments, payment metadata or URLs. Receipt status needs only the original private request ID.","in":"header","name":"X-NVIDIA-API-Key","type":"apiKey"},"workspaceBearer":{"description":"Private gw_ workspace management credential. Inference instead requires an_ router token.","scheme":"bearer","type":"http"}}},"externalDocs":{"description":"Setup, payment and recovery instructions","url":"https://routemyagent.dev/guides/x402"},"info":{"contact":{"email":"support@routemyagent.dev","name":"RouteMyAgent Support","url":"https://routemyagent.dev/guides/x402"},"description":"MCP model help costs $0.001 per successful call. Fund an existing RouteMyAgent account with $5 prepaid MCP credit using USDC on Base. This purchase funds credit, not an immediate model response. An existing account, private router token, customer-supplied NVIDIA key and separate owner consent for MCP billing are required. Direct gateway routing remains free. See the guide before paying.","title":"RouteMyAgent MCP Credit","version":"1.1.0"},"openapi":"3.1.0","paths":{"/api/guest":{"delete":{"description":"Requires the private workspace cookie, same-origin Origin and x-csrf-token from its private session; alternatively management Bearer is accepted. Does not revoke router tokens, disconnect the provider key, delete records or refund credit.","responses":{"200":{"description":"Cookie cleared"},"401":{"description":"Workspace authentication required"},"403":{"description":"Invalid origin or CSRF"}},"security":[{"workspaceBearer":[]}],"summary":"Forget the current browser workspace cookie"},"post":{"description":"Generate and save 32 cryptographically random bytes as gw_ followed by64 lowercase hex characters before sending. Reuse the same secret for uncertain retries. This secret manages the workspace; it is not an inference token. No provider key or inference is included. Browser requests receive an HttpOnly Secure SameSite=Strict cookie. Keep the response and management credential private.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"workspace_token":{"pattern":"^gw_[0-9a-f]{64}$","type":"string","writeOnly":true}},"required":["workspace_token"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Private workspace session with guest:true and csrf_token; never log its contents"},"400":{"description":"Invalid credential format"},"403":{"description":"Cross-site request"},"409":{"description":"Workspace suspended; contact support"},"429":{"description":"Creation/resume rate limit; wait before retrying"},"503":{"description":"Workspace capacity unavailable"}},"security":[],"summary":"Create or restore a private BYOK workspace without registration"}},"/api/x402/mcp-credit":{"get":{"description":"Free read-only preview. HTTP 200 is only a quote, never a settlement receipt. To buy, request the HTTP 402 challenge with unsigned POST and use that same POST for the signed payment. GET and HEAD reject PAYMENT-SIGNATURE with HTTP 405 and never contact the facilitator.","operationId":"previewMcpCreditQuote","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotePreview"}}},"description":"Informational preview; no charge."},"405":{"description":"Signed payments require POST; no payment was submitted.","headers":{"Allow":{"schema":{"const":"POST","type":"string"}}}},"503":{"description":"x402 is not configured."}},"security":[],"summary":"Preview the current quote without paying"},"post":{"description":"An unsigned request returns a public HTTP 402 quote without charging. To purchase, send your account's private router Bearer token, JSON idempotency_key and an x402 v2 PAYMENT-SIGNATURE covering exactly the returned quote. Only exact EIP-3009 USDC authorization on Base is accepted. This purchases credit, not a model response. Get owner approval before signing. After a timeout or an unknown/settling receipt, check status using the same idempotency key; do not create a new payment. Never send your NVIDIA key to this endpoint or to a directory.","operationId":"purchaseMcpCredit","parameters":[{"description":"Required to purchase; omit to obtain the public quote. Base64-encoded x402 v2 payment payload with the quoted resource and accepted requirements and an EIP-3009 USDC authorization. Sign only the current quote.","in":"header","name":"PAYMENT-SIGNATURE","required":false,"schema":{"maxLength":16384,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"idempotency_key":"owner-approved-unique-purchase-id"},"schema":{"additionalProperties":false,"properties":{"idempotency_key":{"$ref":"#/components/schemas/RequestKey"}},"required":["idempotency_key"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditReceipt"}}},"description":"Payment settled and $5 credited once, or an existing settled receipt returned. This is not an inference response.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 settlement result.","schema":{"type":"string"}}}},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditReceipt"}}},"description":"Settlement is in progress or uncertain. Do not pay again; query the receipt with the original idempotency key."},"400":{"description":"Invalid request, payment authorization or verification result; inspect the error."},"401":{"description":"A signed purchase requires a valid private router Bearer token for an existing account."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentQuote"}}},"description":"Public x402 v2 quote. No charge has occurred. Read current payment requirements from this response before signing.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 payment requirements.","schema":{"type":"string"}}}},"403":{"description":"Account suspended or origin not allowed."},"409":{"description":"Failed or conflicting purchase. Inspect the existing receipt; do not create a replacement payment without resolving it."},"503":{"description":"Payment service unavailable or settlement unconfirmed. Check the original purchase receipt before any further payment."}},"security":[{"apiKey":[]}],"summary":"Buy $5 prepaid MCP routing credit with USDC on Base","x-payment-info":{"price":{"amount":"5.00","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/api/x402/mcp-credit/{request_key}":{"get":{"description":"Read the authenticated account's receipt by the original idempotency key. This endpoint does not charge or resubmit settlement. A missing receipt is not proof that an interrupted in-flight request cannot still settle.","operationId":"getMcpCreditReceipt","parameters":[{"in":"path","name":"request_key","required":true,"schema":{"$ref":"#/components/schemas/RequestKey"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditReceipt"}}},"description":"Settled receipt."},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditReceipt"}}},"description":"Settlement pending or uncertain; do not pay again."},"400":{"description":"Invalid request key."},"401":{"description":"Missing or invalid router token."},"403":{"description":"Account suspended or origin not allowed."},"404":{"description":"No receipt found for this account and request key."},"409":{"description":"Failed receipt; inspect and resolve before another payment."}},"security":[{"apiKey":[]}],"summary":"Check a purchase without making another payment"}},"/x402/v1/chat/completions":{"post":{"description":"No RouteMyAgent account required. Supply your own NVIDIA key only in X-NVIDIA-API-Key; NVIDIA access and quota are your responsibility. The fee pays for routing tooling, not provider model access. A request without payment or an idempotency key returns a public quote without requiring your key. Execution requires the provider key, original private Idempotency-Key and owner-approved PAYMENT-SIGNATURE. Repeat inference POSTs require that same provider key; status recovery needs only the private ID. JSON and SSE output are buffered until confirmed settlement. Failed inference is not charged. On uncertainty check status; do not pay again.","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}},{"description":"Base64 x402 v2 PaymentPayload after owner-budget authorization. Omit for quote or recovery.","in":"header","name":"PAYMENT-SIGNATURE","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"max_tokens":64,"messages":[{"content":"Say hello","role":"user"}],"model":"z-ai/glm-5.3","stream":false},"schema":{"oneOf":[{"not":{"required":["max_completion_tokens"]},"required":["max_tokens"]},{"not":{"required":["max_tokens"]},"required":["max_completion_tokens"]}],"properties":{"max_completion_tokens":{"maximum":2048,"minimum":1,"type":"integer"},"max_tokens":{"maximum":2048,"minimum":1,"type":"integer"},"messages":{"description":"Native protocol conversation, including supported tool results","items":{"type":"object"},"type":"array"},"model":{"enum":["z-ai/glm-5.3","moonshotai/kimi-k2.6","z-ai/glm-5.3-flash","stepfun-ai/step-5-preview","nvidia/nemotron-3-ultra-550b-a55b","nvidia/nemotron-3.5-super-vl-120b-a12b","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-3.5-lightning-30b-a3b"],"type":"string"},"stream":{"default":false,"description":"true retains SSE framing but releases it only after completion and settlement; use false for MCP","type":"boolean"}},"required":["model"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Native JSON or buffered SSE result with PAYMENT-RESPONSE"},"202":{"description":"Running or uncertain settlement; retain Idempotency-Key and check status"},"400":{"description":"Invalid request or payment; no inference settlement submitted"},"402":{"description":"Exact payment quote; no charge yet"},"409":{"description":"Private request ID or payment nonce already used; do not create a replacement payment"},"410":{"description":"Paid result has expired; payment must not be repeated"},"502":{"description":"Upstream failure before settlement; this attempt is not charged"},"503":{"description":"Not configured or capacity unavailable; do not pay"}},"security":[{},{"nvidiaByok":[]}],"summary":"Pay a routing-tooling fee for one completed BYOK NVIDIA request","x-payment-info":{"price":{"amount":"0.001000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/x402/v1/messages":{"post":{"description":"No RouteMyAgent account required. Supply your own NVIDIA key only in X-NVIDIA-API-Key; NVIDIA access and quota are your responsibility. The fee pays for routing tooling, not provider model access. A request without payment or an idempotency key returns a public quote without requiring your key. Execution requires the provider key, original private Idempotency-Key and owner-approved PAYMENT-SIGNATURE. Repeat inference POSTs require that same provider key; status recovery needs only the private ID. JSON and SSE output are buffered until confirmed settlement. Failed inference is not charged. On uncertainty check status; do not pay again.","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}},{"description":"Base64 x402 v2 PaymentPayload after owner-budget authorization. Omit for quote or recovery.","in":"header","name":"PAYMENT-SIGNATURE","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"max_tokens":64,"messages":[{"content":"Say hello","role":"user"}],"model":"z-ai/glm-5.3","stream":false},"schema":{"properties":{"max_tokens":{"maximum":2048,"minimum":1,"type":"integer"},"messages":{"description":"Native protocol conversation, including supported tool results","items":{"type":"object"},"type":"array"},"model":{"enum":["z-ai/glm-5.3","moonshotai/kimi-k2.6","z-ai/glm-5.3-flash","stepfun-ai/step-5-preview","nvidia/nemotron-3-ultra-550b-a55b","nvidia/nemotron-3.5-super-vl-120b-a12b","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-3.5-lightning-30b-a3b"],"type":"string"},"stream":{"default":false,"description":"true retains SSE framing but releases it only after completion and settlement; use false for MCP","type":"boolean"}},"required":["model","max_tokens"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Native JSON or buffered SSE result with PAYMENT-RESPONSE"},"202":{"description":"Running or uncertain settlement; retain Idempotency-Key and check status"},"400":{"description":"Invalid request or payment; no inference settlement submitted"},"402":{"description":"Exact payment quote; no charge yet"},"409":{"description":"Private request ID or payment nonce already used; do not create a replacement payment"},"410":{"description":"Paid result has expired; payment must not be repeated"},"502":{"description":"Upstream failure before settlement; this attempt is not charged"},"503":{"description":"Not configured or capacity unavailable; do not pay"}},"security":[{},{"nvidiaByok":[]}],"summary":"Pay a routing-tooling fee for one completed BYOK NVIDIA request","x-payment-info":{"price":{"amount":"0.001000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/x402/v1/responses":{"post":{"description":"No RouteMyAgent account required. Supply your own NVIDIA key only in X-NVIDIA-API-Key; NVIDIA access and quota are your responsibility. The fee pays for routing tooling, not provider model access. A request without payment or an idempotency key returns a public quote without requiring your key. Execution requires the provider key, original private Idempotency-Key and owner-approved PAYMENT-SIGNATURE. Repeat inference POSTs require that same provider key; status recovery needs only the private ID. JSON and SSE output are buffered until confirmed settlement. Failed inference is not charged. On uncertainty check status; do not pay again.","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}},{"description":"Base64 x402 v2 PaymentPayload after owner-budget authorization. Omit for quote or recovery.","in":"header","name":"PAYMENT-SIGNATURE","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"input":"Say hello","max_output_tokens":64,"model":"z-ai/glm-5.3","stream":false},"schema":{"properties":{"input":{"description":"Native Responses input string or item array","oneOf":[{"type":"string"},{"items":{"type":"object"},"type":"array"}]},"max_output_tokens":{"maximum":2048,"minimum":1,"type":"integer"},"model":{"enum":["z-ai/glm-5.3","moonshotai/kimi-k2.6","z-ai/glm-5.3-flash","stepfun-ai/step-5-preview","nvidia/nemotron-3-ultra-550b-a55b","nvidia/nemotron-3.5-super-vl-120b-a12b","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-3.5-lightning-30b-a3b"],"type":"string"},"stream":{"default":false,"description":"true retains SSE framing but releases it only after completion and settlement; use false for MCP","type":"boolean"}},"required":["model","max_output_tokens"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Native JSON or buffered SSE result with PAYMENT-RESPONSE"},"202":{"description":"Running or uncertain settlement; retain Idempotency-Key and check status"},"400":{"description":"Invalid request or payment; no inference settlement submitted"},"402":{"description":"Exact payment quote; no charge yet"},"409":{"description":"Private request ID or payment nonce already used; do not create a replacement payment"},"410":{"description":"Paid result has expired; payment must not be repeated"},"502":{"description":"Upstream failure before settlement; this attempt is not charged"},"503":{"description":"Not configured or capacity unavailable; do not pay"}},"security":[{},{"nvidiaByok":[]}],"summary":"Pay a routing-tooling fee for one completed BYOK NVIDIA request","x-payment-info":{"price":{"amount":"0.001000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}}},"servers":[{"url":"https://routemyagent.dev"}]}