# Routara LLM Gateway [Health: Active]

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/36412749-collab/routara-mcp  
**GitHub Stars:** 1  
**npm Downloads (last month):** 226  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/routara-llm-gateway

## Description
OpenAI-compatible LLM, image and video APIs via Routara (api.routara.ai).

## Tools
Capabilities this server exposes over MCP:

- **routara_list_models** — List Routara catalog models (OpenAI-compatible GET /v1/models).

WHEN TO USE: Discover model slugs before calling routara_chat, routara_generate_image, or routara_generate_video. Call this first when the user did not specify a model.

WHEN NOT TO USE: Do not call for chat/image/video directly — use the specialized tools instead.

REQUIRES: ROUTARA_API_KEY environment variable (sk-or-v1-... from https://routara.ai/#auth).

RETURNS JSON: { count, models: string[], truncated: boolean } — up to 200 model slug IDs; truncated=true when the catalog has more.

EXAMPLE: routara_list_models() → { "count": 787, "models": ["alibaba-qwen-turbo", "deepseek-r1", ...] }
- **routara_chat** — Chat completion via Routara (OpenAI POST /v1/chat/completions).

WHEN TO USE: Text generation, coding help, reasoning, translation, or any LLM chat task. Works with 787+ models (DeepSeek, Qwen, GLM, GPT, Claude, etc.).

WHEN NOT TO USE: Image generation (use routara_generate_image). Video (use routara_generate_video). Listing models (use routara_list_models).

REQUIRES: ROUTARA_API_KEY. Billing is per-token; promo credits apply only to domestic economy chat models.

PARAMETERS:
- model: slug from routara_list_models, e.g. "alibaba-qwen-turbo", "deepseek-deepseek-v3-2", "gpt-4o-mini"
- message: single user turn (string)
- max_tokens: 1–8192 output tokens (optional, default upstream)
- temperature: 0–2 sampling (optional)

RETURNS JSON: { id, model, content: string, usage: { prompt_tokens, completion_tokens, total_tokens } }

EXAMPLE: routara_chat(model="alibaba-qwen-turbo", message="Summarize MCP in one sentence", max_tokens=64)
- **routara_generate_image** — Generate an image via Routara (POST /v1/images/generations).

WHEN TO USE: User asks for image, illustration, poster, or visual asset from a text prompt.

WHEN NOT TO USE: Video (routara_generate_video). Text-only chat (routara_chat).

REQUIRES: ROUTARA_API_KEY and cash wallet balance (promo credits cannot pay for media).

PARAMETERS:
- model: image slug, e.g. "bytedance-doubao-seedream-5-0"
- prompt: detailed image description in English or Chinese
- size: optional, e.g. "1024x1024", "2048x2048" (some models require ≥3686400 pixels total)
- n: 1–4 images (optional, default 1)

RETURNS JSON: OpenAI-style image response with url or b64_json fields per upstream model.

EXAMPLE: routara_generate_image(model="bytedance-doubao-seedream-5-0", prompt="minimal flat app icon, emerald gradient", size="1024x1024")
- **routara_generate_video** — Submit async video generation (POST /v1/videos/generations).

WHEN TO USE: User wants a short video clip from a text prompt. Always follow up with routara_get_video_status to poll until completed.

WHEN NOT TO USE: Still images (routara_generate_image). Chat (routara_chat).

REQUIRES: ROUTARA_API_KEY and cash wallet balance.

PARAMETERS:
- model: video slug, e.g. "kling-kling-v3"
- prompt: scene description
- duration: 1–60 seconds (optional)

RETURNS JSON: { id or task_id, status } — save the task id for routara_get_video_status.

EXAMPLE: routara_generate_video(model="kling-kling-v3", prompt="drone shot over coastline at sunset", duration=5)
- **routara_get_video_status** — Poll async video task status (GET /v1/videos/:id).

WHEN TO USE: After routara_generate_video returns a task id. Poll every 10–30s until status is completed or failed.

WHEN NOT TO USE: Before submitting a video job. For chat or images.

REQUIRES: ROUTARA_API_KEY.

PARAMETERS:
- task_id: id string from routara_generate_video response

RETURNS JSON: { status, progress?, output_url?, error? } — when status=completed, output_url contains the video link.

EXAMPLE: routara_get_video_status(task_id="vid_abc123")

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "routara-llm-gateway": {
    "command": "npx",
    "args": ["-y","routara-mcp"],
    "env": {
      "ROUTARA_API_KEY": "",
      "ROUTARA_API_BASE": "",
      "ROUTARA_API_TIMEOUT_MS": ""
    }
  }
}
```

**Requires environment variables:** `ROUTARA_API_KEY`, `ROUTARA_API_BASE`, `ROUTARA_API_TIMEOUT_MS` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What Routara LLM Gateway MCP server does

The Routara LLM Gateway MCP server exposes Routara’s OpenAI-compatible API at `api.routara.ai` through Model Context Protocol tools. It gives an MCP client access to the live model catalog, conversational generation, image creation, video submission, and video-task status checks.

The model catalog tool supports searching and pagination, which helps an agent identify models available to the connected Routara account. Chat supports both one-turn and multi-turn conversations, including tool calls, and returns the complete OpenAI-compatible response. Image generation accepts text prompts and can also use reference images. Video generation accepts text-to-video and image-to-video requests.

## How it works

The server starts as a local process and communicates with the MCP host over the client’s configured transport. The default command uses `npx -y routara-mcp`; an MCPB bundle is also available from the latest GitHub release. When a tool is called, the server sends the request to Routara’s API using the configured credentials.

Video creation is asynchronous. An agent first submits a request with `routara_generate_video`, then uses `routara_get_video_status` to poll the resulting task. Model-specific media options are passed only when supplied, so supported parameters depend on the selected model.

Requests have a timeout rather than waiting indefinitely. Transient network failures, HTTP 429 responses, and HTTP 5xx responses receive bounded-backoff retries. Returned API errors include the upstream request ID and retry delay when those values are available.

## Setup and configuration

To run the Routara LLM Gateway MCP server, add it to an MCP client configuration with `npx` as the command and `-y routara-mcp` as its arguments. Set `ROUTARA_API_KEY` to a key created through Routara. The key is needed when tools are invoked, but the process can complete the MCP handshake without one.

Supported environment variables are:

- `ROUTARA_API_KEY`: Required for Routara tool calls.
- `ROUTARA_API_BASE`: Optional API base URL; defaults to `https://api.routara.ai/v1`.
- `ROUTARA_API_TIMEOUT_MS`: Optional request timeout in milliseconds; defaults to `30000`.

Do not commit the API key. If it is exposed, revoke it in the Routara dashboard.

## Tools and capabilities

- `routara_list_models`: Search and paginate Routara’s current model catalog.
- `routara_chat`: Send single-turn or multi-turn chat requests, including tool calls.
- `routara_generate_image`: Create images from text or reference images.
- `routara_generate_video`: Submit text-to-video or image-to-video jobs.
- `routara_get_video_status`: Check the state of an asynchronous video job.

## Limitations and notes

The Routara LLM Gateway MCP server exposes tools to the host application; it does not replace that application’s own model subscription or billing. Media capabilities and accepted parameters vary by model. A valid API key is therefore not sufficient to guarantee that every image or video option works with every model.

The README names Cursor, Claude Desktop, Codex, Windsurf, and VS Code as supported MCP clients, along with other MCP-compatible clients. After configuration, restart the client and ask it to list Routara models before selecting one for chat or media generation.

_Full upstream README: https://allmcps.com/mcp/routara-llm-gateway/readme_

