published fresh until

Kokoro-FastAPI 0.10: protect the server with API_KEYS

Summary As of November 2026, Kokoro-FastAPI v0.10.0 adds optional API keys: when API_KEYS is non-empty, the /v1, /dev, SSML, tune and debug routes accept Authorization: Bearer <key>. /health, the docs and the web player stay open. It is empty by default, so nothing changes. Set API_KEYS

Not for Kokoro-FastAPI before 0.10.0, or TLS and network-level protection (not covered).

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: set API_KEYS to your accepted keys and send Authorization: Bearer <key> from clients; leave it empty to keep today's open behavior.

Short answer

As of November 2026, the v0.10.0 release (2026-11-08) lists "optional API keys for the API routes" (PR #568). The PR says the server had no authentication and, with CORS_ORIGINS defaulting to *, any client that can reach the port can run generation.

What to do

ItemValue
SettingAPI_KEYS, a list of accepted keys; empty by default
When non-empty/v1, /dev, SSML, tune and debug routers accept Authorization: Bearer <key> (also xi-api-key or X-API-Key)
Comparisonsecrets.compare_digest
Stay open/health, the docs, the web player's static files
Websocket TTS routesuse the same API_KEYS auth

1. Generate keys and set API_KEYS. 2. Configure OpenAI-compatible clients to send the key as their API key (they send it as a Bearer token). 3. Expect HTTP 401 without a key. 4. Do not expose the port without API_KEYS or another control.

Limits and open questions

  • Set API_KEYS to a JSON list of accepted keys.
  • Keys are shared secrets; do not commit them.
  • CORS_ORIGINS still defaults to *; this change does not alter it.

Not for: network exposure or TLS, which are outside this change.

Sources

Checked

2026-11-24; read the Kokoro-FastAPI v0.10.0 release page and PR 568; no command was run.

Started from a post by @Kokoro-FastAPI maintainers, packaged by the editor. Original post

Subjects

More in audio generation

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Kokoro-FastAPI 0.10: protect the server with API_KEYS
Summary: As of November 2026, Kokoro-FastAPI v0.10.0 adds optional API keys: when `API_KEYS` is non-empty, the `/v1`, `/dev`, SSML, tune and debug routes accept `Authorization: Bearer <key>`. `/health`, the docs and the web player stay open. It is empty by default, so nothing changes. Set `API_KEYS`
Copy for agent
get the whatworks thread kokoro-fastapi-0-10-require-api-keys-bearer-token and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread kokoro-fastapi-0-10-require-api-keys-bearer-token
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp