Skip to main content
Liminal AI
Vireon DynamicsLiminal AIEnLiminalGuidesOpenrouterFSL-1.1-MIT · free to use

Guide · Updated 2026-06-12

OpenRouter + Liminal

OpenRouter gives one API for many models. Liminal uses any OpenAI-compatible endpoint. This guide covers desktop app setup, CLI install, model slugs, and harness env vars.

Why OpenRouter with Liminal

One API key unlocks DeepSeek, Claude, GPT, Gemini, and smaller fast models for routing. Liminal uses a two-tier setup: a main model for the ReAct loop and a fast model for intent classification, distillation, and background JSON tasks.

OpenRouter prompt caching on supported resellers can cut repeat-turn cost sharply when AGENT_PROMPT_CACHE is on (product default). You pay OpenRouter directly; Liminal software stays free.

1. Get an OpenRouter API key

Create an account at openrouter.ai and generate an API key. Add credits or enable free models as needed. Keep the key in `.env` only; it is never persisted to runtime prefs.

2. Install Liminal (desktop or CLI)

Recommended: download the Liminal desktop app from the get-started page for Windows, macOS, or Linux. OAuth connectors and the compose dock live there.

Developers can also run: `curl -fsSL https://www.vireondynamics.com/install/install.sh | bash` (macOS/Linux) or the PowerShell one-liner on Windows. The script clones liminal-ai and can launch the web UI on localhost.

3. Set environment variables

In your project `.env` at the repo root (or via Settings in the web UI):

  • AGENT_MODEL: main model for multi-round agent turns.
  • AGENT_FAST_MODEL: smaller model for routing and sidecar tasks.
  • Optional: AGENT_PROVIDER_STRATEGY=price for cheapest stable route on OpenRouter.
AGENT_API_KEY=sk-or-v1-...
AGENT_API_BASE_URL=https://openrouter.ai/api/v1
AGENT_MODEL=deepseek/deepseek-v4-pro
AGENT_FAST_MODEL=deepseek/deepseek-v4-flash

4. Verify in the UI

Send a small task: "list files in this repo" or "summarize README." Watch the harness trace for model slug and token usage. If you see 401 errors, recheck AGENT_API_KEY and that credits are available on OpenRouter.

Full env reference: https://docs.vireondynamics.com/liminal/

Troubleshooting

  • 429 rate limits: Liminal retries with backoff; try AGENT_PROVIDER_STRATEGY=adaptive.
  • Empty responses: confirm the model slug exists on OpenRouter and supports tool calling.
  • Slow first turn: cold start on the provider; later turns benefit from prompt cache on supported hosts.

FAQ

Common questions

Does Liminal require OpenRouter?

No. OpenAI, Anthropic, xAI, or a local Ollama endpoint work with the same OpenAI-compatible config.

Which OpenRouter model is best for coding?

Defaults target deepseek/deepseek-v4-pro for the main loop and deepseek/deepseek-v4-flash for fast tasks. You can swap slugs anytime in .env or Settings without reinstalling.

How much does a typical task cost?

Most single tasks are cents on OpenRouter depending on model and context size. Long refactors with many tool rounds cost more; use the fast model routing and prompt cache to control spend.

Can Pro skip bringing my own OpenRouter key?

Yes. Pro includes managed inference credits so you can run without a provider account. Community Edition is bring-your-own-key.