Create BYOK key
Creates a BYOK key after validating the provider secret
byok:write scope. Supports Idempotency-Key. Audit event: byok_key.created.
Idempotency-Key replays return the redacted metadata response only — never the secret.400 and nothing is saved; transient provider validation failures return a retryable 502 and nothing is saved. A 409 during an in-flight create with the same Idempotency-Key means the original request is still running. Wait and retry.
account_tier accepts the values from List Provider Account Tiers. When omitted, Auriko auto-detects the tier or falls back to the provider’s conservative default.202 with propagation_status: "pending" while the change takes effect. Propagation completes within about 5 minutes.Authorizations
API key authentication.
Keys start with ak_ prefix.
Example: Authorization: Bearer ak_live_xxxxxxxxxxxx
Headers
Idempotency key for safe retries
255^[A-Za-z0-9_-]+$Path Parameters
Workspace identifier
Body
Provider identifier from GET /v1/byok/providers
Provider secret. Accepted once at creation, encrypted at rest, and never returned by any endpoint.
10Human-readable name (defaults to " Key")
1 - 100Whether this key becomes the provider's routing default
Provider account tier from the tiers endpoint. Omit to let Auriko auto-detect or use the provider's conservative default.
Response
Created
BYOK key metadata. Redacted — the provider secret is never returned.
Unique identifier for the BYOK key
Workspace this key belongs to
Provider identifier
Human-readable name for the key
Masked display prefix of the submitted secret
Whether this key is the provider's default for routing
Disabled keys are excluded from routing; the secret stays encrypted at rest
Coarse validation status (no provider diagnostics)
valid, pending, invalid, error Provider account tier used for rate-limit and data-policy routing
How the tier was determined
auto_detected, user_specified, fallback, null When the key last passed validation (null if never)
"pending" while a routing-affecting change for this key's provider is committed but edge propagation has not yet been applied
pending, null