跳到內容

身分驗證

所有 HydraSkill API 請求都需要透過 API key 進行身分驗證。

Key 的格式為:sk- 後接 64 個十六進位字元。

sk-a1b2c3d4e5f6...
Terminal window
curl https://api.hydraskill.ai/v1/proxy \
-H "Authorization: Bearer sk-your-key-here"
from hydraskill import ProxyClient
# 方式 1:直接傳入
client = ProxyClient(api_key="sk-your-key-here")
# 方式 2:環境變數(建議)
# export HYDRASKILL_API_KEY="sk-your-key-here"
client = ProxyClient()
  • Dashboard → API Keys 建立 key
  • 每個 key 都有可設定的 QPS 限制
  • Key 可以停用/啟用而不必刪除
  • 為了安全,請定期輪換 key
方案每個 Key 的 QPS最大 Key 數量
Starter105
Pro5010
Enterprise自訂無限制
// Key 無效或缺失
{ "error": "unauthorized", "message": "Invalid API key" }
// Key 已停用
{ "error": "forbidden", "message": "API key is disabled" }
// 觸發速率限制
{ "error": "rate_limited", "message": "QPS limit exceeded", "retry_after_ms": 1000 }