Skip to main content
The GMI Router turns a plain-language request into the right model for the job. Send a chat, and the router picks the model and returns a completion, automatically. Access the playground here: https://console.gmicloud.ai/user-console/ie/gmi-router/test-routing GMI Router Ui

How routing works

Autoroute treats model selection as a process, not a single guess. Every Autoroute request moves through the same sequence:
  1. Understand. The router reads your latest message and classifies the task and its requirements.
  2. Compare. It scores the allowed model pool across quality, cost, and latency.
  3. Validate. The top candidate is checked before it is committed. A high score alone does not win the request.
  4. Select. The router locks in the winning model.
  5. Respond. The selected model generates the completion, returned inline or streamed token by token.
The flow, at a glance: Prompt -> Understand -> Compare -> Validate -> Select -> Respond. /autoroute picks the model and returns the completion in one call. Streaming is the default.

Authentication

Base URL: https://console.gmicloud.ai/api/v1/ie/recommendation Send a bearer token in the Authorization header: Authorization: Bearer YOUR_TOKEN Most routed responses include an X-Recommendation-ID header. It is absent on auth and early validation errors.

Quick start: Autoroute

Send an OpenAI-style messages[] array. The router reads the latest user message, ranks the model pool, and generates with the top candidate.
Non-streaming response:

Request fields

Streaming vs non-streaming

  • Streaming (default). Returns text/event-stream. Chunks are proxied as they arrive, followed by a routing_metadata event, then [DONE]. One backup model may be tried before the first token on a 5xx, provider error, 429, or a 10-second first-token timeout. Once tokens start flowing, no further fallback happens; a mid-stream failure keeps the partial output, sends an error event, and closes the stream.
  • Non-streaming (stream: false). Returns one JSON object, trying the primary model plus one backup on a transient failure (5xx, provider error, 429), with a combined timeout of 10 minutes for primary and backup.
The router is stateless. Resend the full conversation on every request.

Status codes