AI Router API

AI Router API as documented publicly: 2 operations. Contract generated from the documentation by API Evangelist (2026-10-15); not the provider's own document.

Operations 2

POST /v1/chat/completions POST /v1/chat/completions #
POST /v1/{v1id} POST /v1/select #

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/airouter:airouter-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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

airouter-openapi-generated.yml Raw ↑
openapi: 3.1.0
info:
  title: AI Router API
  version: '2026-10-15'
  description: 'GENERATED FROM DOCUMENTATION by API Evangelist on 2026-10-15: 2 operation(s) read from 3 public documentation page(s) (each operation
    names its page in x-source). This is not the provider''s published contract; AI Router has published no machine-readable contract that the
    pipeline could find. Engine: local.'
  x-evidence-tiers:
    code-example: 3
    documentation: -1
    pages-with-code: 3
    pages-read: 3
  x-generated-from: documentation
  x-provenance: generated
  x-authored-by: API Evangelist
  x-generated: '2026-10-15'
  x-generator: generate-contract-from-docs.py
  x-engine: local
  x-sources:
  - https://airouter.io/docs/api/select
  - https://airouter.io/docs/api/usage-reports
  - https://airouter.io/docs/api/chat-completions
servers:
- url: https://api.airouter.io
paths:
  /v1/chat/completions:
    post:
      operationId: post_v1_chat_completions
      tags:
      - Chat
      summary: POST /v1/chat/completions
      x-source: https://airouter.io/docs/api/chat-completions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostV1ChatCompletionsRequest'
      responses:
        '201':
          description: Success (status as documented)
      x-evidence:
        kind: code-example
        language: curl
        snippet: "curl https://api.airouter.io/v1/chat/completions  --request POST  --header \"Authorization: Bearer $AIROUTER_API_KEY \"  --header\
          \ \"Content-Type: application/json\"  --data '{ \n \"model\": \"auto\", \n \"messages\": [{\"role\": \"user\", \"content\": \"Explain\
          \ quantum tunnelling.\"}], \n \"models\": [\"gpt-5-mini\", \"gemini-3.5-flash\", \"claude-4-5-haiku\"], \n \"weighting\": {\"quality\"\
          : 1.0, \"costs\": 2.0, \"latency\": 1.0}, \n "
  /v1/{v1id}:
    post:
      operationId: post_v1_v1id
      tags:
      - Api
      summary: POST /v1/select
      x-source: https://airouter.io/docs/api/select
      parameters:
      - name: v1id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostV1V1IdRequest'
      responses:
        '201':
          description: Success (status as documented)
      x-evidence:
        kind: code-example
        language: curl
        snippet: "curl https://api.airouter.io/v1/select  --request POST  --header \"Authorization: Bearer $AIROUTER_API_KEY \"  --header \"Content-Type:\
          \ application/json\"  --data '{ \n \"messages\": [ \n {\"role\": \"user\", \"content\": \"Explain quantum tunnelling.\"} \n ], \n \"\
          models\": [\"gpt-5-mini\", \"gemini-3.5-flash\"], \n \"weighting\": {\"costs\": 1.0, \"latency\": 1.0, \"quality\": 1.0}, \n \"max_tokens\"\
          : 512, \n \"tools\": false \n }' \n "
        collapsed_from: 2 example path(s) differing only at v1Id
components:
  schemas:
    PostV1ChatCompletionsRequest:
      type: object
      properties:
        model:
          type: string
        messages:
          type: array
          items:
            type: object
            properties:
              role:
                type: string
              content:
                type: string
        models:
          type: array
          items:
            type: string
        weighting:
          type: object
          properties:
            quality:
              type: number
            costs:
              type: number
            latency:
              type: number
        stream:
          type: boolean
    PostV1V1IdRequest:
      type: object
      properties:
        messages:
          type: array
          items:
            type: object
            properties:
              role:
                type: string
              content:
                type: string
        models:
          type: array
          items:
            type: string
        weighting:
          type: object
          properties:
            costs:
              type: number
            latency:
              type: number
            quality:
              type: number
        max_tokens:
          type: integer
        tools:
          type: boolean
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
security:
- bearer: []
tags:
- name: Api
- name: Chat