Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 12.6 KB

createbyokkeyrequest.mdx

File metadata and controls

17 lines (15 loc) · 12.6 KB
title CreateBYOKKeyRequest

Fields

Field Type Required Description Example
allowed_api_key_hashes List[str] ➖ Optional allowlist of OpenRouter API key hashes (api_keys.hash) that may use this credential. null means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400. [
"f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
]
allowed_models List[str] ➖ Optional allowlist of model slugs this credential may be used for. null means no restriction. null
allowed_user_ids List[str] ➖ Optional allowlist of user IDs that may use this credential. null means no restriction. null
disabled Optional[bool] ➖ Whether this credential should be created in a disabled state. false
is_fallback Optional[bool] ➖ Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried. false
key str ✔️ The raw provider API key or credential. This value is encrypted at rest and never returned in API responses. sk-proj-abc123...
name OptionalNullable[str] ➖ Optional human-readable name for the credential. Production OpenAI Key
provider components.BYOKProviderSlug ✔️ The upstream provider this credential authenticates against, as a lowercase slug (e.g. openai, anthropic, amazon-bedrock). openai
workspace_id Optional[str] ➖ Optional workspace ID to scope the credential to. When omitted, the credential is created in the account's default workspace; if that default has been deleted, the request returns a 400 and you must pass workspace_id explicitly. 550e8400-e29b-41d4-a716-446655440000