Bridge by Wekoya / Docs / Your account
Your own provider keys
Updated
If you already pay a model provider (Anthropic, OpenAI, Google, your own AWS account, DeepSeek, OpenRouter and the others below), store that key here and requests for the models it can run go to your own account. The provider bills you directly, nothing is taken from your Wekoya balance, and every request is still logged with its tokens, so your usage page keeps working. The key is checked with the provider before it is saved, and stored encrypted. It is never shown again.
# Store your Anthropic key. Needs a key with the admin scope, or do it under Providers.
curl -X PUT https://wekoya-api.wekoya.tech/v1/provider-keys \
-H "Authorization: Bearer $WEKOYA_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{ "provider": "anthropic", "api_key": "sk-ant-...", "label": "main", "priority": 10 }'
# Your own AWS account: a Bedrock API key, and the region it works in.
curl -X PUT https://wekoya-api.wekoya.tech/v1/provider-keys \
-H "Authorization: Bearer $WEKOYA_ADMIN_KEY" -H "Content-Type: application/json" \
-d '{ "provider": "aws", "api_key": "ABSK...", "region": "eu-west-1", "label": "main" }'
# A second Anthropic account, say one with promotional credit, tried first:
curl -X PUT https://wekoya-api.wekoya.tech/v1/provider-keys \
-H "Authorization: Bearer $WEKOYA_ADMIN_KEY" -H "Content-Type: application/json" \
-d '{ "provider": "anthropic", "api_key": "sk-ant-...", "label": "promo", "priority": 1 }'
# Address a key as provider:label (or by its id). A bare provider works only
# while you have one key for it.
curl -X POST https://wekoya-api.wekoya.tech/v1/provider-keys/anthropic:main/test -H "Authorization: Bearer $WEKOYA_ADMIN_KEY"
curl -X PATCH https://wekoya-api.wekoya.tech/v1/provider-keys/anthropic:main \
-H "Authorization: Bearer $WEKOYA_ADMIN_KEY" -H "Content-Type: application/json" -d '{ "enabled": false }'
curl -X DELETE https://wekoya-api.wekoya.tech/v1/provider-keys/anthropic:main -H "Authorization: Bearer $WEKOYA_ADMIN_KEY"| Key | Runs on your account |
|---|---|
anthropic | Claude models |
openai | GPT models. Not the open-weight gpt-oss, which OpenAI's API does not serve. |
google | Gemini models |
aws | Claude, GPT, Grok, DeepSeek, Kimi, GLM, Qwen, Mistral, Llama, Nova and more, run in your own AWS account. Needs an Amazon Bedrock API key from your AWS console and the region it works in. |
deepseek, xai, mistral, moonshot, zai, alibaba, minimax | The models each of these companies serves on its own API: DeepSeek, Grok, Mistral, Kimi, GLM, Qwen and MiniMax models. |
openrouter, together, fireworks, groq | The Bridge models each host lists. OpenRouter lists most of them. |
| Anything else | A model none of your keys can run bills through your Wekoya balance, as usual. GET /v1/models/mine lists the ones that run on your keys. |
A reply that ran on your key says so, and costs nothing here:
{
"model": "claude-sonnet-5",
"choices": [ ... ],
"wekoya": {
"byok": true,
"key_provider": "anthropic",
"key_label": "main",
"cost": 0,
"currency": "NGN",
"provider_cost": {
"usd": 0.0017,
"ngn_estimate": 2.21,
"ngn_estimate_display": "≈₦2.21",
"estimate": true
},
"routing": {
"served_by": "own_key",
"provider": "anthropic",
"label": "main",
"passed": [ { "step": "own_key", "label": "promo", "reason": "credits" } ]
}
}
}Bridge models and your-key models
| Bridge model | Your-key model | |
|---|---|---|
| Who bills you | Wekoya, from your balance, in naira | Your provider, in dollars |
| Cost from your balance | The model's price | ₦0 |
In /v1/models | "billing": "bridge" | "billing": "own_key" |
| Which models | Every model in the catalogue | Claude, GPT and Gemini, when you have a switched-on key for that maker |
Use /v1/models/mine to list only the models your keys run. It returns an empty list, not an error, when you have no keys. The same model id can be either kind: it is a your-key model while your key for it is switched on.
# Only the models your own keys can run:
curl https://wekoya-api.wekoya.tech/v1/models/mine \
-H "Authorization: Bearer $WEKOYA_API_KEY"
{
"object": "list",
"providers": ["anthropic"],
"data": [
{
"id": "claude-sonnet-5",
"wekoya": {
"billing": "own_key",
"own_key_provider": "anthropic",
"own_key_labels": ["main", "promo"],
"provider_list_price_per_million": {
"input": { "usd": 3, "ngn_estimate": 3900 },
"output": { "usd": 15, "ngn_estimate": 19500 },
"estimate": true
}
}
}
]
}
# Every model, each marked with who pays: "own_key" or "bridge".
curl https://wekoya-api.wekoya.tech/v1/models -H "Authorization: Bearer $WEKOYA_API_KEY"In the Playground, “Pay with: My keys” shows only these models, marked Your key.
What your own key costs, in naira
costis what Wekoya charged: always 0 on your own key.provider_costis what your provider will bill you: their list price inusd, andngn_estimateat a fixed ₦1,300 per dollar, with no Wekoya markup.- It is an estimate, marked “≈” everywhere it appears. Your provider bills in dollars at their own rate, and their invoice is the final figure.
- The same estimate is shown on Usage, the Playground and Providers.
In the Playground
If you have a provider key switched on, the Playground shows Pay with: Auto (your routing), My keys (only models your keys run) or Wekoya balance. In the model list, your-key models sit under “On your keys” and carry a Your key mark. Each reply says which paid for it. With no keys, the Playground is unchanged.
Several keys, budgets and credits
Store more than one key per provider by giving each a label. Keys are tried by priority, lowest first. If one fails before any of the answer reaches you (rejected, out of credit, rate limited, provider down), the request moves to the next key, and the key that failed is tried after the others for a while: 30 seconds after a rate limit, 10 minutes after a rejection, 15 minutes when the account is out of credit. A key over its monthly budget, or set to use credits only once they are spent, is skipped.
# A monthly budget (USD, estimated at list price) and promotional credit that
# the key is used for only until it runs out:
curl -X PATCH https://wekoya-api.wekoya.tech/v1/provider-keys/anthropic:promo \
-H "Authorization: Bearer $WEKOYA_ADMIN_KEY" -H "Content-Type: application/json" \
-d '{ "monthly_budget_usd": 200, "credit_usd": 500, "credit_expires_at": "2026-12-31",
"credits_only": true, "reset_credit_usage": true }'
# Month-to-date spend per key, a projection, credit left and runway:
curl https://wekoya-api.wekoya.tech/v1/provider-keys/overview -H "Authorization: Bearer $WEKOYA_ADMIN_KEY"Budgets, spend and credit are estimates at list price less any discount_bps you set, counted per UTC month. Your provider's invoice is the authority. A budget here makes Bridge skip the key; to cap what the provider itself can charge, also set a limit in that provider's billing settings.
Routing and wallet fallback
Without rules, a model your keys can serve runs on them, and never on your Wekoya balance. Turn on wallet_fallback to carry on on your balance when every key is skipped or fails. Rules give a model its own order: the first rule whose match fits decides, and its chain lists byok:<provider>, byok:<provider>:<label> and wallet in the order to try. A chain without wallet never uses your balance.
# Gemini on your Google key, then your Wekoya balance. Everything else on
# your own keys only. Wallet fallback stays off unless you turn it on.
curl -X PUT https://wekoya-api.wekoya.tech/v1/provider-routing \
-H "Authorization: Bearer $WEKOYA_ADMIN_KEY" -H "Content-Type: application/json" \
-d '{ "wallet_fallback": false, "alert_percent": 80,
"rules": [ { "match": ["gemini-*"], "chain": ["byok:google", "wallet"] } ] }'
# Where would a model go right now? Nothing is called.
curl -X POST https://wekoya-api.wekoya.tech/v1/provider-routing/preview \
-H "Authorization: Bearer $WEKOYA_ADMIN_KEY" -H "Content-Type: application/json" \
-d '{ "model": "gemini-3-pro" }'
# One request can override the routing:
curl https://wekoya-api.wekoya.tech/v1/chat/completions \
-H "Authorization: Bearer $WEKOYA_API_KEY" -H "X-Bridge-Billing: own-keys" ...X-Bridge-Billing overrides this for one request: wallet uses only your Wekoya balance, own-keys only your keys, auto (the default) follows your rules. The model may also be written bridge/claude-sonnet-5 for SDKs that want a prefix.
- No silent fallback. Unless you turn wallet fallback on or put
walletin a rule, a request whose keys all fail ends with the reason, and nothing is billed to your balance. - Webhooks tell you as it happens:
provider_key.budget_low,provider_key.budget_exhausted,provider_key.credits_low,provider_key.credits_exhausted(each once per month or per grant, at thealert_percentyou set) andprovider_key.failedwhen a working key starts failing. - Switch a key off to skip it without deleting it, and Check it any time under Providers. Removing a key keeps its usage history.
- Per-user budgets, model restrictions and request limits still apply. A user's budget is not reduced by requests on your own key, since nothing was charged.
- Managing provider keys and routing needs a key with the
adminscope, or the console. A key that can only chat still uses stored keys, but cannot read, replace or remove them. - Stored keys are encrypted, and are only ever used to make your own requests.