Overview
Creates a newtype=user API key in the organization associated with the current management token.
Request Body
| Field | Type | Default / Limits | Notes |
|---|---|---|---|
name | string | required, default Default Key, length 1-50 | Display name, trimmed server-side |
limitAmount | number | null | min 0, max 100000 | null or omitted = unlimited, 0 = zero quota, positive = USD spending cap |
limitCurrency | enum | default USD | Optional: USD or CNY. When set to CNY, limitAmount is treated as RMB and converted to USD server-side before storage |
models | string[] | default [] | Optional logical model allowlist |
expiresAt | string | null | RFC3339 datetime | null means no expiry |
Notes
- The full API key value is shown only once in the response.
models: []means the key has no additional model restriction beyond organization policy.limitAmount: 0creates a key that is valid but cannot spend quota until updated.- The response includes
exchange_rate, plus RMB display companionslimit_amount_cnyandused_amount_cny. - By default,
limitAmountis interpreted as USD. SetlimitCurrency: "CNY"to submit an RMB cap that will be converted to USD using the current exchange rate before storage.