Drex
Select a candidate model
Each successful call is billed per encoded input token measured by the router, including the conversation and candidate profiles; see Pricing. Only a 200 is charged, and the maximum encoded-input cost is reserved before dispatch. Only measured tokens are settled; the remainder is released. An account that cannot fund the ceiling gets 402 before the router runs, even if its eventual charge would have fit.
Each successful call is billed per encoded input token measured by the router, including the conversation and candidate profiles; see Pricing. Only a 200 is charged, and the maximum encoded-input cost is reserved before dispatch. Only measured tokens are settled; the remainder is released. An account that cannot fund the ceiling gets 402 before the router runs, even if its eventual charge would have fit.
Authorization
bearerAuth Your API key, sent as Authorization: Bearer nace_sk_...
- Where: the dashboard's API Keys page. It is shown once, when you create it.
- Format:
nace_sk_followed by 43 URL-safe characters (A-Z,a-z,0-9,_and-). - Limit: an account can hold at most 3 active keys.
- Wrong or missing key: returns
401 authentication_error.
In: header
Request Body
application/json
A text conversation and the candidate models to choose from.
At most 100000 characters of candidate text, within a 4 MiB body. The encoded conversation is also limited to 32768 tokens.
1 <= items <= 1024Show child attributes
Unique candidate IDs. A bare ID must be a known profile; give a full profile for any other model.
1 <= items <= 255Show child attributes
quality prefers the strongest candidate, cheapest the lowest price, and balanced weighs both. The default is balanced.
"balanced""quality""balanced""cheapest"Deprecated: use selection_priority. 0 favors quality, 1 favors price. Do not send both.
0 <= value <= 1Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/route" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "role": "user", "content": "Explain this invoice" } ], "candidates": [ "openai/gpt-6-luna", "google/gemini-3.8-flash" ], "selection_priority": "balanced" }'{ "selected": "string", "probabilities": { "property1": 0, "property2": 0 }, "request_id": "string"}