YourAITools Tool Route API

The ToolRoute API from YourAITools — 3 operation(s) for toolroute.

GitHub OpenAPI

Operations 4

GET /toolroute/v1/route Route a task to the few tools it needs out of a registered tool set (BM25… #
POST /toolroute/v1/route Same as GET, POST {"set_id":"ts_0d467a406d3eb14344c41c32d8802268","query":"read… #
POST /toolroute/v1/register Free: Register a tool set (tools array or remote MCP URL) and get its set_id #
POST /toolroute/mcp Free remote MCP (Streamable HTTP, JSON-RPC): register_tools, route_tools #

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/youraitools-co:youraitools-co-toolroute-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

youraitools-co-toolroute-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: YourAITools Tool Route API
  version: 1.0.0
  description: Pay-per-call tools for AI agents, paid per request in USDC via x402 on Base, Polygon, Arbitrum One or Solana, with each tool's own spec at https://api.youraitools.co//openapi.json.
  contact:
    email: hello@youraitools.co
    url: https://youraitools.co/built-by-us
servers:
- url: https://api.youraitools.co
tags:
- name: ToolRoute
paths:
  /toolroute/v1/route:
    get:
      operationId: toolroute_route
      summary: Route a task to the few tools it needs out of a registered tool set (BM25…
      description: 'Tool selection API for AI agents (tool routing). Pick the tools an agent needs for a task from a large tool list: send set_id (from the free /v1/register) or tools, plus the task. Returns a ranked shortlist (adaptive 3-12, or k), confidence, matched terms, token savings and the definitions in MCP, OpenAI, Anthropic or Gemini form. BM25, no LLM. Unknown set_id: 404, never charged. Search intents: tool routing, tool selection api, reduce tool tokens, rag over tools, mcp tool router, pick tools for task.'
      tags:
      - ToolRoute
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.001'
        protocols:
        - x402: {}
      x-x402:
        scheme: exact
        network: eip155:8453
        asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        amount: '1000'
        assetSymbol: USDC
        x402Versions:
        - 2
        - 1
        networks:
        - network: eip155:8453
          name: Base
          asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:137
          name: Polygon
          asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:42161
          name: Arbitrum One
          asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
      parameters:
      - name: set_id
        in: query
        required: false
        schema:
          type: string
        description: set_id ("ts_..." from register, or a ToolFit pin).
      - name: tools
        in: query
        required: false
        schema:
          type: array
        description: 'Tool definitions (MCP, OpenAI, Anthropic, Gemini or Bedrock form), max 500. For route: only if you have no set_id (the set is registered on the fly).'
      - name: query
        in: query
        required: true
        schema:
          type: string
        description: The task or user request to route, e.g. "check if this wallet is sanctioned".
      - name: k
        in: query
        required: false
        schema:
          type: integer
        description: Fixed shortlist size (default adaptive)
      - name: max_k
        in: query
        required: false
        schema:
          type: integer
        description: Upper bound for the adaptive size (default 12)
      - name: format
        in: query
        required: false
        schema:
          type: string
          enum:
          - mcp
          - openai
          - anthropic
          - gemini
          - names
        description: Definition format (default mcp; names = names only)
      responses:
        '200':
          description: shortlist with scores and matched terms, confidence, widened flag, token savings, definitions in the chosen format; drift (with a warning) when the set was registered from a URL that now lists a different tool set. (payment settled)
          content:
            application/json:
              example:
                set_id: ts_0d467a406d3eb14344c41c32d8802268
                query: read a web page as markdown
                confidence: high
                widened: false
                shortlist:
                - name: read_url
                  score: 14.23
                  matched:
                  - read
                  - web
                  - page
                  - markdown
                - name: scan_url
                  score: 8.09
                  matched:
                  - read
                  - web
                  - page
                - name: detect_stack
                  score: 7.05
                  matched:
                  - web
                  - page
                tokens:
                  all: 11585
                  shortlist: 1278
                  saved_pct: 89
        '400':
          description: Invalid input (never charged)
        '402':
          description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
        '404':
          description: Unknown pin (never charged)
        '413':
          description: Body too large (never charged)
        '422':
          description: Remote MCP server could not be listed (never charged)
        '503':
          description: Timeout or pin store unavailable (never charged)
    post:
      operationId: toolroute_route_post
      summary: Same as GET, POST {"set_id":"ts_0d467a406d3eb14344c41c32d8802268","query":"read…
      tags:
      - ToolRoute
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.001'
        protocols:
        - x402: {}
      x-x402:
        scheme: exact
        network: eip155:8453
        asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        amount: '1000'
        assetSymbol: USDC
        x402Versions:
        - 2
        - 1
        networks:
        - network: eip155:8453
          name: Base
          asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:137
          name: Polygon
          asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:42161
          name: Arbitrum One
          asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                set_id:
                  type: string
                  description: set_id ("ts_..." from register, or a ToolFit pin).
                tools:
                  type: array
                  items:
                    type: object
                  description: 'Tool definitions (MCP, OpenAI, Anthropic, Gemini or Bedrock form), max 500. For route: only if you have no set_id (the set is registered on the fly).'
                query:
                  type: string
                  description: The task or user request to route, e.g. "check if this wallet is sanctioned".
                k:
                  type: integer
                  minimum: 1
                  maximum: 50
                  description: Fixed shortlist size (default adaptive)
                max_k:
                  type: integer
                  minimum: 1
                  maximum: 50
                  description: Upper bound for the adaptive size (default 12)
                format:
                  type: string
                  enum:
                  - mcp
                  - openai
                  - anthropic
                  - gemini
                  - names
                  description: Definition format (default mcp; names = names only)
              required:
              - query
      responses:
        '200':
          description: shortlist with scores and matched terms, confidence, widened flag, token savings, definitions in the chosen format; drift (with a warning) when the set was registered from a URL that now lists a different tool set. (payment settled)
          content:
            application/json:
              example:
                set_id: ts_0d467a406d3eb14344c41c32d8802268
                query: read a web page as markdown
                confidence: high
                widened: false
                shortlist:
                - name: read_url
                  score: 14.23
                  matched:
                  - read
                  - web
                  - page
                  - markdown
                - name: scan_url
                  score: 8.09
                  matched:
                  - read
                  - web
                  - page
                - name: detect_stack
                  score: 7.05
                  matched:
                  - web
                  - page
                tokens:
                  all: 11585
                  shortlist: 1278
                  saved_pct: 89
        '400':
          description: Invalid input (never charged)
        '402':
          description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
        '404':
          description: Unknown pin (never charged)
        '413':
          description: Body too large (never charged)
        '422':
          description: Remote MCP server could not be listed (never charged)
        '503':
          description: Timeout or pin store unavailable (never charged)
      description: 'Tool selection API for AI agents (tool routing). Same as GET, POST {"set_id":"ts_0d467a406d3eb14344c41c32d8802268","query":"read a web page as markdown"}. Search intents: tool routing, tool selection api, reduce tool tokens, rag over tools, mcp tool router, pick tools for task.'
  /toolroute/v1/register:
    post:
      operationId: toolroute_register
      summary: 'Free: Register a tool set (tools array or remote MCP URL) and get its set_id'
      description: Free. Stores the normalized tool definitions under their hash (same tools = same set_id) for 90 days after last use. Send tools (array) or url (public remote MCP server; tools are listed, never called).
      tags:
      - ToolRoute
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tools:
                  type: array
                  items:
                    type: object
                  description: 'Tool definitions (MCP, OpenAI, Anthropic, Gemini or Bedrock form), max 500. For route: only if you have no set_id (the set is registered on the fly).'
                url:
                  type: string
                  description: 'Register: public remote MCP server URL (https). Tools are listed, never called.'
      responses:
        '200':
          description: set_id, tool count, total token estimate, stored flag. Free, rate-limited per IP.
        '400':
          description: Invalid input
        '429':
          description: Rate limited
  /toolroute/mcp:
    post:
      operationId: toolroute_mcp
      summary: 'Free remote MCP (Streamable HTTP, JSON-RPC): register_tools, route_tools'
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: JSON-RPC result
        '202':
          description: Notification accepted
      tags:
      - ToolRoute
components:
  securitySchemes:
    creditsKey:
      type: http
      scheme: bearer
      description: yatc_... credits key