Fits your existing client
Connect through unified chat, model discovery, and SSE streaming endpoints. With the OpenAI SDK, change your Base URL and key to get connected.
/v1/chat/completionsOPEN SOURCE · MULTI-PROVIDER GATEWAY
Bring your model providers into one OpenAI-compatible API. Manage them on your desktop. Run them from your CLI. Keep your attention on what comes next.
GATEWAY / OVERVIEW
Connect the models you choose. Keep control of how you call them.
POST /v1/chat/completionsmodel: "auto"# OpenAI-compatible
client = OpenAI(
base_url="http://localhost:8000/v1",
api_key="YOUR_GATEWAY_KEY"
)
response = client.chat.completions.create(
model="auto",
messages=[...]
)/v1/modelsInteractive product illustration · Sample data, not a live service
ONE INTERFACE. MORE CHOICE.
And other OpenAI-compatible providers
BUILT FOR EVERYDAY USE
Keep provider differences in the gateway. Keep your familiar tools working.
Connect through unified chat, model discovery, and SSE streaming endpoints. With the OpenAI SDK, change your Base URL and key to get connected.
/v1/chat/completionsSwitch candidates according to error policies. Apply cooldowns to keys, models, and providers, with multiple-key rotation within a provider.
retry → fallback → cooldownCall provider defaults in parallel or in sequence. Connect through HTTP or MCP, then let your client compare and summarize the answers.
HTTP + MCP01 / MODEL ROUTING
Put your preferred models at the front. If every custom candidate fails, the gateway continues with default candidates. Clear the list to restore default ordering.
Applies to auto / free / best-free routing. Explicit single-model calls are unchanged. These route names do not guarantee free upstream usage.
auto_routing:
custom_ranking:
- provider: openrouter
model: model-a
- provider: nvidia
model: model-b
- provider: ollama
model: model-cInteractive demo · No API requests
model-amodel-bmodel-c{ "model": "auto", "demo": true }02 / DESKTOP & CLI
Manage a local gateway with the Windows portable client, or connect to a remote one. Your server keeps its existing CLI. The desktop is another way into the same service.
Local gateway · Interactive illustration
http://127.0.0.1:8000/v1model-amodel-bConfiguration lives beside the program
These controls illustrate the UI. They do not start a real service.
On first launch, missing default configuration is created beside the EXE. Keep the whole program folder when sharing or moving it.
MAKE THE CONNECTION
Get the source and choose your entry point. Python 3.11 is recommended. Portable app users do not need Python.
git clone https://gitee.com/relatex/freelance.git
cd freelanceThe output is dist/FreelanceDesktop. Open the EXE, configure your providers and keys, then start the gateway. Back up configuration and close the app before rebuilding.
python -m pip install -e ".[desktop,desktop-build]"
python scripts/build_desktop.py
python scripts/verify_desktop_bundle.pySet gateway and provider keys in .env. Configure providers and default models in config.yaml before running the start command.
python -m pip install -e .
Copy-Item .env.example .env
python -m app.cli start --host 127.0.0.1 --port 8000Install the OpenAI SDK first (python -m pip install openai). Replace YOUR_GATEWAY_KEY with your own gateway API key.
from openai import OpenAI
client = OpenAI(
base_url="http://127.0.0.1:8000/v1",
api_key="YOUR_GATEWAY_KEY",
)
response = client.chat.completions.create(
model="auto",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)A FEW COMMON QUESTIONS
Yes. Point its Base URL to the gateway’s /v1 path and use your gateway API key. The API is OpenAI-compatible; upstream support for tools and parameters still depends on each provider.
Yes. The server CLI needs no desktop dependencies. The desktop can start its own local backend or connect to a running remote gateway for debugging without editing remote configuration. It does not stop CLI-owned processes.
The portable app uses config.yaml and .env beside its EXE and creates missing defaults. The source desktop uses the project root. Restart the gateway to apply changes.
The gateway is MIT licensed. Upstream providers determine model pricing, quotas, and free tiers. Automatic route names such as auto, free, and best-free do not guarantee free usage.
No. All status displays, model orders, and controls here are local illustrations. This site sends no model requests and collects no keys. Your deployed gateway forwards actual calls to the upstream providers you configure.