RouteMyAgent X402 API

The X402 API from RouteMyAgent — 6 operation(s) for x402.

GitHub OpenAPI

Operations 7

GET /api/x402/mcp-credit New prepaid MCP credit sales are retired #
POST /api/x402/mcp-credit Earlier wallet routing-credit purchase is retired in managed mode #
GET /api/x402/mcp-credit/{request_key} Check a purchase without making another payment #
GET /api/x402/mcp-tools Schema/history reference, not an active hosted model-call authorization #
POST /x402/v1/chat/completions Pay a routing-tooling fee for one completed BYOK NVIDIA request #
POST /x402/v1/messages Pay a routing-tooling fee for one completed BYOK NVIDIA request #
POST /x402/v1/responses Pay a routing-tooling fee for one completed BYOK NVIDIA request #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/routemyagent-dev:routemyagent-dev-x402-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

routemyagent-dev-x402-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: support@routemyagent.dev
    name: RouteMyAgent Support
    url: https://routemyagent.dev/guides/x402
  description: Free account-based stateless routing and MCP model help, with optional one-time support. Provider inference is billed separately. The small local OS-vault app sends approved provider-key envelopes and model content through RMA. RMA decrypts/processes the selected key and request/response content transiently without persisting new routed payloads. Account/token-hash/consent/support-payment metadata and historical archives remain separate. Fresh processing consent is required; V2 direct AgentNet configurations are not migrated.
  title: RouteMyAgent free account routing X402 API
  version: 0.6.1
servers:
- url: https://routemyagent.dev
tags:
- name: X402
paths:
  /api/x402/mcp-credit:
    get:
      deprecated: true
      description: Retired production quote/purchase entry, not a new quote. Existing an_ router Bearer token or valid Clerk account JWT authenticates its HTTP 410 response. Specific historical /{request_key} status/recovery is separately router-token scoped and makes no new payment or inference.
      operationId: retiredMcpCreditQuote
      responses:
        '401':
          description: Authentication is required.
        '410':
          description: New prepaid credit sales are retired; historical receipt status and reconciliation remain available.
      security:
      - apiKey: []
      - ownerBearer: []
      summary: New prepaid MCP credit sales are retired
      tags:
      - X402
    post:
      deprecated: true
      description: This legacy purchase returns HTTP 410 before authentication; it does not create a payment, credit or model call. Existing authorized historical status/reconciliation stays separate.
      operationId: retiredRetiredMcpCreditPurchase
      responses:
        '410':
          description: Retired route; existing authorized historical reads/deletion remain separate.
      security:
      - apiKey: []
      - ownerBearer: []
      - {}
      summary: Earlier wallet routing-credit purchase is retired in managed mode
      tags:
      - X402
  /api/x402/mcp-credit/{request_key}:
    get:
      description: Read an existing account-linked wallet-credit payment by its original purchase identity. Requires an existing private an_ router Bearer token; Clerk/OAuth/provider credentials do not replace it. No provider key, new payment or inference is submitted.
      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
      tags:
      - X402
  /api/x402/mcp-tools:
    get:
      deprecated: true
      description: Retired in ephemeral mode. It does not create provider attachments, legacy access, payments or model requests. Use managed V3 setup after fresh consent.
      operationId: publicWalletMcpToolCatalog
      responses:
        '410':
          description: Retired route; existing authorized historical reads/deletion remain separate.
      security: []
      summary: Schema/history reference, not an active hosted model-call authorization
      tags:
      - X402
  /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: {}
      tags:
      - X402
      operationId: postX402V1ChatCompletions
      x-operation-id-source: derived
  /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: {}
      tags:
      - X402
      operationId: postX402V1Messages
      x-operation-id-source: derived
  /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: {}
      tags:
      - X402
      operationId: postX402V1Responses
      x-operation-id-source: derived
components:
  schemas:
    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
    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
  securitySchemes:
    agentManagementBearer:
      description: Private setup/management credential accepted by existing authentication; keep it separate from provider keys and inference authorization.
      scheme: bearer
      type: http
    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
    connectorBearer:
      description: New consent-registered revocable RMA token from the PRIVATE V3 bootstrap. Legacy tokens do not acquire this scope.
      scheme: bearer
      type: http
    mcpReadBearer:
      description: Configured resource-bound MCP OAuth token with mcp:read; accepted for account-scoped call-record reads only, never owner billing management.
      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
    ownerBearer:
      description: Authenticated account owner. Existing role, account and origin checks are required; a provider key is never an owner credential.
      scheme: bearer
      type: http
externalDocs:
  description: Managed routing setup and boundaries
  url: https://routemyagent.dev/docs
x-local-credentials:
  guide: /keys
  inference_execution: customer_connector_direct_to_provider
  legacy_file_tools: /downloads/routemyagent-key-manager.html
  mode: customer_local_router
  new_provider_key_destination: native_os_credential_store
  new_server_attachments: false
  platform_verification: Preview package/runtime evidence must be reported separately; no all-platform or zero-knowledge certification.
  provider_credentials_in_connection_document: false
x-provider-connection-scope: Each private V3 bootstrap selects provider/model/client/mode after fresh processing consent. The local app saves provider keys; RMA decrypts and processes approved keys and model content transiently. No new payload persistence; account/billing/consent metadata and historical archives remain separate.
x-provider-data-policy-audited: false