Guide · pricing · paid plans

BYOK image generation with your own OpenRouter key

Connect an OpenRouter API key and generation and editing stop being priced per model. They become a flat 2-credit platform fee, with the model cost billed to you directly by OpenRouter. Pay OpenRouter for the model; pay us for the plumbing. Whether that is cheaper comes down to one number, and the arithmetic is below.

By the imagemcpserver.com teamPublished Updated 8 min read
one text-to-image call

Platform credits

15 cr

With your OpenRouter key

2 cr

Plus whatever OpenRouter charges you for that model, billed on their side. On a default model you are trading 13 platform credits for one OpenRouter invoice line.

Two different things are called BYOK

This trips up almost everyone who searches for it, because the same three letters describe two layers of the same stack. They are independent, and you can run either one or both.

Layer 1 — here

You bring an OpenRouter key to us

We call OpenRouter with your key instead of ours. You pay us 2 credits for the call; OpenRouter bills you for the model. This is what the rest of this page is about.

Layer 2 — on OpenRouter

You bring provider keys to OpenRouter

OpenRouter routes through your own OpenAI, Anthropic, Bedrock or Vertex credentials and charges a percentage of list price rather than the full rate. Configured in OpenRouter, nothing to do with us.

They stack

Bring provider keys to OpenRouter, then bring the OpenRouter key here, and a generation costs you 2 platform credits plus OpenRouter’s percentage plus your own provider’s rate. That is the cheapest configuration available and also the one with the most places for a misconfiguration to hide — which is what the troubleshooting section below is for.

What changes, and what does not

BYOK only affects the operations that route through OpenRouter. The tools that run on our own provider account keep their standard prices, because your key has nothing to do with them.

Credit cost of each image operation while BYOK is active
OperationWith BYOK active
Text → Image2 (platform fee only)
Image Edit2 (platform fee only)
Transparent Image10 (2 fee + 8 cutout)
Background Removal8 (runs on our provider)
Upscale15 (runs on our provider)
Text → SVG5 (runs on our provider)
Compress / Convert1

💡 Read the transparent-image row carefully

It is 2 + 8, not 2. The generation half goes through your OpenRouter key; the cutout half runs on our provider and keeps its 8-credit price. Compound operations split the same way everywhere.

The break-even arithmetic

“It depends” is a useless answer when there is only one variable. BYOK is cheaper whenever the model costs you less on OpenRouter than the credits you stop spending here are worth. Credits are worth $0.0125 to $0.02 each depending on plan, so:

Break-even OpenRouter model price per image, by model tier and plan
Model tierPlatform priceCredits savedBreak-even (best plan)Break-even (Starter)
Fast model8 credits6 credits$0.08$0.12
Default model15 credits13 credits$0.16$0.26
Premium model30 credits28 credits$0.35$0.56

Read a row as: if that model costs you less than the break-even figure per image on OpenRouter, BYOK saves you money. Note that the better your plan, the lower the bar drops — cheaper credits make the platform harder to beat, not easier.

Do not forget OpenRouter’s own cut

If you are also running layer 2 — your provider keys attached to OpenRouter — OpenRouter takes a percentage of what the model would have cost at their list price, with a monthly free allowance measured in inference spend rather than request count. Image workloads rarely reach it, but the terms have changed at least once already, so read their BYOK documentation rather than trusting a figure quoted anywhere else, this page included. Checked September 2026.

When it is worth doing

Switch when…

  • You generate at volume and your model comes in under the break-even figure above.
  • You want a specific model your OpenRouter account can reach that is not in the platform catalogue.
  • You already have OpenRouter spend commitments or credits to use up.
  • You want model costs on one bill with the rest of your AI spend.

Stay on platform credits when…

  • Your volume is modest and one predictable bill is worth more than a marginal saving.
  • Most of your work is cutting out, upscaling or compressing — BYOK does not touch those.
  • You would rather not manage a second provider account and its billing.
  • You are still evaluating and do not want two variables moving at once.

Connecting a key

Four steps, about five minutes, and the fourth is the one people skip.

  1. 1Create a key on OpenRouterIn your OpenRouter account, issue an API key scoped to what you intend to run here. A dedicated key is worth it — you can revoke this one without touching anything else you use OpenRouter for.
  2. 2Fund the OpenRouter sideThe model cost lands on your OpenRouter bill, not ours. A key with no balance behind it produces failed generations, not free ones.
  3. 3Paste it into billingDashboard → Billing → connect the key. It is encrypted on save and never displayed again, so keep your own copy if you need one.
  4. 4Run one generation and read the logThe request log should show 2 credits against a generate or edit call. If it shows the full model price, the key is not active on that call — see the section below.

When it looks like nothing happened

A connected key that does not appear to change anything is usually one of five things, in roughly this order of likelihood. The first is not a fault at all.

The operation does not use OpenRouter

Background removal, upscaling and text-to-SVG run on our own provider account. BYOK never touches them, so a pipeline made mostly of those will look unchanged. This is the single most common reason people think BYOK is not working.

OpenRouter fell back to shared capacity

By default OpenRouter tries your key and then quietly falls back to its own endpoints when the key fails or does not cover the requested model — so the call succeeds while spending OpenRouter credits rather than running on your key. Their per-key "shared capacity fallback" setting controls this. Checked September 2026.

A data policy filtered the endpoint out

A BYOK key changes which credential authenticates the request, not which endpoints you are allowed to reach. If you enforce zero data retention on OpenRouter and a provider endpoint retains prompts, that endpoint stays ineligible even with a valid key — and the request can fail with no obvious connection to BYOK.

The provider key was never set up on OpenRouter

If you are chaining both layers, a model that requires your own provider credentials needs that credential configured in OpenRouter first. Bringing an OpenRouter key here does not create the provider key underneath it.

The key is paused, or the balance ran out

A paused key falls back to platform credits, which is a price change rather than an error and is easy to miss. An empty OpenRouter balance is a failure rather than a fallback.

The request log is the fastest diagnostic in every one of these cases: it records the tool, the credits deducted and the model that actually served each call, so you can see in one screen whether a generation was billed at 2 credits or at the full model price.

How your key is handled

Encrypted at rest

Stored with AES-256-GCM. It is not kept in plain text anywhere in the system.

Never returned

Once saved, it is not shown or sent back to you — not in the dashboard, not through the API.

Pausable

Turn it off and every call falls back to platform credits immediately, with nothing else to change.

Removable

Delete it whenever you like. Revoke it on OpenRouter’s side too if you want belt and braces.

BYOK works everywhere the rest of the platform does — the playground, the REST API and every MCP tool. There is no separate mode to enable per surface; connecting the key once changes how generation and editing are billed across all of them.

BYOK questions

Can I bring my own API key to OpenRouter?

Yes, but note that this is a different layer from bringing an OpenRouter key here. On OpenRouter you can attach your own provider keys — OpenAI, Anthropic, Bedrock, Vertex — and OpenRouter routes through them. Here, you attach an OpenRouter key and we route through that. The two stack: you can bring provider keys to OpenRouter and bring the resulting OpenRouter key to us.

How do you use BYOK on this platform?

Create an API key in your OpenRouter account, open the billing tab in the dashboard, paste it and save. Generation and editing switch to the flat 2-credit platform fee immediately, across the playground, the REST API and every MCP tool. There is no per-surface setting to enable.

Is OpenRouter BYOK free?

Not exactly, though it often costs nothing in practice. As of September 2026 OpenRouter charges 5% of what the same model and provider would have cost on their platform, with a monthly free allowance measured in list-price inference spend rather than request count. Image workloads rarely approach that allowance. Check their BYOK documentation before planning around it — these terms have already changed once.

What is BYOK, in one sentence?

You connect your own OpenRouter account, OpenRouter bills you directly for the model, and this platform charges a flat 2 credits per generation or edit instead of the full model price.

Which operations does it change the price of?

Only the ones that route through OpenRouter — generation and editing. Background removal, upscaling and vector generation run on our own provider account, so they keep their standard prices whether BYOK is on or off. Compression and conversion stay at 1 credit.

How is my key stored?

Encrypted with AES-256-GCM, and never returned or displayed again after you save it. You can pause it or remove it at any time, which drops you straight back to platform credits with no other change.

Do I still need a paid plan?

Yes. BYOK is available on paid plans, and you still spend platform credits — just far fewer of them per call. It shifts the model cost to OpenRouter rather than removing every cost.

Why is my key connected but nothing looks cheaper?

Most often because the work you are doing does not route through OpenRouter at all. Background removal, upscaling and text-to-SVG run on our own provider and are billed the same either way — if your pipeline is mostly cutouts and upscales, BYOK will barely move your usage. Check the request log: generation and edit calls should show the flat platform fee.