概要
この endpoint は、現在の管理トークンに紐づく組織内に、新しいtype=user API Key を作成します。
リクエストボディ
| フィールド | 型 | 既定値 / 制約 | 説明 |
|---|---|---|---|
name | string | 必須、既定値 Default Key、長さ 1-50 | 表示名。サーバー側で前後空白が取り除かれます |
limitAmount | number | null | 最小 0、入力上限 1000000 | null または省略 = 無制限、0 = 利用可能額 0、正の値は保存時に正規化され、100000 USD 相当を超えません |
limitCurrency | enum | 既定 USD | USD のみです。CNY を送信すると 400 currency_retired が返されます。 |
models | string[] | 既定値 [] | 任意のモデル許可リスト |
expiresAt | string | null | RFC3339 datetime | null は期限なしを意味します |
補足
- 完全な API Key 値はレスポンスで一度だけ返されます。
models: []は、組織ポリシー以外の追加制限がないことを意味します。limitAmount: 0は有効だが利用可能額 0 のキーを作成します。後から更新できます。
例
リクエスト / レスポンス
正確な schema とレスポンス項目は、上部のインタラクティブな OpenAPI パネルを参照してください。Response example
Important fields
Full secret API key value. It is returned only once on creation.
API key identifier used in follow-up Management API calls.
Display name for the API key.
Non-secret key prefix for display and support.
One of
active, inactive, or revoked.Spending cap in USD as a JSON number for display.
null means unlimited.Exact spending cap in USD as a decimal string.
null means unlimited.Accumulated usage in USD as a JSON number for display.
Exact accumulated usage in USD as a decimal string.
Per-key model allowlist. Empty array means no additional key-level model restriction.
ISO timestamp when the key expires, or
null for no expiry.ISO timestamp for the most recent use, or
null when unused.ISO creation timestamp.