Make your auth docs the page developers never get stuck on
API key documentation is the first real thing a developer touches, and a confusing auth page kills integrations before they start. Good key docs answer four questions without ambiguity: where do I get the key, how do I send it, how do I keep it safe, and what are the limits. This builder produces all four — plus a copy-pasteable cURL example that matches the exact scheme you choose.
How it works
You pick an auth scheme and the tool generates a matching request example and a complete docs section:
Bearer: Authorization: Bearer <key>
Custom header: X-API-Key: <key>
Query string: ?api_key=<key> (discouraged — leaks in logs)
The cURL example is built from your base URL and chosen scheme so it is correct, not generic. The security section is filled in with the non-negotiables — store the key in an environment variable, never commit it, never ship it client-side — and the rate-limit section uses your numbers to explain the 429 behaviour. Everything is plain Markdown ready for a docs site.
Tips and example
Show the key in requests using a placeholder like YOUR_API_KEY, never a real-looking value, so nobody copies a fake key and wonders why it fails. If your API distinguishes test and live keys, say so and prefix them clearly (for example sk_test_ vs sk_live_). Always document what a rejected key looks like — usually a 401 Unauthorized with a JSON error body — so developers can tell an auth failure apart from a network problem. A rotation note (“generate a new key, deploy it, then revoke the old one”) turns a leaked-secret panic into a routine operation.