Developer portal & API metering
Publish OpenAPI docs, guides and a changelog. Let developers sign up, get keys, pick a usage plan and test calls. Tolldeck enforces rate limits and quotas, meters every request and sends the month-end invoice.

Docs, keys, plans
Import OpenAPI 3.0 or 3.1 (Swagger 2.0 best effort). Operations, schemas and examples render in a three-column reference with breaking-change badges and sunset banners.
Developers create apps, get sandbox and live keys shown once, rotate with a grace period and see their own usage and errors.
An entry tier at no charge, paid tiers, hard or soft caps, per-second rate limits, operation weights and overage billed per block.
Requests and units by product, app and operation, error rates, p50 and p95 latency, revenue and the top developers.
Public, partner (approval required) or private products. IP allow-lists per app, enforced at the gateway.
Serve the portal on developers.your-company.example with your logo, accent colour and legal pages.
Try-it console
In the real portal the console sends the call through your gateway with the developer's sandbox key only. Production keys are never used from the browser console. Try the four outcomes on the right: a normal read, a heavy operation that costs five units, a write and a rate-limited call.
# request
GET /gw/forecast/forecast?city=Lisbon&days=3
X-Api-Key: td_test_••••9aQ2# response · 38 ms · 1 unit
HTTP 200
RateLimit-Remaining: 9
X-Request-Id: req_8f2a41
{
"city": "Lisbon",
"days": [
{
"d": "2026-11-12",
"hi": 17,
"lo": 11,
"sky": "clouds"
},
{
"d": "2026-11-13",
"hi": 18,
"lo": 12,
"sky": "rain"
},
{
"d": "2026-11-14",
"hi": 16,
"lo": 10,
"sky": "clear"
}
]
}Plans, quotas and overage
Each product gets its own usage plans: included units, a rate limit, a hard or soft cap and an overage price per block. Month-end invoices are base fee plus overage blocks plus tax per line, with credits applied first. Usage that comes back as an upstream error is not billed unless you choose to.
Starter tier: 100,000 units included, then $5.00 per 10,000.
Two metering modes
Gateway: Tolldeck checks the key, rate limit and quota and proxies to your upstream, with SSRF protection on every hop. Best for moderate traffic.
Verify-and-report: your own gateway calls a signed verify endpoint per request (cache it for a minute) and posts usage batches. Same dashboards, same invoices, high volume stays on your infrastructure.
Toll Lanes
Sign-up can be open, by invitation or approved by you. Partner products stay hidden until a company is approved, and an app can be limited to its own IP addresses.
You see revenue, top developers, error rates and latency. Developers see their own usage against quota and recent errors.
Publish v2, deprecate v1 with a sunset date: portal banners appear and Deprecation and Sunset headers are added to gateway responses.
SDK snippets
Each edge product page generates these with its own product id filled in: an Express middleware, a Laravel middleware, NGINX auth_request with a small Node sidecar and a FastAPI dependency. Every verify call carries a nonce, so the replay guard never rejects an honest retry.
// Express middleware: verify the key with Tolldeck, report usage in batches.
import crypto from 'node:crypto';
const BASE = 'https://portal.skyrill.example';
const PRODUCT = 'prd_skyrill_forecast';
const SECRET = process.env.TOLLDECK_EDGE_SECRET; // shown once when you create or rotate it
const sign = (raw) => {
const t = Math.floor(Date.now() / 1000);
return `t=${t},v1=${crypto.createHmac('sha256', SECRET).update(`${t}.${raw}`).digest('hex')}`;
};
const call = async (path, body) => {
const raw = JSON.stringify(body);
const res = await fetch(`${BASE}/api/v1/edge/${path}`, { method: 'POST', body: raw, headers: { 'content-type': 'application/json', 'x-tolldeck-product': PRODUCT, 'x-tolldeck-signature': sign(raw) } });
return res.json();
};
const cache = new Map(); // key -> { until, decision }
const queue = [];
export async function tolldeck(req, res, next) {
const key = req.get('x-api-key') || '';
const hit = cache.get(key);
let d = hit && hit.until > Date.now() ? hit.decision : null;
if (!d) {
d = await call('verify', { key, operation: `${req.method} ${req.route?.path || req.path}`, ip: req.ip, nonce: crypto.randomUUID() });
if (d.valid) cache.set(key, { until: Date.now() + 60_000, decision: d });
}
if (!d.valid) return res.status(d.code === 'rate_limited' ? 429 : 401).json({ error: { code: d.code } });
const started = Date.now();
res.on('finish', () => queue.push({ key, operation: `${req.method} ${req.route?.path || req.path}`, status: res.statusCode, at: new Date().toISOString(), latency_ms: Date.now() - started }));
next();
}
setInterval(async () => {
const items = queue.splice(0, 5000);
if (items.length) await call('usage', { batch_id: crypto.randomUUID(), items }).catch(() => queue.unshift(...items));
}, 30_000);Plans for provider workspaces
These are the demo plans an operator offers to provider workspaces. Set your own in the config; billing runs through a simulated gateway until you connect one.
For one API and a small developer community
$29/mo
For API companies with paid tiers
$99/mo
For platform teams at scale
$299/mo
No. Tolldeck is a developer portal with metering. Gateway mode proxies HTTP and JSON traffic to your upstream on one Node process, which suits moderate traffic. For high volume use verify-and-report: your own gateway asks Tolldeck to verify keys and reports usage in batches. There is no GraphQL, gRPC or WebSocket proxying in v1.
You do. Usage invoices are calculated from metered usage and charged through a simulated card gateway until you connect your own. You are the merchant of record; Tolldeck never holds developer money.
On a hard-cap plan the request is refused with quota_exceeded and nothing is billed. On an overage plan usage continues and is billed in blocks at month end. Developers get emails at 80 % and 100 %.
No. Keys are shown once and stored as a peppered SHA-256 hash plus the last four characters. Rotation keeps the old key valid for a grace period you set, then revokes it automatically.
Node 20.9+, MongoDB 6+ and one Node process. Cron lines run the rollups, key expiry, invoicing and dunning. Back up the vault key: upstream credentials are sealed with it.
Create a workspace, import a spec and have a portal with docs, keys and plans in an afternoon.