LLM Broker Routing API
The Routing API from LLM Broker — 2 operation(s) for routing.
The Routing API from LLM Broker — 2 operation(s) for routing.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/llm-broker-net:llm-broker-net-routing-api"
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.
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: 3.2.0
info:
description: 'One OpenAI-compatible key for our own models and the market; each request is routed to the cheapest offer that meets its `routing` criteria. The `/v1/...` prefix is an alias of `/api/v1/...`. Docs: https://llm-broker.net/llms.txt'
title: LLM Broker Routing API
version: 1.0.0
servers:
- url: https://api.llm-broker.net
variables: {}
security: []
tags:
- name: Routing
paths:
/api/v1/broker/models:
get:
callbacks: {}
description: Every model you can name in `model` on POST /api/v1/chat/completions, served by the cheapest eligible provider without harness. Price = customer price in CHF per 1M tokens (incl. our margin); scores = our own measurements per category (0..1, only where measured) — the basis for `routing.min_score`. No key needed.
operationId: AstrionWeb.BrokerApiController.models
parameters:
- description: 'Price currency (ISO 4217, default USD): any code from GET /api/v1/broker/currencies — converted at the daily rate (ECB, else ExchangeRate-API); internal ledger stays in CHF'
in: query
name: currency
required: false
schema:
type: string
- description: 'Model type: chat (default, LLM), image (POST /api/v1/images/generations), speech (POST /api/v1/audio/speech), transcription (POST /api/v1/audio/transcriptions), video (POST /api/v1/videos). Media rows carry exactly one price: per_image, per_1k_characters, per_minute or per_second; own products have own: true'
in: query
name: type
required: false
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BrokerMarketModels'
description: Market models
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/BrokerError'
description: Unknown currency or type
security: []
summary: Market models (for model and routing)
tags:
- Routing
/api/v1/broker/recommend:
get:
callbacks: {}
description: 'Picks from the published catalog — our own benchmark scores and list prices: best = highest score in the category, best_value = score per output price, plus alternatives and a ready `routing` object for POST /api/v1/chat/completions. Only measured models are recommended. No key needed.'
operationId: AstrionWeb.BrokerApiController.recommend
parameters:
- description: coding, reasoning, math, …
in: query
name: category
required: true
schema:
type: string
- description: Max output price per 1M tokens, in currency
in: query
name: max_price_per_mtok
required: false
schema:
type: number
- description: 0..1
in: query
name: min_score
required: false
schema:
type: number
- description: ch, eu, us, asia, global
in: query
name: region
required: false
schema:
type: string
- description: Comma-separated, e.g. tools,vision
in: query
name: capabilities
required: false
schema:
type: string
- description: ISO 4217, default USD
in: query
name: currency
required: false
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BrokerRecommendation'
description: Recommendation
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/BrokerError'
description: Unknown category
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/BrokerError'
description: No measured model within these limits
security: []
summary: Recommend a model for a task (free, no key)
tags:
- Routing
components:
schemas:
BrokerError:
properties:
error:
properties:
code:
example: invalid_request
type: string
message:
type: string
param:
description: The offending field, if any
type:
- string
- 'null'
request_id:
description: Quote it when contacting support
type:
- string
- 'null'
type:
description: invalid_request_error | authentication_error | rate_limit_error | server_error …
example: invalid_request_error
type: string
required:
- message
- type
- code
type: object
required:
- error
title: BrokerError
type: object
BrokerMarketModel:
properties:
capabilities:
description: Supported by at least one provider
items:
type: string
type: array
context:
description: Largest context window (tokens)
type:
- integer
- 'null'
id:
description: Use as model on chat/completions (type chat), images/generations (image), audio/speech (speech) or audio/transcriptions (transcription), videos (video)
type: string
name:
type: string
own:
description: 'Media rows: our own product (iris, quill)'
type: boolean
price:
description: 'Cheapest customer price. Chat: input/output per 1M tokens. Media: exactly one of per_image, per_1k_characters, per_minute, per_second (video, default resolution; billed: actual cost)'
properties:
currency:
type: string
input:
type: string
output:
type: string
per:
type: string
per_1k_characters:
type: string
per_image:
type: string
per_minute:
type: string
per_second:
type: string
type: object
providers:
type: integer
regions:
items:
type: string
type: array
scores:
additionalProperties:
type: number
description: Our own measurement per category, 0..1 (absent = not measured)
type: object
throughput:
description: tokens/s (best provider)
type:
- number
- 'null'
type:
description: Only on media rows (`?type=`); chat rows omit it
enum:
- image
- speech
- transcription
- video
type: string
vendor:
type: string
required:
- id
- price
- regions
- providers
title: BrokerMarketModel
type: object
BrokerRecommendation:
properties:
alternatives:
items:
type: object
type: array
basis:
type: string
best:
description: Highest measured score in the category
type: object
best_value:
description: Highest score per output price
type: object
category:
type: string
chat_arguments:
description: Use as-is in POST /api/v1/chat/completions
type: object
currency:
type: string
routing:
description: Let the broker pick per request with these limits
type: object
required:
- category
- best
- best_value
- routing
title: BrokerRecommendation
type: object
BrokerMarketModels:
properties:
categories:
items:
type: string
type: array
data:
items:
$ref: '#/components/schemas/BrokerMarketModel'
type: array
object:
example: list
type: string
required:
- data
title: BrokerMarketModels
type: object
securitySchemes:
apiKeyAuth:
description: 'API key as Bearer token: customer keys `ast_sk_…` (account page or POST /api/v1/broker/accounts); internal/CLI keys `acore_…` (legacy `mgpt_…` still accepted)'
in: header
name: Authorization
type: apiKey
bearerAuth:
bearerFormat: JWT
description: JWT access token obtained via POST /auth/login
scheme: bearer
type: http