API management
API management puts a gateway in front of any HTTP API, whether it's an integration you built, your ERP's REST interface or a public API such as Google's. Each consumer gets a subscription with its own rate limit and expiry date. A subscription accepts an API key, an OpenID Connect token, basic credentials or a client certificate. The gateway terminates TLS with certificates Weik.io obtains and renews, logs each request and follows it with a trace into the integration behind the API. Devtest and production answer on their own hostnames, and each has its own keys.
$ weikio get api-deployments --api invoices
ENVIRONMENT API DEFINITION GATEWAYS DEPLOYED BY DEPLOYED STATE
devtest finance/invoices@v1 3f9a0c1e2b4d devtest anna.virtanen@example.com 2026-10-08 09:14 UTC -
production finance/invoices@v1 3f9a0c1e2b4d partners anna.virtanen@example.com 2026-10-08 09:20 UTC -An API in two YAML files
In the example project finance, the API invoices puts a gateway in front of the ERP's invoice interface. You set the API's name and path in the first file. Version v1 of the API sends the calls on to the ERP with a rate limit of 600 calls a minute.
apiVersion: weik.io/v1
kind: api
metadata: { name: invoices, project: finance }
spec: { displayName: Invoice API, prefix: /invoices }apiVersion: weik.io/v1
kind: api-version
metadata: { name: v1, project: finance, api: invoices }
spec:
type: proxy
rateLimit: { permitLimit: 600, window: 1m }
routes: # YARP RouteConfig, verbatim
- RouteId: pending
Match: { Path: "/{**rest}" }
ClusterId: erp
clusters: # YARP ClusterConfig, verbatim
- ClusterId: erp
LoadBalancingPolicy: RoundRobin
Destinations:
erp: { Address: "{{erp-url}}/api/invoices" }$ weikio apply -f ./finance/apis/
Target: https://hub.example, project finance (from finance/project.yaml)
api finance/invoices created
api-version finance/invoices@v1 created (type proxy, rate limit 600/1m)
$ weikio api deploy finance/invoices@v1 --env production
Target: https://hub.example, project finance (argument), environment production (--env)
This will deploy 'finance/invoices@v1' to production environment 'production' on the default gateways.
Continue? [y/N] y
api-deployment production/finance/invoices@v1 created (gateways partners, definition 3f9a0c1e2b4d, revision 31)
Served at https://api.example.com/invoices/v1 (gateway partners).
$ weikio subscription create finance/partner-x --env production --api invoices --type apikey --rate-limit 60/1m
Target: https://hub.example, project finance (argument), environment production (--env)
api-subscription production/finance/partner-x created (gateway partners, type apikey, APIs invoices, rate limit 60/1m)
To rotate the key later:
weikio subscription rotate-key finance/partner-x --env production
API key (shown once): ****************************************
$ curl -i -H "X-Api-Key: $PARTNER_KEY" https://api.example.com/invoices/v1/pending
HTTP/2 200
content-type: application/json
traceresponse: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01What the gateway does
In front of any HTTP API
The gateway fronts your integrations, your own services and third-party APIs. Calls to the upstream can carry headers, basic credentials or an OAuth client-credentials token. The gateway fetches and caches the token.
Docs: Upstreams and routesSubscriptions and keys
A subscription has an owner and an expiry date. It accepts an API key, a key in the query string, basic credentials, an OpenID Connect token, a client certificate or anonymous calls. Weik.io stores each key only as a hash and shows it once. You rotate a key with weikio subscription rotate-key.
Rate limits
You set rate limits, such as 600 calls a minute, per API version and per subscription, and per caller on a gateway.
Docs: Subscriptions and rate limitsHostnames per environment
The same gateway serves api.example.com for production and api-test.example.com for devtest. Each environment has its own subscriptions and keys.
Gateways in your own network
A gateway can listen only on your own network. Partners reach an API at a factory through Weik.io without an open port at the factory.
Docs: Gateways at sitesWebhooks
The gateway stores each request body in a channel before the caller gets its answer. The caller's headers travel with the body. An integration can check the provider's signature from them.
Docs: WebhooksCertificates
Weik.io obtains and renews certificates from Let's Encrypt. It uses DNS challenges through Cloudflare, Hetzner, Azure or RFC 2136. You can also use your own ACME authority, the authority built into Weik.io for internal names or an uploaded certificate.
Docs: CertificatesEvery call recorded
On the Requests page, you see each call with its version, subscription, route and status. You can tell failures on the gateway's side from failures on the caller's side. Each response carries a traceresponse header. With its value, you open the call's trace in weikio trace or the admin UI.
YARP documentation applies
Everything in routes and clusters is YARP's configuration as it is. The YARP documentation covers it, from path matching to load balancing.
One call, start to end
The gateway checks each partner's call against the subscription and the rate limit before it forwards the call to the upstream. The trace follows the call into the integration behind the API.
A partner calls the API on the gateway at api.example.com with its API key. The gateway checks that the key belongs to the subscription finance/partner-x, applies its rate limit of 600 calls a minute and answers 429 when the limit is reached. It forwards the call to the upstream, which is an integration on an agent or any HTTP service such as an ERP's REST interface. Each call becomes one trace with the gateway's step and the upstream's steps.
Watch the calls
In the admin UI, each API has its own Requests, Subscriptions and Metrics pages. Under Settings, you see the gateways with their hostnames per environment.
















The gateway on a laptop
On a laptop the gateway runs alone on plain HTTP. weikio-backend init --dev creates the environment devtest with a gateway that answers on localhost. You can deploy an API and create a subscription right after the install, then call the API with curl. Allowed networks and client certificates work there as on any installation.
API management track
In the API management track, you go from publishing an API and calling it to receiving webhooks. In a pattern video, you learn to check the signature a bank puts on each webhook call.
Questions
Can the gateway front an API that isn't built in Weik.io?
Yes, the upstream can be any HTTP address the gateway reaches, inside your network or on the internet.
Where do consumers get their keys?
Your team creates each key in the admin UI or with the weikio CLI and gives it to the consumer. Weik.io shows a key once and stores only its hash.
Does the gateway keep serving if the backend is down?
Yes, the gateway keeps serving with the last configuration it received. New changes reach it when the backend is back.
Can a devtest key open a production API?
No, each environment answers on its own hostnames and has its own subscriptions and keys. On the security page, you find the sign-in, network and audit controls of the installation.
Is Weik.io open source?
Yes, Weik.io is open source under the Apache License 2.0 and runs on your own servers, in your cloud or in Weik.io Cloud.
Call the live demo API
A curl from your terminal shows up in the live demo's Requests page with its trace.




