Authentication

Creating, using, and securing API keys.

Send your API key (it starts with sk-) as a Bearer token on every request:

Authorization: Bearer sk-YOUR_KEY

sk-YOUR_KEY is a placeholder — swap in the real key you created in the console.

Creating & managing keys

Under Console → API Keys:

  • Create: set an expiry (never / 7 / 30 / 90 days) and a quota cap (unlimited / 10 / 50 / 100 credits).
  • View again: the full key is shown when you create it; afterwards the list shows a mask (sk-… plus the last 4 characters). Click Reveal on a key to see the full key again — it hides itself after 60 seconds, and reveals are rate-limited.
  • Enable / disable: switch a key off without deleting it; a disabled key gets 403 "API key is disabled" until you switch it back on.
  • Delete: a soft delete; not recoverable. To revoke a key, delete it and create a new one.

Security practices

  • Do not embed keys in front-end code, public repositories, or screenshots.
  • Use a separate key per purpose, each with an expiry and quota cap, to contain the blast radius of a leak.
  • Suspect a leak? Delete the key immediately (a soft delete — it can't be recovered), then create a new one.

Quota & billing

Calls consume credits from your account (the same wallet as the web app). When your balance is insufficient, requests return 402 (see Errors).

On this page

Authentication · Jiufeng Open API