Skip to main content

Create an API key

An API key lets a client or program call Guangji API. First sign in to the console.

Create a key​

  1. Open API keys; some versions call this Tokens.
  2. Choose Create API key or Add token.
  3. Enter a recognizable name, such as Cherry Studio - laptop.
  4. Select an available group, spending limit and expiry date.
  5. Save, then copy the complete key from the list. Complete any additional security verification requested.

Settings for your first key​

SettingSuggested approach
NameIdentify the application or device
GroupChoose a group whose availability and prices you have checked
LimitStart with a reasonable test budget; adjust it later
ExpiryUse a short period for temporary testing and review long-lived keys regularly
Model restrictionsAllow only the models needed when restricting a key's purpose
IP restrictionsSet these only when you know the actual outbound IP

Home networks, mobile connections and proxies can change outbound IPs. An incorrect allowlist can reject legitimate requests.

Copy the complete value​

Use the copy button. Do not copy a masked value such as sk-****, or add quotation marks, spaces or newlines.

Keep it private

Anyone with the key may be able to spend your account balance. Do not share it in group chats, support conversations or screenshots.

Next, connect a client or send an API request.

Search all documentation Tab to navigate · Enter to open · Esc to close