TemprTempr
Docs
Guides

Cline

Last updated

Cline normally means picking one provider at a time and giving it that provider's own key. Point Cline's "OpenAI Compatible" option at Tempr Gateway instead, and every model you've configured (Claude, GPT, Gemini, DeepSeek) is available through that one provider entry and one key, with unified quota, logs, and fallback handling across all of them.

  1. Create a virtual key

    In the Portal, create a Gateway virtual key. Keys are prefixed tvk_ and shown once at creation.

  2. Add a provider key

    Gateway is BYOK: add a key for at least one provider from the supported list.

  3. Configure Cline

    Open Cline's settings and set the API Provider dropdown to OpenAI Compatible. Set Base URL to https://api.temprhq.io/v1 and API Key to your virtual key.

  4. Choose a model

    Enter a model id in the fully-qualified provider/model form, e.g. anthropic/claude-sonnet-4-5, openai/gpt-5, or google/gemini-3.1-pro-preview, whatever is on your virtual key's allowlist. Each needs a key for its provider in the Portal (Anthropic, OpenAI, Google); or use any model from GET /v1/models.

On a coding plan

Tempr serves each coding plan only to the tools its vendor allows, and recognises a tool by the identity it sends. Cline sends only a generic identity to a custom endpoint, so Tempr can't tell it from a script, and a plan limited to the tools its vendor names, or to coding tools Tempr recognises (Z.AI, Kimi, Alibaba, Tencent, KUAE and others), refuses it with a plan_tool_not_allowed error. Cline can use the plans that accept any tool: MiniMax, StepFun, Synthetic, Ollama Cloud, NanoGPT, Fire Pass and ClinePass. Name the model by the plan: minimax-plan/MiniMax-M3.1-Flash-Preview. Tempr can get the plan's key two ways:

  • Stored in Tempr. Add the plan's key under Provider keys in the Portal, and keep Cline's settings as they are, with your virtual key.
  • Sent with each request. Put the plan's key in Cline's API Key field. Under Custom Headers, choose Add Header, with the name x-tempr-key and your virtual key as the value. Tempr sends the plan's key only to that plan, and never stores it. An organization's keys take a key sent this way once an owner or admin turns on Plan logins.

Several plans are sold only for the coding tools they support, and some refuse other tools, telling them apart by the identity each tool sends. Tempr passes Cline's own along and never sends another, so check which tools each plan supports before you subscribe.

Ask Cline about your Gateway

Cline can also read your Gateway through the Gateway's own MCP server: usage and cost, request logs and one request's routing, keys, plan, and providers cooling down. Ask it "why did my last few requests fail?" or "which key spent the most this week?" while you work. It comes with the Gateway Pro, Scale and Enterprise plans.

Open MCP Servers in Cline, then Configure → Configure MCP Servers, and add the server to the file that opens:

{
  "mcpServers": {
    "tempr-gateway": {
      "type": "streamableHttp",
      "url": "https://api.temprhq.io/mcp/admin",
      "disabled": false,
      "autoApprove": []
    }
  }
}

Cline then lists the server with an Authenticate button, which opens Tempr's sign-in in the browser. Signed in this way, Cline reads your own Gateway, or your organization's if you're an owner or admin. To let it make changes too, tick Also let it make changes on Tempr's consent page.

To give it a management key instead:

  1. Create a management key

    In the Portal, under Gateway → Keys → Management keys (or Organization → Org keys for an organization's Gateway). A management key reads and manages the Gateway but can't call models, so it's separate from the tvk_ virtual key Cline uses for its model. Tick what Cline may do: Read usage, Read request logs and List keys to read; Create, change and revoke keys as well if it may change keys.

  2. Add it to the server

    Send the key as a bearer token. The file lives in Cline's own settings, not in your project:

"tempr-gateway": {
  "type": "streamableHttp",
  "url": "https://api.temprhq.io/mcp/admin",
  "headers": { "Authorization": "Bearer tmk_..." },
  "disabled": false,
  "autoApprove": []
}
  • The key's permissions decide the tools. Without Read request logs, Cline gets the usage, plan and key tools but not the logs. The server's entry in MCP Servers lists what it has.
  • Changes also need the account to allow them: turn on Changes by AI agents on the Portal's MCP connectors page. Cline can then make changes that only tighten, such as creating a key that expires within 90 days or revoking one, and propose any that would loosen, such as a higher budget, for you to approve in the Portal, and asks you before each call unless you've auto-approved MCP tools or listed one in autoApprove. A new key's secret never reaches Cline: it gets a one-time Portal link for you to copy the key from.

What's next