Creates a new sub-API key scoped under an admin key, with optional model restrictions and per-key credit limits.
value is returned only once at creation time. Store it securely — it cannot be retrieved again. Only the truncated display string is stored and returned in subsequent list or usage calls.description – A human-readable label to identify the key’s purpose or owner.
allowed_models – An optional list of model identifiers (e.g. "meta-llama/Llama-3.3-70B-Instruct") that this sub-key is permitted to call. If omitted, all models available to the admin are accessible. Requests to unlisted models are rejected with 403 Forbidden.
credit_limit – Maximum IO Intelligence credits the sub-key may consume per refresh cycle. Once the limit is reached the key is automatically blocked until the cycle resets or the admin raises the limit via PATCH. Set to null to impose no per-key cap.
credit_refresh_cycle – How often the usage counter resets: "8h", "daily", "weekly", or "monthly" (default).
expires_at – ISO 8601 date-time for key expiry, or the literal string "never" for a non-expiring key. Defaults to 180 days from creation when omitted.
key_prefix – An optional lowercase slug (2–8 chars) prepended to the generated key value (e.g. "acme" produces acme-v2-eyJ...). Defaults to the standard io-v2 prefix when omitted. Cannot start with "io" or contain version markers like "-v2".
The access token received from the authorization server in the OAuth 2.0 flow.
Admin API key with full access. Sub-keys created by this key inherit its credit pool. Admin API key (io.net Intelligence)
A human-readable label for the sub-key.
Access scopes. Defaults to ["intelligence"] if omitted.
List of model identifiers this sub-key is permitted to use. If omitted, all models available to the admin are allowed.
Maximum credits (in IO Intelligence credits) the sub-key may consume per refresh cycle. Null means no per-key limit — the admin's overall balance applies.
x >= 0How often the sub-key's credit_used counter resets. Defaults to "monthly".
8h, daily, weekly, monthly Expiry date-time for the key. Pass "never" for a non-expiring key. Defaults to 180 days from creation if omitted.
Custom lowercase slug prepended to the key (e.g. "acme" produces "acme-v2-..."). Must be 2–8 lowercase alphanumeric characters with optional internal hyphens. Cannot start with "io" (reserved) or contain version markers such as "-v2".
2 - 8^[a-z][a-z0-9-]*[a-z0-9]$