Deploy Pilot Router

Tiny model router on your own Railway, with your own keys

Deploy Pilot Router

Just deployed

Deploy and Host Pilot Router on Railway

Pilot Router is a tiny model router you run on your own Railway project, with your own keys. Simple text tasks are answered by Gemini; tasks that need Claude wait in a queue that your own Claude scheduled task fetches, so the paid Anthropic API is never called. One Python file, standard library only.

About Hosting Pilot Router

The template deploys a single service built from a small Dockerfile (Python 3.11, nothing to install) and gives it a public address. You fill in GEMINI_API_KEY with your own Gemini key; ROUTER_TOKEN, the password for calls to the router, is generated for you. The keys stay only on your Railway service. The service answers GET /health (open, never shows a key), POST /route and the Claude queue routes GET /claude/pendentes and POST /claude/feito, all three protected by the token. The queue lives in memory, so there is no database or volume to manage. Railway and Gemini are billed to your own accounts.

Common Use Cases

  • Send summarise, list, translate, classify, extract and rewrite tasks to Gemini with your own key
  • Keep tasks that need reasoning, code, decisions or money in a queue for your own Claude plan
  • Give the Pilot a router address that you own and control

Dependencies for Pilot Router Hosting

  • A Gemini API key (GEMINI_API_KEY)
  • Optional: a JEV key (TYPESAFE_API_KEY) to classify tasks instead of the keyword rule; add it as a variable after deploying

Deployment Dependencies

Implementation Details

curl https://.up.railway.app/health
curl -X POST https://.up.railway.app/route \
  -H "Authorization: Bearer " -H "Content-Type: application/json" \
  -d '{"task": "Translate to English: bom dia"}'

Why Deploy Pilot Router on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Pilot Router on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
118
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

GitHub Locker
1
View Template
Möbius Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

Tracklayer
3