Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

A personal API key or an OAuth 2.0 access token. Personal API keys also require the x-auth-key header with your user ID.

Body

application/json
input
required

The message to route. message is accepted as an alias. A string or an array of {type: text, text: ...} parts.

models
string[]

Candidate model IDs to choose between. IDs must be nonempty, unique after remapping, and registered. Omit to use Chew's lane-chain union.

Required array length: 1 - 50 elements
history
object[]

Prior turns, oldest first, for context.

Maximum array length: 20
agent
object

Optional context about the agent the message is for. Sharper context produces a sharper route.

team_id
string

Scope model availability and credit attribution to a team the caller belongs to.

Response

The routing decision.

router
string

Always gumloop-chew.

route
object
candidates
object[]

Every candidate considered. Restricted candidates are reported, not selected.