On 23 November 2026 I tried the UsageRail Node SDK from JSR, the FastAPI starter image from Docker Hub and the public Postman collection for its server API on an M-series Mac, without creating an app key for the tests. The starter answered /health. The SDK returned 401 for missing and malformed customer keys on Node and Deno. For Postman, I pointed the requests at a local server to see what they sent. I left out the npm and PyPI builds.
Nothing in these tests talked to the real API. The app key was a placeholder, urk_test_placeholder. The container ran with --network none, and for Node and Deno I pointed the SDK's baseUrl option (it's in the source, not in the docs) at a closed local port. I generated customer keys with the SDK's own key-format module. They pass the format and checksum check, but they were never issued.
JSR, from Node
The SDK checks API keys, applies per-customer rate limits and quotas, and meters usage inside your own server. The @usagerail/node package page on JSR shows version 0.1.2, a JSR score of 17%, and "unknown" for every runtime in the "Works with" row. The README on that page is the npm one. It says to run npm install @usagerail/node, which gets you the npm build rather than the JSR one, and its only example imports @usagerail/node/express.
The JSR route for Node is npx jsr add:
npm init -y npm pkg set type=module npx jsr add @usagerail/node The whole command took about 14 seconds, and npm reported 7 of them for its install. It wrote an .npmrc with @jsr:registry=https://npm.jsr.io and added "@usagerail/node": "npm:@jsr/usagerail__node@^0.1.2" to package.json, so imports still say @usagerail/node. npm installed two packages, not one. The README says the SDK "has no dependencies of its own", and on npm that's true, but the JSR build depends on hono@^4.8 and pulled in 4.13.21.
The Express example fails on the first line:
ERR_PACKAGE_PATH_NOT_EXPORTED Package subpath './express' is not defined by "exports" ./fastify gives the same error. The JSR build has no Express or Fastify entry points. It has ./hono, ./next, ./node (helpers for snapshots and shutdown) and the root export with createEngine for other frameworks. So on JSR I used Hono, which needs one more install:
npm install hono @hono/node-server hono was already in node_modules as the SDK's dependency, but if your code imports it, list it yourself. I saved this as server.mjs and ran USAGERAIL_APP_KEY=urk_test_placeholder node server.mjs. The baseUrl line is only there to keep the test offline; remove it when you use a real app key.
import { serve } from "@hono/node-server"; import { Hono } from "hono"; import { usageRail } from "@usagerail/node/hono"; import { fileSnapshotStore, flushOnExit } from "@usagerail/node/node"; const appKey = process.env.USAGERAIL_APP_KEY; const rail = usageRail({ appKey, auth: "api-key", snapshotStore: fileSnapshotStore(appKey), baseUrl: "http://127.0.0.1:9", // test only: a closed local port }); flushOnExit(rail.engine); const app = new Hono(); app.get("/health", (c) => c.json({ status: "ok" })); app.use("/v1/*", rail); app.get("/v1/hello", (c) => c.json({ message: "Hello" })); serve({ fetch: app.fetch, port: 3124 }); With the placeholder app key, the server started and logged UsageRail: sync failed (GET /v1/sync failed: fetch failed). Then:
GET /health 200 {"status":"ok"} GET /v1/hello, no key 401 {"error":"invalid_api_key"} GET /v1/hello, Bearer not-a-key 401 {"error":"invalid_api_key"} GET /v1/hello, Bearer <generated acme_test_ key> 503 {"error":"auth_unavailable"} The two 401s are decided locally: the key is missing or fails the format and checksum check, so there's nothing to look up. The 503 is the SDK saying it can't confirm a well-formed key with UsageRail. Sending the key in x-api-key instead gave the same 503. The starter image's README says a wrong app key ends in the same 503, so if you see it after signing up, check the app key before the customer key.
The same package from Deno
I ran the same Hono example on Deno 2.9.6:
deno add jsr:@usagerail/node npm:hono The server was the Hono app above with Deno.serve instead of @hono/node-server and Deno.env.get for the key. I left out the two ./node helpers, because I didn't test them under Deno. deno check passed. The first run stopped on permissions, one flag at a time: Requires env access to "USAGERAIL_APP_KEY", then Requires net access to "0.0.0.0:3125". With --allow-env=USAGERAIL_APP_KEY --allow-net=0.0.0.0:3125,127.0.0.1:9, the listening address plus the closed port the test baseUrl pointed at, I got the same 200, 401, 401 and 503 as on Node. With a real app key, --allow-net also needs api.usagerail.com, because that's where the SDK syncs keys and sends counts.
That covers the Hono example and nothing more. The README asks for Node 22 or newer, and the JSR page marks Deno support as unknown.
The Docker image
The starter is a small FastAPI app with the key check, rate limits and usage billing already wired in. The FastAPI starter image on Docker Hub has two tags, 0.1.0 and latest, with the same digest, built for amd64 and arm64. docker pull took 45 seconds here and fetched the arm64 image: 49 MB to download, 224 MB on disk. It runs as a non-root user on port 8000.
Without an app key it doesn't start:
$ docker run --rm usagerail/fastapi-starter:0.1.0 USAGERAIL_APP_KEY is not set. Create an app at https://app.usagerail.com, copy its app key (urk_test_... or urk_live_...) and pass it with -e USAGERAIL_APP_KEY or --env-file. That's exit code 1 and a one-line message instead of a Python traceback. The offline run was:
docker run -d --name ur-starter --network none \ -e USAGERAIL_APP_KEY=urk_test_placeholder usagerail/fastapi-starter:0.1.0 The container started and Docker marked it healthy. I couldn't publish a port with networking turned off, so I sent requests from inside the container with docker exec:
GET /health 200 {"status":"ok"} GET /openapi.json 200 GET /v1/hello, no key 401 {"error": "invalid_api_key"} GET /v1/hello, generated key 503 {"error": "auth_unavailable"} POST /v1/word-count, generated key 503 {"error": "auth_unavailable"} GET /health/ 401 {"error": "invalid_api_key"} The last line is the one to remember if you build on this image. main.py keeps a set of open paths, /health, /docs and /openapi.json, and compares them exactly, so /health/ with a trailing slash goes through the key check. If your load balancer probes a path with a slash, it gets a 401. The comment in main.py says so, and the app is a single file you can copy out of the image to change.
I could read the OpenAPI schema and watch /v1/hello turn a request away without writing any server code. For an authenticated request, you create a test app with the SDK integration, put its app key in an env file, and issue a key for a customer.
The Postman collection
The public Postman collection for UsageRail's billing API holds the server API requests your backend would make to create customers, issue keys, change plans and open Stripe checkout. It doesn't involve the SDK. I read the JSON file the workspace was built from. It has 11 requests: eight under Customers, two under Keys and one under HTTP check. baseUrl is set to https://api.usagerail.com, the two key variables are empty, and consumerId and keyId hold sample IDs. No request has a saved example response, so until you have keys the requests are all there is to look at.
I ran the Keys folder twice and the Customers folder once with newman 6.2.3, pointing baseUrl at a local server that logged the requests. What the real API would answer comes from UsageRail's docs and source.
The server API writes carry Idempotency-Key: {{$guid}}. Running the Keys folder twice sent four different values. If both sends of "Create a key" succeed with different values, the customer ends up with two keys. To see a replay, send the same request twice within 24 hours with a fixed header value and look for Idempotent-Replayed: true. The new key itself only comes back in the first response. POST /v1/check in the HTTP check folder has no idempotency header.
With managementKey left empty, newman sent no Authorization header at all. UsageRail's server code treats a missing header as an empty key, so you get 401 invalid_management_key, the same answer as for a wrong key. It also counts as a failed attempt. The docs say an address that keeps sending wrong keys gets a 429 for a while. The current server code allows 60 failures per IP in a 60-second window, and after that a request with an unknown key gets 429 rate_limited. Ten requests in the collection use this key, so six quick runs with the variable still empty could use up that allowance.
There are also two different credentials. Ten of the requests use the server API key, which starts with urm_ and is created separately on the app's page. "Check a request" uses the app key, and only for an app created with HTTP check as its integration. An SDK app, the kind you'd make for the Docker image or the JSR package, gets 409 wrong_integration_mode from that endpoint, and an app's integration can't be changed later. To try that one request, you need the app key of an app created with HTTP check.
Where I would start
I'd start with the Docker image and read main.py alongside the schema at /openapi.json. You can do that with urk_test_placeholder. For a 200 from /v1/hello, you'll need a real app key and a customer key issued for that app.
