RouteMux Chat Completions API

Text conversation and reasoning. All three protocols reach the same models — pick the one your SDK already speaks.

Operations 1

POST /v1/chat/completions Chat completions (OpenAI-compatible) #

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/routemux-com:routemux-com-chat-completions-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

routemux-com-chat-completions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: RouteMux Gateway Chat API
  version: 2.0.0
  description: 'Call models from multiple providers through one base URL and one API key,

    using OpenAI-, Anthropic-, or Google Vertex-compatible protocols.


    **Billing**: prepaid wallet, priced per token or per call. Admission failures are not billed.

    If an already-started stream is interrupted, inspect `error.billing.status` and the request

    log for its final settlement outcome. An empty wallet returns `422`.


    **Migration cost**: point your existing SDK''s `base_url` at `https://api.routemux.com/v1`.

    Nothing else in your code changes.'
  contact:
    url: https://routemux.com
  license:
    name: Proprietary
servers:
- url: https://api.routemux.com
  description: Production gateway
security:
- bearerAuth: []
tags:
- name: Chat Completions
  description: Text conversation and reasoning. All three protocols reach the same models — pick the one your SDK already speaks.
paths:
  /v1/chat/completions:
    post:
      tags:
      - Chat Completions
      operationId: chat_completions
      summary: Chat completions (OpenAI-compatible)
      description: 'OpenAI Chat Completions-compatible endpoint. Point your OpenAI SDK''s `base_url` at `https://api.routemux.com/v1`; the request body is passed through unchanged.


        With `stream: true` chunks arrive as SSE. RouteMux never buffers the whole response, and bills **actual usage** once the upstream finishes.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PassthroughBody'
      responses:
        '200':
          $ref: '#/components/responses/OpenAIOk'
        '401':
          $ref: '#/components/responses/OpenAIError'
        '422':
          $ref: '#/components/responses/OpenAIError'
        '429':
          $ref: '#/components/responses/OpenAIError'
        '503':
          $ref: '#/components/responses/OpenAIError'
components:
  schemas:
    PassthroughBody:
      type: object
      description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
      x-ae-placeholder: true
  responses:
    OpenAIOk:
      description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
      x-ae-placeholder: true
    OpenAIError:
      description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
      x-ae-placeholder: true
externalDocs:
  description: RouteMux error reference
  url: https://routemux.com/docs/errors