plaingateway
Integrations

Cline

Use plaingateway, the free OpenRouter alternative, in Cline: four settings, the provider's list price for tokens and nothing on top.

Cline is a coding agent that runs inside VS Code. It talks to any OpenAI-compatible API through its OpenAI Compatible provider, so plaingateway needs four settings and one key. Model ids are OpenRouter's, for example openai/gpt-5.6-luna.

Paste this

Set these four fields. Copy each value from the block:

text
API Provider: OpenAI Compatible
Base URL: https://api.plaingateway.com/api/v1
API Key: sk-pg-v1-...
Model: openai/gpt-5.6-luna

Where the setting lives

The fields are in Cline's settings panel: press the gear icon at the top of the Cline panel. Cline keeps them in its own settings, not in your project, so nothing is committed with your code.

Get a key

  1. Sign up at plaingateway.com/signup and click the link in the confirmation email.
  2. Open Keys, press New key and copy it. It starts with sk-pg-v1- and is shown once. Paste it into API Key.
  3. Add credits by card on Credits. Requests are paid from it.

Check it works

Send one short task in Cline, or one request from a terminal to the same base URL with the same model:

sh
export PLAINGATEWAY_API_KEY="sk-pg-v1-..."
curl -i https://api.plaingateway.com/api/v1/chat/completions \
  -H "Authorization: Bearer $PLAINGATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5.6-luna",
    "max_tokens": 32,
    "messages": [
      {"role": "user", "content": "Say hello in five words."}
    ]
  }'

A 200 means the key and the base URL work. Three things in the answer tell you what happened: the X-PG-Host header names the provider that served it, X-PG-Cost-USD is the charge, and usage.cost in the body is the same charge. To find the request, open Logs in your API key's workspace. Logs keeps requests for seven days.

What it costs

You pay the provider's official list price for tokens, and plaingateway adds nothing on top: 0% platform fee, no markup, no subscription, free with your own provider keys. You can earn up to 20% bonus credit, added to your balance when you add money and never taken off the token price: each person you invite gives you 1% bonus credit once they have paid $20 in total, up to 20%, so $100 paid gets up to $120 of credit. The person you invite gets 5% bonus credit on their first top-up, and you earn 10% of what they pay (How referral works). Each model's price is on Models.

Limits today

  • Only openai/ and deepseek/ models answer today. Models lists more ids; any other id returns an error. Other ids that answer include deepseek/deepseek-v4.1-flash, deepseek/deepseek-v4-pro and openai/gpt-6.1-sol.
  • Credit is prepaid. Requests are paid from a balance you add by card. With no balance the gateway answers 402. Each request first holds its largest possible cost, the prompt plus the maximum output; on a low balance it holds an eighth of what is left and shortens the answer to fit, so a long task can get shorter answers, then 402, before the balance is spent.

Gotchas

Pick OpenAI Compatible, not OpenRouter. Cline's OpenRouter provider always sends to OpenRouter's own address.

The base URL ends in /api/v1. Cline adds /chat/completions itself. A base URL with /chat/completions already on it gets 404.

The model id needs the author prefix. gpt-5.6-luna alone returns 400. Copy the full author/slug id from Models.

Context window. Cline's Model Configuration section has a Context Window size. The example models take about one million tokens; each model page on Models lists its own.

Moving from OpenRouter

Keep your model ids. Switch the provider to OpenAI Compatible, set the base URL to https://api.plaingateway.com/api/v1 and paste a plaingateway key. The full guide: Migrate from OpenRouter.

Cline's own reference for this setting: docs.cline.bot.