Routing

Chat completion (OpenAI-compatible) with model choice and routing

model = our product or any market model id (GET /api/v1/broker/models): the cheapest eligible provider serves it. routing narrows by exact min_score per category, sort (price|value|speed|score), region and max_price. Errors: 400 invalid_routing, 402 insufficient_balance, 409 no_matching_offer.

post/api/v1/chat/completions

Request

  • Base URL: https://api.llm-broker.net
  • URL: https://api.llm-broker.net/api/v1/chat/completions
  • Auth: none required

Request body

frequency_penaltynumber
max_completion_tokensinteger

Same as max_tokens

max_tokensinteger
messagesobject[] required
modelstring required

Our products (james, elliot, taylor, james-direct) or any market model id from GET /api/v1/broker/models (vendor/model) — served by the cheapest eligible provider.

presence_penaltynumber
response_formatobject

{"type": "json_object"} or {"type": "json_schema", "json_schema": …}

seedinteger
streamboolean
temperaturenumber
toolsobject[]
top_pnumber

Example request

{
  "model": "deepseek/deepseek-v4.1-flash",
  "routing": {
    "category": "coding",
    "min_score": 0.8,
    "region": "eu",
    "sort": "value"
  }
}

Response

Completion (or SSE stream with stream=true)

object required

Changes

No recorded changes to this operation across all 1 revision of this API.