Authentication
Xenodia API key、Bearer token、secret boundary を server-side integration で扱う方法。
Xenodia public API は Bearer token を使います。Runtime call は server から送信し、長期 API key をブラウザに露出しないでください。
Header
Authorization: Bearer YOUR_LONG_TERM_KEYcURL template
curl "https://api.xenodia.xyz/v1/models"/v1/models は public endpoint なので API key は不要です。Chat、image、video、task retrieval は認証が必要です。
curl -X POST "https://api.xenodia.xyz/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $XENODIA_API_KEY" \
-d '{"model":"openai/gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'Key handling
- 長期 key は server env、secret manager、または制御された agent runtime にだけ置く。
- ブラウザはあなたの backend を呼び出し、Xenodia key を直接持たない。
- agent や workflow ごとに key を分けると、revoke と audit が簡単になります。
- key rotation 時は agent runtime の skill/env 設定も更新します。
よくある status code
| Status | Meaning |
|---|---|
401 | API key がない、または無効。 |
402 | balance または billing boundary が不足。 |
403 | 現在の account が resource にアクセスできない。 |
429 | Rate limit または quota boundary。 |
本番の指針
API key、owner wallet、agent wallet、channel permission は同じ security boundary の一部として扱います。ログには request ID と status code を残し、raw prompt、API key、private key は記録しません。