Skip to content
bestokens

API 키

생성, 한도 설정, 폐기.

최종 업데이트: 2026-10-27

API keys are managed from the dashboard or via the management API.

MethodPathPurpose
GET/v1/keysList keys (prefix, label, spend, last used)
POST/v1/keysCreate a key, returns plaintext once
PATCH/v1/keys/:idRename or set a monthly spend cap
DELETE/v1/keys/:idRevoke immediately
              curl -X POST https://api.bestokens.cn/v1/keys \
  -H "Authorization: Bearer $BESTOKENS_SESSION" \
  -H "Content-Type: application/json" \
  -d '{"label":"production","monthly_cap_usd":200}'
            

Revocation takes effect within one second at the edge cache. In-flight streams are allowed to finish so you are not charged for output you never received.

기술 문서는 영어로 제공됩니다.