Skip to content

Token ​

What is a Token? ​

A token is a key used for authentication when calling the API, similar to your "pass." Each time you call the API, you need to include your token in the request header.

Obtaining an API Key ​

  1. Log in to the Fast-API platform
  2. Go to the Token page in the dashboard
  3. Click Add Token in the upper right corner
  4. Fill in the name, keep other options as default
  5. Click Confirm to obtain the generated Key

The Key format is usually: sk-xxxx......

Token Configuration Options ​

OptionDescription
NameThe identifier name for the token, for easy management
QuotaThe maximum quota the token can use, 0 means unlimited
Expiry TimeThe token’s validity period, can be set to never expire
Model ScopeRestricts which models the token can access, leave empty for all
IP WhitelistRestricts which IP addresses can use the token, leave empty for no restriction

Security Recommendations ​

Security Notice

  • Do not share your API Key with others or expose it in code repositories
  • It is recommended to create different tokens for different projects
  • If your token is leaked, delete it immediately and create a new one

Usage ​

Add the Authorization field to the request header:

Authorization: Bearer sk-yourAPIKey