Skip to content
Orqen Docs

Getting Started

Quickstart

Get Orqen working with your existing SDK in under 5 minutes. Your request shape stays the same — Orqen removes the tokens the model doesn't need before forwarding to your provider, so you pay less on every call.

Each request flows through Orqen before reaching your LLM provider.

1.Create your account

Go to dash.orqen.app/signup and create a free account. 250K saved tokens per month, with a 75K daily cap. The allowance resets on the 1st of each month. No credit card required.

After signup, follow the Dashboard setup guide to connect a provider, copy your key (sk-orq-..., shown once in the welcome modal), and verify your first request in the UI.

2.Connect a provider

Orqen forwards requests to your own LLM provider. In the dashboard, go to Providers and add your OpenAI, Anthropic, or other key. Keys are encrypted before storage and only decrypted per-request.

If you prefer, you can skip this step and pass your provider credentials directly in the request (see Authentication).

3.Point your SDK at Orqen

Pick your SDK. For OpenAI and Anthropic, update the key and base URL. For Bedrock, set the endpoint URL and use your Orqen key as the access key. Your messages, tools, model, streaming flag, and multimodal content keep their current shape:

OpenAI SDK
from openai import OpenAI

# Before: direct to OpenAI
# client = OpenAI(api_key="sk-...")

# After: point the client at Orqen
client = OpenAI(
    api_key="sk-orq-YOUR_KEY",      # Your Orqen key from the dashboard
    base_url="https://api.orqen.app/v1",
)

# Your request body stays the same from here
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "What is the weather in London?"}],
    tools=[
        # ... your full tool list — Orqen optimizes the request before forwarding
    ],
)
print(response.choices[0].message.content)

Replace sk-orq-YOUR_KEY with the key from your dashboard. Replace the model name with whichever model you're using. See provider migration examples for full before/after comparisons.

4.Verify it's working

Run your agent. After the first request, check the dashboard — you should see the request in the Usage tab with tokens saved, tool context reduced, and optimization strategy traces when plan data is available.

Every response includes headers showing what happened:

x-orqen-tools-input:  32        # tools you sent
x-orqen-tools-output: 8         # tools forwarded to the LLM
x-orqen-prune-ratio:  8/32      # output/input
x-orqen-routing:      semantic  # how Orqen selected the tools

Optional: let Orqen pick the model too

Instead of specifying model="gpt-4o", you can use model="orqen/auto" and Orqen will pick the best model from your connected providers based on task complexity. See Model routing.

Works with MCP tools and large agent payloads

If you use Model Context Protocol (MCP) servers, Orqen works transparently — MCP tools are just schemas inside the same agent payload. MCP sessions compound quickly: each new server adds tools, and each turn adds history. Orqen handles the full growing payload — routing tool selection, compressing history and tool results, summarizing long sessions, and preserving provider cache stability across turns.

MCP makes Orqen more valuable, not less. As you connect more MCP servers (filesystem, browser, database, APIs), your total tool count, schema volume, and accumulated history all grow. Orqen keeps the model-facing context clean regardless of how many servers are connected or how long the session has been running.

What Orqen does with MCP payloads

  • Tool schemas from MCP servers are analyzed and cached on first sight — no re-embedding on repeated requests.
  • Conversation history from multi-turn MCP sessions is managed in tiers — recent turns kept verbatim, older turns compressed — so prompt size stays stable even as sessions grow long.
  • Tool descriptions are scored for routing quality. Poor MCP tool descriptions show up in your Routing Quality dashboard with specific improvement suggestions.
  • If an MCP server updates its tool schemas, Orqen detects the change automatically (schemas are keyed by content hash) and re-embeds only the changed tools.

Next steps