Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When workspace_id is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass workspace_id explicitly. Treat the raw key as write-only; it is never returned after creation. Use allowed_api_key_hashes to restrict the credential to specific OpenRouter API keys. Management key required.
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.
Your declaration of the data region in which the upstream provider account behind this credential processes requests, used for routing eligibility on OpenRouter's regional hosts. null means undeclared and global is behaviorally identical: the credential follows the region OpenRouter records for the endpoint. europe or us lets requests to eu.openrouter.ai or us.openrouter.ai use this credential for that provider (private endpoints, endpoints pinned to another cloud region, cross-region inference profiles and video models are excluded). Self-declared and not verified by OpenRouter. For OpenAI and Fireworks the region comes from the key material (a {"api_key": ..., "region": ...} key), so the value must match the key's region. Among other providers, Azure accepts europe or us and Anthropic accepts us only. Defaults to the key's region for OpenAI and Fireworks, otherwise null.
Your declaration of whether the upstream provider account behind this credential has zero data retention (ZDR). null inherits OpenRouter's data policy for the provider's endpoint; true declares the account ZDR so requests that require ZDR may route to this credential even when the shared endpoint retains data; false declares it non-ZDR so such requests never route to it. Self-declared and not verified by OpenRouter. Defaults to null.
Whether OpenRouter's shared endpoints on this provider are removed for every model, including models outside allowed_models and after all of your keys for the provider fail. The provider is skipped instead of spending OpenRouter credits. Only valid on non-fallback credentials. Defaults to false.
Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried. Cannot be combined with is_byok_only.
Whether OpenRouter's shared endpoints on this provider are removed for the models this credential applies to (its allowed_models, or every model when null). Requests for those models run only on your keys; models outside the allowlist may still fall back to shared capacity on this provider. Defaults to false.
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.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"OpenRouter | Documentation","colors":{"primary":"#7624F4","light":"#7624F4","dark":"#C8FF00"},"logo":{"light":"https://mintcdn.com/openrouter-d02e98a0/ksNSeB_K7gD-BUDh/assets/logo-v2-light.svg?fit=max\u0026auto=format\u0026n=ksNSeB_K7gD-BUDh\u0026q=85\u0026s=690e45873843519efe02bcbe45795dac","dark":"https://mintcdn.com/openrouter-d02e98a0/ksNSeB_K7gD-BUDh/assets/logo-v2-dark.svg?fit=max\u0026auto=format\u0026n=ksNSeB_K7gD-BUDh\u0026q=85\u0026s=8ba2f49b11cd9839c37dd03c62537ebd","href":"https://openrouter.ai"},"favicon":"https://mintcdn.com/openrouter-d02e98a0/n3IgkjAMQY8SgOLX/assets/favicon-v2.svg?fit=max\u0026auto=format\u0026n=n3IgkjAMQY8SgOLX\u0026q=85\u0026s=f49800815fcadee8a07dcc093051c2de","appearance":{"default":"dark"},"background":{"color":{"light":"#FCFCFE","dark":"#03080A"}},"navbar":{"links":[{"href":"https://openrouter.ai/models","label":"Models"},{"href":"https://openrouter.ai/benchmarks","label":"Benchmarks"},{"href":"https://openrouter.ai/chat","label":"Chat"},{"href":"https://openrouter.ai/rankings","label":"Rankings"},{"href":"https://openrouter.ai/apps","label":"Apps"},{"href":"https://openrouter.ai/ori","label":"Ori"},{"href":"https://openrouter.ai/pricing","label":"Pricing"}],"primary":{"type":"button","label":"Sign In","href":"https://openrouter.ai/sign-in"}},"seo":{"metatags":{"canonical":"https://openrouter.ai/docs"}},"fonts":{"family":"Plus Jakarta Sans","weight":400},"integrations":{"ga4":{"measurementId":"G-R8YZRJS2XN"},"posthog":{"apiKey":"phc_7ToS2jDeWBlMu4n2JoNzoA1FnArdKwFMFoHVnAqQ6O1","apiHost":"https://us.i.posthog.com"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"openrouter-d02e98a0","hasAudioNarration":false,"actualSubdomain":"openrouter-d02e98a0","customDomains":["openrouter.ai"],"gitSource":{"_id":"6ad7fa92692c7c940ff17a31","type":"github","owner":"openrouterteam","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"collectionId":"857b68c3-cde9-4c7a-b45f-8477fff63b5c","liveDeploymentHistoryId":"6aecd163852e46238472000d","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aecd163852e46238472000d"},"feedback":{"contextualFeedback":{"allowEmail":true},"agentFeedback":true,"issues":false,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aed06a81189461718d0f947","clientVersion":"0.0.4071","searchFilterCounts":[{"language":"default","tag":"API Reference","count":303},{"language":"default","tag":"Client SDKs","count":244},{"language":"default","tag":"Docs","count":155},{"language":"default","tag":"Cookbook","count":64},{"language":"default","tag":"Agent SDK","count":42},{"language":"default","tag":"TypeScript SDK","count":40},{"language":"default","tag":"Go SDK","count":39},{"language":"default","tag":"Python SDK","count":39},{"language":"default","tag":"Observability","count":29},{"language":"default","tag":"Features","count":23}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":true,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[{"_id":"6ad8ee98f69c2f90c2a8cc12","deploymentId":"6a349898c5627d470e2c2ff7","questionText":"How do I get started using decision models like Jev?","status":"active","generatedBy":"manual","createdAt":"2026-10-21T16:55:52.120Z","updatedAt":"2026-10-21T16:55:52.120Z","__v":0}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--inverse: 3 8 10;--inverse-foreground: 252 252 254;--tooltip-background: var(--inverse);--tooltip-foreground: var(--inverse-foreground)}code,pre,pre code,.code-block code,[class*=\"code\"] code{font-family:'Geist Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace}::selection{background:rgb(118 36 244 / 0.25)}.dark ::selection,html.dark ::selection{background:rgb(200 255 0 / 0.25);color:inherit}.dark,[data-theme=\"dark\"],html.dark{--primary: 200 255 0;--primary-light: 200 255 0;--primary-dark: 200 255 0;--light-primary: 200 255 0;--primary-foreground: 3 8 10;--inverse: 252 252 254;--inverse-foreground: 3 8 10;--default-border-color: rgb(252 252 254 / 0.14)}#navbar{border-radius:0}#sidebar a[aria-current=\"page\"],nav[aria-label=\"Pages\"] a[aria-current=\"page\"]{border-radius:8px}[data-component-part=\"code-block-root\"]{border-radius:8px}a:not([class]){text-decoration-thickness:1px;text-underline-offset:2px;text-decoration-color:rgb(0 0 0 / 0.4)}a:not([class]):hover{text-decoration-color:currentColor}.dark a:not([class]),html.dark a:not([class]){text-decoration-color:rgb(255 255 255 / 0.4)}.dark a:not([class]):hover,html.dark a:not([class]):hover{text-decoration-color:currentColor}.nav-tag-pill-text{background:transparent!important;color:rgb(0 0 0 / 0.5)!important;border:1px solid rgb(0 0 0 / 0.2)!important}.dark .nav-tag-pill-text,html.dark .nav-tag-pill-text{background:transparent!important;color:rgb(252 252 254 / 0.5)!important;border:1px solid rgb(252 252 254 / 0.2)!important}.nav-logo{height:1.5rem}.dark nav[aria-label=\"Pages\"] button[aria-expanded] svg.transition-transform,html.dark nav[aria-label=\"Pages\"] button[aria-expanded] svg.transition-transform{color:rgb(252 252 254 / 0.627)}.dark nav[aria-label=\"Pages\"] button[aria-expanded]:hover svg.transition-transform,html.dark nav[aria-label=\"Pages\"] button[aria-expanded]:hover svg.transition-transform{color:rgb(252 252 254)}nav[aria-label=\"Pages\"] button[aria-expanded] svg.transition-transform{width:0.625rem;height:0.625rem}[role=\"tooltip\"][data-side],[data-radix-popper-content-wrapper]>div[data-state=\"delayed-open\"],[data-radix-popper-content-wrapper]>div[data-state=\"instant-open\"]{background-color:rgb(var(--tooltip-background))!important;color:rgb(var(--tooltip-foreground))!important}.callout [data-component-part=\"callout-content\"]>.code-block:first-child{margin-top:0}.callout [data-component-part=\"callout-content\"]>.code-block:last-child{margin-bottom:0}[data-floating-buttons] button{background-color:rgb(241 239 245)}.dark [data-floating-buttons] button,html.dark [data-floating-buttons] button{background-color:rgb(40 38 44)}[data-component-part=\"update-tag\"]{border:1px solid rgb(0 0 0 / 0.2);border-radius:9999px;padding:0.125rem 0.625rem;font-size:0.75rem;line-height:1.25rem;color:rgb(0 0 0 / 0.6)}.dark [data-component-part=\"update-tag\"],html.dark [data-component-part=\"update-tag\"]{border-color:rgb(252 252 254 / 0.2);color:rgb(252 252 254 / 0.6)}#topbar-cta-button svg{display:none}#topbar-cta-button a{padding-right:0.75rem}#topbar-cta-button .bg-primary-dark{background-color:rgb(var(--primary))}.dark #topbar-cta-button .text-white,html.dark #topbar-cta-button .text-white{color:rgb(3 8 10)}.dark #changelog-filters-content button.bg-primary,html.dark #changelog-filters-content button.bg-primary{color:rgb(3 8 10 / 0.9)!important}.changelog-status-badge{margin-left:0.5rem}.changelog-status-badge[data-color=\"gray\"]{border:1px solid rgb(3 8 10 / 0.3)!important}.dark .changelog-status-badge[data-color=\"gray\"],html.dark .changelog-status-badge[data-color=\"gray\"]{border-color:rgb(252 252 254 / 0.4)!important}.mermaid>svg{margin-inline:auto}.support-matrix table{font-size:0.8125rem}.support-matrix td,.support-matrix th{min-width:0;padding-right:0.5rem;white-space:nowrap}.support-matrix th code{padding-left:0.25rem;padding-right:0.25rem;font-size:0.6875rem}.pr-fig,.pr-mini{--pr-ink: #03080a;--pr-muted: rgb(3 8 10 / 0.69);--pr-rule: rgb(3 8 10 / 0.12);--pr-surface: #ffffff;--pr-positive-text: #007544;--pr-negative-text: #bf0024}.dark .pr-fig,.dark .pr-mini{--pr-ink: #fcfcfe;--pr-muted: rgb(252 252 254 / 0.627);--pr-rule: rgb(252 252 254 / 0.14);--pr-surface: #080d0f;--pr-positive-text: #34dfaa;--pr-negative-text: #ff2d55}.pr-fig{margin:1.5rem 0;padding:1rem;overflow-x:auto;container-type:inline-size;border:1px solid var(--pr-rule);border-radius:8px;background:var(--pr-surface)}.pr-fig svg{display:block;width:100%;height:auto}.pr-mini{margin:1rem 0 1.25rem}.pr-mini svg{display:block;max-width:100%;height:auto;margin-inline:auto}.pr-fig svg text,.pr-mini svg text{font-family:inherit;font-size:12px;fill:var(--pr-muted)}.pr-sw{display:inline-block;flex:none;width:12px;height:12px;border-radius:2px}.pr-bg-price{background:#0088fe}.pr-bg-ttft{background:#ffbb28}.pr-bg-speed{background:#7b68ee}.pr-bg-rel{background:#ff2d55}.pr-bg-429{background:#ff8042}.pr-bg-received{background:var(--pr-ink)}.pr-bg-capacity{background:rgb(var(--gray-400))}.pr-fill-ttft{fill:#ffbb28}.pr-fill-speed{fill:#7b68ee}.pr-fill-rel{fill:#ff2d55}.pr-fill-429{fill:#ff8042}.pr-fig .lbl{font-size:13px;fill:var(--pr-ink)}.pr-fig .num{fill:var(--pr-muted);font-variant-numeric:tabular-nums}.pr-fig .strong{fill:var(--pr-ink);font-weight:600}.pr-fig .halo{paint-order:stroke;stroke:var(--pr-surface);stroke-width:4px;stroke-linejoin:round}.pr-fig .axis{stroke:var(--pr-rule);stroke-width:1}.pr-fig .zone{fill:rgb(0 191 111 / 0.12)}.pr-fig .zone-lbl{font-weight:600;fill:var(--pr-positive-text)}.pr-fig .zone-lbl.muted{fill:var(--pr-muted)}.pr-fig .edge{stroke:#00bf6f;stroke-width:1.5;stroke-dasharray:4 3}.pr-fig .edge-curve{fill:none;stroke:#00bf6f;stroke-width:2;stroke-dasharray:5 3}.pr-fig .curve{fill:none;stroke:var(--pr-ink);stroke-width:2.5}.pr-fig .curve-fill{fill:var(--pr-ink);opacity:0.04}.pr-fig .dot{fill:var(--pr-muted);fill-opacity:0.8;stroke:var(--pr-surface);stroke-width:1.5}.pr-fig .dot-in{fill:#00bf6f;stroke:var(--pr-surface);stroke-width:1.5}.pr-fig .got{fill:none;stroke:var(--pr-ink);stroke-width:2}.pr-fig .got-fill{fill:var(--pr-ink);opacity:0.06}.pr-fig .cap{fill:none;stroke:#da70d6;stroke-width:2.5}.pr-fig .real{fill:none;stroke:var(--pr-muted);stroke-width:1.5;stroke-dasharray:5 4}.pr-fig .rate{fill:#ff8042}.pr-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:0.375rem 1rem;margin-top:0.75rem;font-size:12px;color:var(--pr-muted)}.pr-legend span{display:inline-flex;align-items:center;gap:0.375rem}.pr-ln{display:inline-block;width:18px;height:0}.pr-ln-cap{border-top:2.5px solid #da70d6}.pr-ln-real{border-top:1.5px dashed var(--pr-muted)}.pr-table{margin-top:0.875rem;border-top:1px solid var(--pr-rule);font-size:12px}.pr-row{display:grid;grid-template-columns:76px minmax(0, 1fr) 84px;gap:0.5rem;align-items:center;padding:0.375rem 0;border-bottom:1px solid var(--pr-rule)}.pr-head{color:var(--pr-muted);white-space:nowrap}.pr-sub::before{content:\", \"}.pr-name{font-weight:600;color:var(--pr-ink)}.pr-bar{display:flex;height:10px}.pr-bar i{display:block;height:100%}.pr-share{display:flex;align-items:center;gap:0.375rem}.pr-share i{display:block;height:10px;max-width:54px;border-radius:2px;background:var(--pr-muted);opacity:0.5}.pr-share b{font-weight:600;font-variant-numeric:tabular-nums;color:var(--pr-muted)}@media (max-width: 560px){.pr-row{grid-template-columns:76px minmax(0, 1fr) 32px}.pr-share i{display:none}.pr-head{white-space:normal}.pr-sub{display:block}.pr-sub::before{content:none}}@container (max-width: 480px){.pr-fig svg text{font-size:15px}.pr-fig svg .lbl{font-size:16px}}@container (max-width: 400px){.pr-fig svg text{font-size:17px}.pr-fig svg .lbl{font-size:18px}}.pr-mini-row{display:flex;justify-content:center;align-items:center;gap:0.75rem 1.5rem}.pr-mini-row svg{flex:0 1 auto;min-width:0;margin-inline:0}@media (max-width: 640px){.pr-mini-row{flex-wrap:wrap}}.pr-mini .strong-lbl{fill:var(--pr-ink);font-weight:600}.pr-mini .amt{text-anchor:end;font-variant-numeric:tabular-nums}.pr-mini .op{font-size:20px}.pr-mini .paper{fill:var(--pr-surface);stroke:var(--pr-rule);stroke-width:1}.pr-mini .usual{stroke:var(--pr-muted);stroke-width:1;stroke-dasharray:3 3}.pr-mini .sum-line{stroke:var(--pr-ink);stroke-width:1}.pr-mini .price-pill{fill:#0088fe;opacity:0.12}.pr-mini .pill-text{fill:var(--pr-ink);font-weight:600;font-variant-numeric:tabular-nums}.pr-mini .neg-pill{fill:#ff2d55;opacity:0.12}.pr-mini .neg-text{font-size:13px;fill:var(--pr-negative-text);font-weight:600;font-variant-numeric:tabular-nums}.pr-mini .span-stream{fill:var(--pr-muted);opacity:0.3}.pr-mini .span-total{fill:var(--pr-rule)}.pr-mini .extra{opacity:0.45}.pr-mini .bad{fill:none;stroke:#ff2d55;stroke-width:1.5}.pr-mini .tree{fill:none;stroke:var(--pr-muted);stroke-width:1}.pr-mini .brace{fill:none;stroke:var(--pr-muted);stroke-width:1.25}.pr-mini .big-arrow{fill:none;stroke:var(--pr-ink);stroke-width:3}.pr-mini .big-arrow-head,.pr-mini .user-dot{fill:var(--pr-ink)}.pr-factors ul{list-style:none;padding-left:0}.pr-factors li{padding-left:0!important}.pr-factors li::before{display:none}.pr-factors .pr-sw,h3 .pr-sw{margin-right:0.625rem;transform:translateY(1px)}h3 .pr-sw{width:13px;height:13px;transform:translateY(-2px)}.pr-cols{display:grid;grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));gap:0 1.75rem}"}],"page":{"pagePath":"api/api-reference/byok/create-a-byok-provider-credential","slug":"/api/api-reference/byok/create-a-byok-provider-credential","pageMetadata":{"title":"Create a BYOK provider credential","description":"Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When `workspace_id` is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly. Treat the raw key as write-only; it is never returned after creation. Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys. [Management key](/docs/guides/overview/auth/management-api-keys) required.","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /byok","href":"/api/api-reference/byok/create-a-byok-provider-credential","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When \", _jsx(_components.code, {\n children: \"workspace_id\"\n }), \" is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass \", _jsx(_components.code, {\n children: \"workspace_id\"\n }), \" explicitly. Treat the raw key as write-only; it is never returned after creation. Use \", _jsx(_components.code, {\n children: \"allowed_api_key_hashes\"\n }), \" to restrict the credential to specific OpenRouter API keys. \", _jsx(_components.a, {\n href: \"/docs/guides/overview/auth/management-api-keys\",\n children: \"Management key\"\n }), \" required.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a BYOK provider credential","description":"Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When `workspace_id` is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly. Treat the raw key as write-only; it is never returned after creation. Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys. [Management key](/docs/guides/overview/auth/management-api-keys) required.","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /byok","href":"/api/api-reference/byok/create-a-byok-provider-credential","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/openrouter-d02e98a0/c1fa764d8c861cbd/anchor-scroll-fix.js","/docs/_mintlify/custom/openrouter-d02e98a0/c43dc2bfe5fa3c92/auth-cta.js"],"openApiReferenceData":{"operation":{"description":"Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When `workspace_id` is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly. Treat the raw key as write-only; it is never returned after creation. Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys. [Management key](/docs/guides/overview/auth/management-api-keys) required.","operationId":"createBYOKKey","requestBody":"cdaacc43-218f-4e32-bf9b-73a046e38049","responses":{"201":"4f8009d9-23bf-4053-ae93-e4d8cfd076fd","400":"ee1d4ab0-bc71-4105-bb13-0b2c84bbc7de","401":"9ac4624a-20dd-4ad0-ac93-65e406e6389e","403":"27d555e6-0f27-4adf-85fd-83bf01abc9af","500":"9edaa938-b608-4133-90b1-e12cfac08f8d"},"summary":"Create a BYOK provider credential","tags":["BYOK"],"x-speakeasy-name-override":"create","method":"post","type":"path","servers":["7075e944-05e2-4e86-8b6c-ac9eb4ffd9f1"],"security":["34a63711-52b2-4cb6-af7d-25a8d5fc76df"],"path":"/byok","baseUrlOptions":["https://openrouter.ai/api/v1"],"title":"Create a BYOK provider credential","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"example":{"key":"sk-proj-abc123...","name":"Production OpenAI Key","provider":"openai"},"schema":{"example":{"key":"sk-proj-abc123...","name":"Production OpenAI Key","provider":"openai"},"properties":{"key":{"description":"The raw provider API key or credential. This value is encrypted at rest and never returned in API responses.","example":"sk-proj-abc123...","minLength":1,"type":"string","isRequired":true,"uniqueKey":"key","typeLabel":"string"},"provider":{"description":"The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`).","enum":["ai21","aion-labs","akashml","alibaba","amazon-bedrock","amazon-bedrock/claude-on-aws","amazon-nova","ambient","antdigital","anthropic","anthropic/2","arcee-ai","assemblyai","atlas-cloud","avian","azure","baidu","baseten","black-forest-labs","byteplus","cerebras","chutes","cirrascale","clarifai","claude-on-aws","cloudflare","cohere","coreweave","cosine","crusoe","darkbloom","databricks","decart","deepgram","deepinfra","deepseek","dekallm","digitalocean","elevenlabs","featherless","fireworks","fish-audio","friendli","gmicloud","google-ai-studio","google-vertex","groq","heygen","inception","inceptron","inferact-vllm","inference-net","infermatic","inflection","io-net","ionstream","krea","kt","liquid","makora","mancer","mara","meta","minimax","mistral","modal","modelrun","modular","moonshotai","morph","near-ai","nebius","nex-agi","nextbit","novita","nvidia","ollama","open-inference","openai","parallel","parasail","pareto-alpha","particle-ai","pearl-research","perceptron","perplexity","phala","poolside","primalabs","primeintellect","quiver","recraft","recursive","reka","relace","respan","river","runway","sail-research","sakana","sakana-ai","sambanova","scaledown","seed","siliconflow","sourceful","stepfun","streamlake","switchpoint","tencent","tenstorrent","thinkingmachines","together","typesafe","unbiased","upstage","venice","voyageai","wafer","wandb","wandb-legacy","xai","xiaomi","z-ai"],"example":"openai","type":"string","isRequired":true,"uniqueKey":"provider","typeLabel":"enum\u003cstring>"},"allowed_api_key_hashes":{"oneOf":[{"description":"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.","example":["f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"],"items":{"pattern":"^[a-f0-9]{64}$","type":"string","uniqueKey":"allowed_api_key_hashes.oneOf.0.items.[INDEX]","typeLabel":"string"},"maxItems":100,"minItems":1,"type":"array","uniqueKey":"allowed_api_key_hashes.oneOf.0","typeLabel":"string[]"},{"description":"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.","example":["f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"],"items":{"pattern":"^[a-f0-9]{64}$","type":"string"},"maxItems":100,"minItems":1,"type":"null","uniqueKey":"allowed_api_key_hashes.oneOf.1","typeLabel":"null"}],"uniqueKey":"allowed_api_key_hashes","typeLabel":"string[] | null"},"allowed_models":{"oneOf":[{"description":"Optional allowlist of model slugs this credential may be used for. `null` means no restriction.","example":null,"items":{"type":"string","uniqueKey":"allowed_models.oneOf.0.items.[INDEX]","typeLabel":"string"},"maxItems":100,"type":"array","uniqueKey":"allowed_models.oneOf.0","typeLabel":"string[]"},{"description":"Optional allowlist of model slugs this credential may be used for. `null` means no restriction.","example":null,"items":{"type":"string"},"maxItems":100,"type":"null","uniqueKey":"allowed_models.oneOf.1","typeLabel":"null"}],"uniqueKey":"allowed_models","typeLabel":"string[] | null"},"allowed_user_ids":{"oneOf":[{"description":"Optional allowlist of user IDs that may use this credential. `null` means no restriction.","example":null,"items":{"type":"string","uniqueKey":"allowed_user_ids.oneOf.0.items.[INDEX]","typeLabel":"string"},"maxItems":100,"type":"array","uniqueKey":"allowed_user_ids.oneOf.0","typeLabel":"string[]"},{"description":"Optional allowlist of user IDs that may use this credential. `null` means no restriction.","example":null,"items":{"type":"string"},"maxItems":100,"type":"null","uniqueKey":"allowed_user_ids.oneOf.1","typeLabel":"null"}],"uniqueKey":"allowed_user_ids","typeLabel":"string[] | null"},"declared_region":{"oneOf":[{"description":"Your declaration of the data region in which the upstream provider account behind this credential processes requests, used for routing eligibility on OpenRouter's regional hosts. `null` means undeclared and `global` is behaviorally identical: the credential follows the region OpenRouter records for the endpoint. `europe` or `us` lets requests to `eu.openrouter.ai` or `us.openrouter.ai` use this credential for that provider (private endpoints, endpoints pinned to another cloud region, cross-region inference profiles and video models are excluded). Self-declared and not verified by OpenRouter. For OpenAI and Fireworks the region comes from the key material (a `{\"api_key\": ..., \"region\": ...}` key), so the value must match the key's region. Among other providers, Azure accepts `europe` or `us` and Anthropic accepts `us` only. Defaults to the key's region for OpenAI and Fireworks, otherwise `null`.","enum":["global","europe","us",null],"example":null,"type":"string","uniqueKey":"declared_region.oneOf.0","typeLabel":"enum\u003cstring>"},{"description":"Your declaration of the data region in which the upstream provider account behind this credential processes requests, used for routing eligibility on OpenRouter's regional hosts. `null` means undeclared and `global` is behaviorally identical: the credential follows the region OpenRouter records for the endpoint. `europe` or `us` lets requests to `eu.openrouter.ai` or `us.openrouter.ai` use this credential for that provider (private endpoints, endpoints pinned to another cloud region, cross-region inference profiles and video models are excluded). Self-declared and not verified by OpenRouter. For OpenAI and Fireworks the region comes from the key material (a `{\"api_key\": ..., \"region\": ...}` key), so the value must match the key's region. Among other providers, Azure accepts `europe` or `us` and Anthropic accepts `us` only. Defaults to the key's region for OpenAI and Fireworks, otherwise `null`.","enum":["global","europe","us",null],"example":null,"type":"null","uniqueKey":"declared_region.oneOf.1","typeLabel":"null"}],"uniqueKey":"declared_region","typeLabel":"enum\u003cstring> | null"},"declared_zdr":{"oneOf":[{"description":"Your declaration of whether the upstream provider account behind this credential has zero data retention (ZDR). `null` inherits OpenRouter's data policy for the provider's endpoint; `true` declares the account ZDR so requests that require ZDR may route to this credential even when the shared endpoint retains data; `false` declares it non-ZDR so such requests never route to it. Self-declared and not verified by OpenRouter. Defaults to `null`.","example":null,"type":"boolean","uniqueKey":"declared_zdr.oneOf.0","typeLabel":"boolean"},{"description":"Your declaration of whether the upstream provider account behind this credential has zero data retention (ZDR). `null` inherits OpenRouter's data policy for the provider's endpoint; `true` declares the account ZDR so requests that require ZDR may route to this credential even when the shared endpoint retains data; `false` declares it non-ZDR so such requests never route to it. Self-declared and not verified by OpenRouter. Defaults to `null`.","example":null,"type":"null","uniqueKey":"declared_zdr.oneOf.1","typeLabel":"null"}],"uniqueKey":"declared_zdr","typeLabel":"boolean | null"},"disabled":{"description":"Whether this credential should be created in a disabled state.","example":false,"type":"boolean","uniqueKey":"disabled","typeLabel":"boolean"},"is_byok_only":{"description":"Whether OpenRouter's shared endpoints on this provider are removed for every model, including models outside `allowed_models` and after all of your keys for the provider fail. The provider is skipped instead of spending OpenRouter credits. Only valid on non-fallback credentials. Defaults to `false`.","example":false,"type":"boolean","uniqueKey":"is_byok_only","typeLabel":"boolean"},"is_fallback":{"description":"Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried. Cannot be combined with `is_byok_only`.","example":false,"type":"boolean","uniqueKey":"is_fallback","typeLabel":"boolean"},"is_required":{"description":"Whether OpenRouter's shared endpoints on this provider are removed for the models this credential applies to (its `allowed_models`, or every model when `null`). Requests for those models run only on your keys; models outside the allowlist may still fall back to shared capacity on this provider. Defaults to `false`.","example":false,"type":"boolean","uniqueKey":"is_required","typeLabel":"boolean"},"name":{"oneOf":[{"description":"Optional human-readable name for the credential.","example":"Production OpenAI Key","maxLength":255,"type":"string","uniqueKey":"name.oneOf.0","typeLabel":"string"},{"description":"Optional human-readable name for the credential.","example":"Production OpenAI Key","maxLength":255,"type":"null","uniqueKey":"name.oneOf.1","typeLabel":"null"}],"uniqueKey":"name","typeLabel":"string | null"},"workspace_id":{"description":"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.","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string","uniqueKey":"workspace_id","typeLabel":"string\u003cuuid>"}},"required":["provider","key"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"key":"sk-proj-abc123...","name":"Production OpenAI Key","provider":"openai"}}},"exampleType":"examples"}},"required":true,"exampleType":"examples"},"responses":{"4f8009d9-23bf-4053-ae93-e4d8cfd076fd":{"content":{"application/json":{"example":{"data":{"allowed_api_key_hashes":null,"allowed_models":null,"allowed_user_ids":null,"created_at":"2025-08-24T10:30:00Z","declared_region":null,"declared_zdr":null,"disabled":false,"id":"11111111-2222-3333-4444-555555555555","is_byok_only":false,"is_fallback":false,"is_required":false,"label":"sk-...AbCd","name":"Production OpenAI Key","provider":"openai","sort_order":0,"workspace_id":"550e8400-e29b-41d4-a716-446655440000"}},"schema":{"example":{"data":{"allowed_api_key_hashes":null,"allowed_models":null,"allowed_user_ids":null,"created_at":"2025-08-24T10:30:00Z","declared_region":null,"declared_zdr":null,"disabled":false,"id":"11111111-2222-3333-4444-555555555555","is_byok_only":false,"is_fallback":false,"is_required":false,"label":"sk-...AbCd","name":"Production OpenAI Key","provider":"openai","sort_order":0,"workspace_id":"550e8400-e29b-41d4-a716-446655440000"}},"properties":{"data":{"type":"object","description":"The created BYOK credential.","required":["id","provider","workspace_id","label","disabled","is_fallback","is_required","is_byok_only","declared_zdr","declared_region","allowed_models","allowed_api_key_hashes","allowed_user_ids","sort_order","created_at"],"example":{"allowed_api_key_hashes":null,"allowed_models":null,"allowed_user_ids":null,"created_at":"2025-08-24T10:30:00Z","declared_region":null,"declared_zdr":null,"disabled":false,"id":"11111111-2222-3333-4444-555555555555","is_byok_only":false,"is_fallback":false,"is_required":false,"label":"sk-...AbCd","name":"Production OpenAI Key","provider":"openai","sort_order":0,"workspace_id":"550e8400-e29b-41d4-a716-446655440000"},"properties":{"allowed_api_key_hashes":{"oneOf":[{"description":"Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction.","example":["f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"],"items":{"type":"string","uniqueKey":"data.allowed_api_key_hashes.oneOf.0.items.[INDEX]","typeLabel":"string"},"maxItems":100,"type":"array","isRequired":true,"uniqueKey":"data.allowed_api_key_hashes.oneOf.0","typeLabel":"string[]"},{"description":"Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction.","example":["f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"],"items":{"type":"string"},"maxItems":100,"type":"null","isRequired":true,"uniqueKey":"data.allowed_api_key_hashes.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.allowed_api_key_hashes","typeLabel":"string[] | null"},"allowed_models":{"oneOf":[{"description":"Optional allowlist of model slugs this credential may be used for. `null` means no restriction.","example":null,"items":{"type":"string","uniqueKey":"data.allowed_models.oneOf.0.items.[INDEX]","typeLabel":"string"},"maxItems":100,"type":"array","isRequired":true,"uniqueKey":"data.allowed_models.oneOf.0","typeLabel":"string[]"},{"description":"Optional allowlist of model slugs this credential may be used for. `null` means no restriction.","example":null,"items":{"type":"string"},"maxItems":100,"type":"null","isRequired":true,"uniqueKey":"data.allowed_models.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.allowed_models","typeLabel":"string[] | null"},"allowed_user_ids":{"oneOf":[{"description":"Optional allowlist of user IDs that may use this credential. `null` means no restriction.","example":null,"items":{"type":"string","uniqueKey":"data.allowed_user_ids.oneOf.0.items.[INDEX]","typeLabel":"string"},"maxItems":100,"type":"array","isRequired":true,"uniqueKey":"data.allowed_user_ids.oneOf.0","typeLabel":"string[]"},{"description":"Optional allowlist of user IDs that may use this credential. `null` means no restriction.","example":null,"items":{"type":"string"},"maxItems":100,"type":"null","isRequired":true,"uniqueKey":"data.allowed_user_ids.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.allowed_user_ids","typeLabel":"string[] | null"},"created_at":{"description":"ISO timestamp of when the credential was created.","example":"2025-08-24T10:30:00Z","type":"string","isRequired":true,"uniqueKey":"data.created_at","typeLabel":"string"},"declared_region":{"oneOf":[{"description":"Your declaration of the data region in which the upstream provider account behind this credential processes requests, used for routing eligibility on OpenRouter's regional hosts. `null` means undeclared and `global` is behaviorally identical: the credential follows the region OpenRouter records for the endpoint. `europe` or `us` lets requests to `eu.openrouter.ai` or `us.openrouter.ai` use this credential for that provider (private endpoints, endpoints pinned to another cloud region, cross-region inference profiles and video models are excluded). Self-declared and not verified by OpenRouter. For OpenAI and Fireworks the region comes from the key material (a `{\"api_key\": ..., \"region\": ...}` key), so the value must match the key's region. Among other providers, Azure accepts `europe` or `us` and Anthropic accepts `us` only.","enum":["global","europe","us",null],"example":null,"type":"string","isRequired":true,"uniqueKey":"data.declared_region.oneOf.0","typeLabel":"enum\u003cstring>"},{"description":"Your declaration of the data region in which the upstream provider account behind this credential processes requests, used for routing eligibility on OpenRouter's regional hosts. `null` means undeclared and `global` is behaviorally identical: the credential follows the region OpenRouter records for the endpoint. `europe` or `us` lets requests to `eu.openrouter.ai` or `us.openrouter.ai` use this credential for that provider (private endpoints, endpoints pinned to another cloud region, cross-region inference profiles and video models are excluded). Self-declared and not verified by OpenRouter. For OpenAI and Fireworks the region comes from the key material (a `{\"api_key\": ..., \"region\": ...}` key), so the value must match the key's region. Among other providers, Azure accepts `europe` or `us` and Anthropic accepts `us` only.","enum":["global","europe","us",null],"example":null,"type":"null","isRequired":true,"uniqueKey":"data.declared_region.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.declared_region","typeLabel":"enum\u003cstring> | null"},"declared_zdr":{"oneOf":[{"description":"Your declaration of whether the upstream provider account behind this credential has zero data retention (ZDR). `null` inherits OpenRouter's data policy for the provider's endpoint; `true` declares the account ZDR so requests that require ZDR may route to this credential even when the shared endpoint retains data; `false` declares it non-ZDR so such requests never route to it. Self-declared and not verified by OpenRouter.","example":null,"type":"boolean","isRequired":true,"uniqueKey":"data.declared_zdr.oneOf.0","typeLabel":"boolean"},{"description":"Your declaration of whether the upstream provider account behind this credential has zero data retention (ZDR). `null` inherits OpenRouter's data policy for the provider's endpoint; `true` declares the account ZDR so requests that require ZDR may route to this credential even when the shared endpoint retains data; `false` declares it non-ZDR so such requests never route to it. Self-declared and not verified by OpenRouter.","example":null,"type":"null","isRequired":true,"uniqueKey":"data.declared_zdr.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.declared_zdr","typeLabel":"boolean | null"},"disabled":{"description":"Whether this credential is currently disabled.","example":false,"type":"boolean","isRequired":true,"uniqueKey":"data.disabled","typeLabel":"boolean"},"id":{"description":"Stable public identifier for this BYOK credential.","example":"11111111-2222-3333-4444-555555555555","format":"uuid","type":"string","isRequired":true,"uniqueKey":"data.id","typeLabel":"string\u003cuuid>"},"is_byok_only":{"description":"Whether OpenRouter's shared endpoints on this provider are removed for every model, including models outside `allowed_models` and after all of your keys for the provider fail. The provider is skipped instead of spending OpenRouter credits. Only valid on non-fallback credentials.","example":false,"type":"boolean","isRequired":true,"uniqueKey":"data.is_byok_only","typeLabel":"boolean"},"is_fallback":{"description":"Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried. Cannot be combined with `is_byok_only`.","example":false,"type":"boolean","isRequired":true,"uniqueKey":"data.is_fallback","typeLabel":"boolean"},"is_required":{"description":"Whether OpenRouter's shared endpoints on this provider are removed for the models this credential applies to (its `allowed_models`, or every model when `null`). Requests for those models run only on your keys; models outside the allowlist may still fall back to shared capacity on this provider.","example":false,"type":"boolean","isRequired":true,"uniqueKey":"data.is_required","typeLabel":"boolean"},"label":{"description":"Short masked snippet of the key (e.g. the first/last few characters) used to identify it in the UI.","example":"sk-...AbCd","type":"string","isRequired":true,"uniqueKey":"data.label","typeLabel":"string"},"provider":{"description":"The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`).","enum":["ai21","aion-labs","akashml","alibaba","amazon-bedrock","amazon-bedrock/claude-on-aws","amazon-nova","ambient","antdigital","anthropic","anthropic/2","arcee-ai","assemblyai","atlas-cloud","avian","azure","baidu","baseten","black-forest-labs","byteplus","cerebras","chutes","cirrascale","clarifai","claude-on-aws","cloudflare","cohere","coreweave","cosine","crusoe","darkbloom","databricks","decart","deepgram","deepinfra","deepseek","dekallm","digitalocean","elevenlabs","featherless","fireworks","fish-audio","friendli","gmicloud","google-ai-studio","google-vertex","groq","heygen","inception","inceptron","inferact-vllm","inference-net","infermatic","inflection","io-net","ionstream","krea","kt","liquid","makora","mancer","mara","meta","minimax","mistral","modal","modelrun","modular","moonshotai","morph","near-ai","nebius","nex-agi","nextbit","novita","nvidia","ollama","open-inference","openai","parallel","parasail","pareto-alpha","particle-ai","pearl-research","perceptron","perplexity","phala","poolside","primalabs","primeintellect","quiver","recraft","recursive","reka","relace","respan","river","runway","sail-research","sakana","sakana-ai","sambanova","scaledown","seed","siliconflow","sourceful","stepfun","streamlake","switchpoint","tencent","tenstorrent","thinkingmachines","together","typesafe","unbiased","upstage","venice","voyageai","wafer","wandb","wandb-legacy","xai","xiaomi","z-ai"],"example":"openai","type":"string","isRequired":true,"uniqueKey":"data.provider","typeLabel":"enum\u003cstring>"},"sort_order":{"description":"Position within the provider — credentials are tried in ascending sort order.","example":0,"type":"integer","isRequired":true,"uniqueKey":"data.sort_order","typeLabel":"integer"},"workspace_id":{"oneOf":[{"description":"The workspace this credential is scoped to, or `null` when it is global — usable across every workspace in the account. A `null` value does not mean the default workspace.","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string","isRequired":true,"uniqueKey":"data.workspace_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The workspace this credential is scoped to, or `null` when it is global — usable across every workspace in the account. A `null` value does not mean the default workspace.","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"null","isRequired":true,"uniqueKey":"data.workspace_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.workspace_id","typeLabel":"string\u003cuuid> | null"},"name":{"oneOf":[{"description":"Optional human-readable name for the credential.","example":"Production OpenAI Key","type":"string","uniqueKey":"data.name.oneOf.0","typeLabel":"string"},{"description":"Optional human-readable name for the credential.","example":"Production OpenAI Key","type":"null","uniqueKey":"data.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.name","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"data","typeLabel":"object"}},"required":["data"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":{"allowed_api_key_hashes":null,"allowed_models":null,"allowed_user_ids":null,"created_at":"2025-08-24T10:30:00Z","declared_region":null,"declared_zdr":null,"disabled":false,"id":"11111111-2222-3333-4444-555555555555","is_byok_only":false,"is_fallback":false,"is_required":false,"label":"sk-...AbCd","name":"Production OpenAI Key","provider":"openai","sort_order":0,"workspace_id":"550e8400-e29b-41d4-a716-446655440000"}}}},"exampleType":"examples"}},"description":"BYOK credential created successfully","exampleType":"examples"},"ee1d4ab0-bc71-4105-bb13-0b2c84bbc7de":{"content":{"application/json":{"example":{"error":{"code":400,"message":"Invalid request parameters"}},"schema":{"description":"Bad Request - Invalid request parameters or malformed input","example":{"error":{"code":400,"message":"Invalid request parameters"}},"properties":{"error":{"description":"Error data for BadRequestResponse","example":{"code":400,"message":"Invalid request parameters"},"properties":{"code":{"type":"integer","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","uniqueKey":"error.metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","uniqueKey":"error.metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.metadata","typeLabel":"object | null"}},"required":["code","message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"},"openrouter_metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","uniqueKey":"openrouter_metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","uniqueKey":"openrouter_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"openrouter_metadata","typeLabel":"object | null"},"user_id":{"oneOf":[{"type":"string","uniqueKey":"user_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"user_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"user_id","typeLabel":"string | null"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":400,"message":"Invalid request parameters"}}}},"exampleType":"examples"}},"description":"Bad Request - Invalid request parameters or malformed input","exampleType":"examples"},"9ac4624a-20dd-4ad0-ac93-65e406e6389e":{"content":{"application/json":{"example":{"error":{"code":401,"message":"Missing Authentication header"}},"schema":{"description":"Unauthorized - Authentication required or invalid credentials","example":{"error":{"code":401,"message":"Missing Authentication header"}},"properties":{"error":{"description":"Error data for UnauthorizedResponse","example":{"code":401,"message":"Missing Authentication header"},"properties":{"code":{"type":"integer","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","uniqueKey":"error.metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","uniqueKey":"error.metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.metadata","typeLabel":"object | null"}},"required":["code","message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"},"openrouter_metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","uniqueKey":"openrouter_metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","uniqueKey":"openrouter_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"openrouter_metadata","typeLabel":"object | null"},"user_id":{"oneOf":[{"type":"string","uniqueKey":"user_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"user_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"user_id","typeLabel":"string | null"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":401,"message":"Missing Authentication header"}}}},"exampleType":"examples"}},"description":"Unauthorized - Authentication required or invalid credentials","exampleType":"examples"},"27d555e6-0f27-4adf-85fd-83bf01abc9af":{"content":{"application/json":{"example":{"error":{"code":403,"message":"Only management keys can perform this operation"}},"schema":{"description":"Forbidden - Authentication successful but insufficient permissions","example":{"error":{"code":403,"message":"Only management keys can perform this operation"}},"properties":{"error":{"description":"Error data for ForbiddenResponse","example":{"code":403,"message":"Only management keys can perform this operation"},"properties":{"code":{"type":"integer","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","uniqueKey":"error.metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","uniqueKey":"error.metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.metadata","typeLabel":"object | null"}},"required":["code","message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"},"openrouter_metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","uniqueKey":"openrouter_metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","uniqueKey":"openrouter_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"openrouter_metadata","typeLabel":"object | null"},"user_id":{"oneOf":[{"type":"string","uniqueKey":"user_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"user_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"user_id","typeLabel":"string | null"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":403,"message":"Only management keys can perform this operation"}}}},"exampleType":"examples"}},"description":"Forbidden - Authentication successful but insufficient permissions","exampleType":"examples"},"9edaa938-b608-4133-90b1-e12cfac08f8d":{"content":{"application/json":{"example":{"error":{"code":500,"message":"Internal Server Error"}},"schema":{"description":"Internal Server Error - Unexpected server error","example":{"error":{"code":500,"message":"Internal Server Error"}},"properties":{"error":{"description":"Error data for InternalServerResponse","example":{"code":500,"message":"Internal Server Error"},"properties":{"code":{"type":"integer","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","uniqueKey":"error.metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","uniqueKey":"error.metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.metadata","typeLabel":"object | null"}},"required":["code","message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"},"openrouter_metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","uniqueKey":"openrouter_metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","uniqueKey":"openrouter_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"openrouter_metadata","typeLabel":"object | null"},"user_id":{"oneOf":[{"type":"string","uniqueKey":"user_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"user_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"user_id","typeLabel":"string | null"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":500,"message":"Internal Server Error"}}}},"exampleType":"examples"}},"description":"Internal Server Error - Unexpected server error","exampleType":"examples"}},"security":{"34a63711-52b2-4cb6-af7d-25a8d5fc76df":{"apiKey":{"description":"API key as bearer token in Authorization header","scheme":"bearer","type":"http","scopes":[],"schemeName":"apiKey"}}},"servers":{"7075e944-05e2-4e86-8b6c-ac9eb4ffd9f1":{"description":"Production server","url":"https://openrouter.ai/api/v1","x-speakeasy-server-id":"production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"description":"API key as bearer token in Authorization header","scheme":"bearer","type":"http","scopes":[],"schemeName":"apiKey"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key as bearer token in Authorization header","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"apiKey","name":"Authorization"}],"title":"apiKey"}]},"originalFileLocation":"openapi/openapi.yaml"},"subdomain":"openrouter-d02e98a0","siteName":"OpenRouter | Documentation","title":"Create a BYOK provider credential - OpenRouter | Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-05T21:37:08.651Z","originalFileLocation":"/api/api-reference/byok/create-a-byok-provider-credential.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When workspace_id is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass workspace_id explicitly. Treat the raw key as write-only; it is never returned after creation. Use allowed_api_key_hashes to restrict the credential to specific OpenRouter API keys. Management key required.\">\u003cmeta data-mint-head name=\"application-name\" content=\"OpenRouter | Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a BYOK provider credential - OpenRouter | Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When workspace_id is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass workspace_id explicitly. Treat the raw key as write-only; it is never returned after creation. Use allowed_api_key_hashes to restrict the credential to specific OpenRouter API keys. Management key required.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"OpenRouter | Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://openrouter.ai/docs/api/api-reference/byok/create-a-byok-provider-credential\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://openrouter-d02e98a0.mintlify.app/_mintlify/api/og/v2?division=BYOK\u0026amp;title=Create+a+BYOK+provider+credential\u0026amp;description=Create+a+new+bring-your-own-key+%28BYOK%29+provider+credential.+The+raw+key+is+encrypted+at+rest+and+never+returned+in+API+responses.+When+%60workspace_id%60+is+omitted\u0026amp;theme=dbe1bfd215f87f8a607a08b0\u0026amp;signature=d360d8fd904c4101d1c050427feeed4e806c14f17255a1535d66d72f2f65962b\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a BYOK provider credential - OpenRouter | Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When workspace_id is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass workspace_id explicitly. Treat the raw key as write-only; it is never returned after creation. Use allowed_api_key_hashes to restrict the credential to specific OpenRouter API keys. Management key required.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://openrouter-d02e98a0.mintlify.app/_mintlify/api/og/v2?division=BYOK\u0026amp;title=Create+a+BYOK+provider+credential\u0026amp;description=Create+a+new+bring-your-own-key+%28BYOK%29+provider+credential.+The+raw+key+is+encrypted+at+rest+and+never+returned+in+API+responses.+When+%60workspace_id%60+is+omitted\u0026amp;theme=dbe1bfd215f87f8a607a08b0\u0026amp;signature=d360d8fd904c4101d1c050427feeed4e806c14f17255a1535d66d72f2f65962b\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"OpenRouter | Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#7624F4\">\u003clink data-mint-head rel=\"canonical\" href=\"https://openrouter.ai/docs/api/api-reference/byok/create-a-byok-provider-credential\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api/api-reference/byok/create-a-byok-provider-credential.md\">","siteName":"OpenRouter | Documentation","nav":{"global":null,"tabs":[{"tab":"Docs","icon":"book","pages":[{"title":"Docs","href":"/quickstart"}]},{"tab":"API Reference","icon":"code","groups":[{"group":"API Guides","icon":"code","pages":[{"title":"API Reference","icon":"book-open","sidebarTitle":"Overview","href":"/api_reference/overview"},{"title":"Streaming","icon":"bars-staggered","href":"/api_reference/streaming"},{"title":"Embeddings","icon":"draw-square","href":"/api_reference/embeddings"},{"title":"Limits","icon":"gauge-high","href":"/api_reference/limits"},{"title":"Authentication","icon":"lock","href":"/api_reference/authentication"},{"title":"Parameters","icon":"gear","href":"/api_reference/parameters"},{"title":"Errors and Debugging","icon":"triangle-exclamation","href":"/api_reference/errors-and-debugging"},{"group":"Responses API","icon":"reply","pages":[{"title":"Responses API","sidebarTitle":"Overview","icon":"compass","href":"/api_reference/responses/overview"},{"title":"Basic Usage","icon":"play","href":"/api_reference/responses/basic-usage"},{"title":"Reasoning","icon":"lightbulb","href":"/api_reference/responses/reasoning"},{"title":"Tool Calling","icon":"toolbox","href":"/api_reference/responses/tool-calling"},{"title":"Web Search","icon":"globe-pointer","href":"/api_reference/responses/web-search"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/api_reference/responses/error-handling"}]}]},{"group":"Versioning","icon":"code-branch","pages":[{"title":"API Versioning","icon":"code-branch","href":"/api_reference/versioning"},{"title":"API Changelog","icon":"clock-rotate-left","href":"/changelog"}]},{"group":"API Reference","icon":"code","pages":[{"group":"Analytics","pages":[{"title":"Get user activity grouped by endpoint","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /activity","href":"/api/api-reference/analytics/get-user-activity-grouped-by-endpoint"},{"title":"Get available analytics metrics and dimensions","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /analytics/meta","href":"/api/api-reference/analytics/get-available-analytics-metrics-and-dimensions"},{"title":"Query analytics data","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /analytics/query","href":"/api/api-reference/analytics/query-analytics-data"}]},{"group":"alpha.decisions","pages":[{"title":"Submit a Decisions request","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /api/alpha/decisions","href":"/api/api-reference/alphadecisions/submit-a-decisions-request"}]},{"group":"alpha.extractions","pages":[{"title":"Submit an Extractions request","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /api/alpha/extractions","href":"/api/api-reference/alphaextractions/submit-an-extractions-request"}]},{"group":"TTS","pages":[{"title":"Create speech","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /audio/speech","href":"/api/api-reference/tts/create-speech"}]},{"group":"STT","pages":[{"title":"Create transcription","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /audio/transcriptions","href":"/api/api-reference/stt/create-transcription"}]},{"group":"OAuth","pages":[{"title":"Exchange authorization code for API key","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /auth/keys","href":"/api/api-reference/oauth/exchange-authorization-code-for-api-key"},{"title":"Create authorization code","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /auth/keys/code","href":"/api/api-reference/oauth/create-authorization-code"},{"title":"OpenRouter access token signing keys","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /oauth/jwks","href":"/api/api-reference/oauth/openrouter-access-token-signing-keys"},{"title":"Exchange a workload identity token","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /oauth/token","href":"/api/api-reference/oauth/exchange-a-workload-identity-token"}]},{"group":"Batch","pages":[{"title":"List batches","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /batches","href":"/api/api-reference/batch/list-batches"},{"title":"Create a batch","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /batches","href":"/api/api-reference/batch/create-a-batch"},{"title":"Get a batch","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /batches/{id}","href":"/api/api-reference/batch/get-a-batch"},{"title":"Delete a batch","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml delete /batches/{id}","href":"/api/api-reference/batch/delete-a-batch"}]},{"group":"Benchmarks","pages":[{"title":"List Benchmarks","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /benchmarks","href":"/api/api-reference/benchmarks/list-benchmarks"}]},{"group":"BYOK","pages":[{"title":"List BYOK provider credentials","description":"List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /byok","href":"/api/api-reference/byok/list-byok-provider-credentials"},{"title":"Create a BYOK provider credential","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /byok","href":"/api/api-reference/byok/create-a-byok-provider-credential"},{"title":"Get a BYOK provider credential","description":"Get a single bring-your-own-key (BYOK) provider credential by its `id`. [Management key](/docs/guides/overview/auth/management-api-keys) required.","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /byok/{id}","href":"/api/api-reference/byok/get-a-byok-provider-credential"},{"title":"Delete a BYOK provider credential","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml delete /byok/{id}","href":"/api/api-reference/byok/delete-a-byok-provider-credential"},{"title":"Update a BYOK provider credential","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml patch /byok/{id}","href":"/api/api-reference/byok/update-a-byok-provider-credential"}]},{"group":"Chat","pages":[{"title":"Create a chat completion","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /chat/completions","href":"/api/api-reference/chat/create-a-chat-completion"}]},{"group":"Classifications","pages":[{"title":"Task classification market share","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /classifications/task","href":"/api/api-reference/classifications/task-classification-market-share"}]},{"group":"Containers","pages":[{"title":"List container files","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /containers/{container_id}/files","href":"/api/api-reference/containers/list-container-files"},{"title":"Retrieve a container file","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /containers/{container_id}/files/{file_id}","href":"/api/api-reference/containers/retrieve-a-container-file"},{"title":"Download container file content","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /containers/{container_id}/files/{file_id}/content","href":"/api/api-reference/containers/download-container-file-content"},{"title":"Promote a container file into workspace documents","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /containers/{container_id}/files/{file_id}/promote","href":"/api/api-reference/containers/promote-a-container-file-into-workspace-documents"}]},{"group":"Credits","pages":[{"title":"Get remaining credits","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /credits","href":"/api/api-reference/credits/get-remaining-credits"},{"title":"Deprecated Coinbase Commerce charge endpoint","deprecated":true,"version":null,"openapi":"/openapi/openapi.yaml post /credits/coinbase","href":"/api/api-reference/credits/deprecated-coinbase-commerce-charge-endpoint"}]},{"group":"Datasets","pages":[{"title":"Top apps by token usage","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /datasets/app-rankings","href":"/api/api-reference/datasets/top-apps-by-token-usage"},{"title":"Daily token totals for top 50 models","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /datasets/rankings-daily","href":"/api/api-reference/datasets/daily-token-totals-for-top-50-models"},{"title":"Cost per session by harness and model","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /datasets/session-cost","href":"/api/api-reference/datasets/cost-per-session-by-harness-and-model"}]},{"group":"Embeddings","pages":[{"title":"Submit an embedding request","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /embeddings","href":"/api/api-reference/embeddings/submit-an-embedding-request"},{"title":"List all embeddings models","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /embeddings/models","href":"/api/api-reference/embeddings/list-all-embeddings-models"}]},{"group":"Endpoints","pages":[{"title":"Preview the impact of ZDR on the available endpoints","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /endpoints/zdr","href":"/api/api-reference/endpoints/preview-the-impact-of-zdr-on-the-available-endpoints"},{"title":"List all endpoints for a model","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /models/{author}/{slug}/endpoints","href":"/api/api-reference/endpoints/list-all-endpoints-for-a-model"}]},{"group":"External Users","pages":[{"title":"List registered external users","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /external-users","href":"/api/api-reference/external-users/list-registered-external-users"},{"title":"Register an external user","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /external-users","href":"/api/api-reference/external-users/register-an-external-user"},{"title":"Get a registered external user","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /external-users/{user}","href":"/api/api-reference/external-users/get-a-registered-external-user"},{"title":"Deactivate a registered external user","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml delete /external-users/{user}","href":"/api/api-reference/external-users/deactivate-a-registered-external-user"},{"title":"Update a registered external user","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml patch /external-users/{user}","href":"/api/api-reference/external-users/update-a-registered-external-user"}]},{"group":"Files","pages":[{"title":"List files","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /files","href":"/api/api-reference/files/list-files"},{"title":"Upload a file","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /files","href":"/api/api-reference/files/upload-a-file"},{"title":"Get file metadata","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /files/{file_id}","href":"/api/api-reference/files/get-file-metadata"},{"title":"Delete a file","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml delete /files/{file_id}","href":"/api/api-reference/files/delete-a-file"},{"title":"Download file content","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /files/{file_id}/content","href":"/api/api-reference/files/download-file-content"}]},{"group":"Generations","pages":[{"title":"Get request \u0026 usage metadata for a generation","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /generation","href":"/api/api-reference/generations/get-request-\u0026-usage-metadata-for-a-generation"},{"title":"Get stored prompt, completion, and error content for a generation","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /generation/content","href":"/api/api-reference/generations/get-stored-prompt-completion-and-error-content-for-a-generation"},{"title":"Submit feedback for a generation","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /generation/feedback","href":"/api/api-reference/generations/submit-feedback-for-a-generation"}]},{"group":"Guardrails","pages":[{"title":"List guardrails","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /guardrails","href":"/api/api-reference/guardrails/list-guardrails"},{"title":"Create a guardrail","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /guardrails","href":"/api/api-reference/guardrails/create-a-guardrail"},{"title":"Get a guardrail","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /guardrails/{id}","href":"/api/api-reference/guardrails/get-a-guardrail"},{"title":"Delete a guardrail","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml delete /guardrails/{id}","href":"/api/api-reference/guardrails/delete-a-guardrail"},{"title":"Update a guardrail","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml patch /guardrails/{id}","href":"/api/api-reference/guardrails/update-a-guardrail"},{"title":"List key assignments for a guardrail","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /guardrails/{id}/assignments/keys","href":"/api/api-reference/guardrails/list-key-assignments-for-a-guardrail"},{"title":"Bulk assign keys to a guardrail","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /guardrails/{id}/assignments/keys","href":"/api/api-reference/guardrails/bulk-assign-keys-to-a-guardrail"},{"title":"Bulk unassign keys from a guardrail","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /guardrails/{id}/assignments/keys/remove","href":"/api/api-reference/guardrails/bulk-unassign-keys-from-a-guardrail"},{"title":"List member assignments for a guardrail","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /guardrails/{id}/assignments/members","href":"/api/api-reference/guardrails/list-member-assignments-for-a-guardrail"},{"title":"Bulk assign members to a guardrail","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /guardrails/{id}/assignments/members","href":"/api/api-reference/guardrails/bulk-assign-members-to-a-guardrail"},{"title":"Bulk unassign members from a guardrail","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /guardrails/{id}/assignments/members/remove","href":"/api/api-reference/guardrails/bulk-unassign-members-from-a-guardrail"},{"title":"List all key assignments","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /guardrails/assignments/keys","href":"/api/api-reference/guardrails/list-all-key-assignments"},{"title":"List all member assignments","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /guardrails/assignments/members","href":"/api/api-reference/guardrails/list-all-member-assignments"}]},{"group":"Images","pages":[{"title":"Generate an image","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /images","href":"/api/api-reference/images/generate-an-image"},{"title":"List image generation models","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /images/models","href":"/api/api-reference/images/list-image-generation-models"},{"title":"List endpoints for an image model","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /images/models/{author}/{slug}/endpoints","href":"/api/api-reference/images/list-endpoints-for-an-image-model"}]},{"group":"API Keys","pages":[{"title":"Get current API key","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /key","href":"/api/api-reference/api-keys/get-current-api-key"},{"title":"List API keys","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /keys","href":"/api/api-reference/api-keys/list-api-keys"},{"title":"Create a new API key","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /keys","href":"/api/api-reference/api-keys/create-a-new-api-key"},{"title":"Get a single API key","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /keys/{hash}","href":"/api/api-reference/api-keys/get-a-single-api-key"},{"title":"Delete an API key","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml delete /keys/{hash}","href":"/api/api-reference/api-keys/delete-an-api-key"},{"title":"Update an API key","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml patch /keys/{hash}","href":"/api/api-reference/api-keys/update-an-api-key"}]},{"group":"Anthropic Messages","pages":[{"title":"Create a message","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /messages","href":"/api/api-reference/anthropic-messages/create-a-message"}]},{"group":"Models","pages":[{"title":"Get a model by its slug","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /model/{author}/{slug}","href":"/api/api-reference/models/get-a-model-by-its-slug"},{"title":"List all models and their properties","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /models","href":"/api/api-reference/models/list-all-models-and-their-properties"},{"title":"Get total count of available models","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /models/count","href":"/api/api-reference/models/get-total-count-of-available-models"},{"title":"List models filtered by user provider preferences, privacy settings, and guardrails","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /models/user","href":"/api/api-reference/models/list-models-filtered-by-user-provider-preferences-privacy-settings-and-guardrails"}]},{"group":"Observability","pages":[{"title":"List observability destinations","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /observability/destinations","href":"/api/api-reference/observability/list-observability-destinations"},{"title":"Create an observability destination","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /observability/destinations","href":"/api/api-reference/observability/create-an-observability-destination"},{"title":"Get an observability destination","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /observability/destinations/{id}","href":"/api/api-reference/observability/get-an-observability-destination"},{"title":"Delete an observability destination","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml delete /observability/destinations/{id}","href":"/api/api-reference/observability/delete-an-observability-destination"},{"title":"Update an observability destination","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml patch /observability/destinations/{id}","href":"/api/api-reference/observability/update-an-observability-destination"}]},{"group":"Organization","pages":[{"title":"List organization members","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /organization/members","href":"/api/api-reference/organization/list-organization-members"},{"title":"Get organization settings","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /organization/settings","href":"/api/api-reference/organization/get-organization-settings"},{"title":"Update organization settings","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml patch /organization/settings","href":"/api/api-reference/organization/update-organization-settings"}]},{"group":"Presets","pages":[{"title":"List presets","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /presets","href":"/api/api-reference/presets/list-presets"},{"title":"Get a preset","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /presets/{slug}","href":"/api/api-reference/presets/get-a-preset"},{"title":"Create a preset from a chat-completions request body","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /presets/{slug}/chat/completions","href":"/api/api-reference/presets/create-a-preset-from-a-chat-completions-request-body"},{"title":"Create a preset from a messages request body","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /presets/{slug}/messages","href":"/api/api-reference/presets/create-a-preset-from-a-messages-request-body"},{"title":"Create a preset from a responses request body","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /presets/{slug}/responses","href":"/api/api-reference/presets/create-a-preset-from-a-responses-request-body"},{"title":"List versions of a preset","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /presets/{slug}/versions","href":"/api/api-reference/presets/list-versions-of-a-preset"},{"title":"Get a specific version of a preset","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /presets/{slug}/versions/{version}","href":"/api/api-reference/presets/get-a-specific-version-of-a-preset"}]},{"group":"Private Endpoints","pages":[{"title":"List private endpoints","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /private-endpoints","href":"/api/api-reference/private-endpoints/list-private-endpoints"},{"title":"Create a private endpoint","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /private-endpoints","href":"/api/api-reference/private-endpoints/create-a-private-endpoint"},{"title":"Get a private endpoint","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /private-endpoints/{id}","href":"/api/api-reference/private-endpoints/get-a-private-endpoint"},{"title":"Delete a private endpoint","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml delete /private-endpoints/{id}","href":"/api/api-reference/private-endpoints/delete-a-private-endpoint"},{"title":"Update a private endpoint","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml patch /private-endpoints/{id}","href":"/api/api-reference/private-endpoints/update-a-private-endpoint"},{"title":"Activate a validated private endpoint","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /private-endpoints/{id}/activate","href":"/api/api-reference/private-endpoints/activate-a-validated-private-endpoint"},{"title":"Disable a private endpoint","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /private-endpoints/{id}/disable","href":"/api/api-reference/private-endpoints/disable-a-private-endpoint"},{"title":"Enable a private endpoint","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /private-endpoints/{id}/enable","href":"/api/api-reference/private-endpoints/enable-a-private-endpoint"},{"title":"Validate a draft private endpoint","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /private-endpoints/{id}/validate","href":"/api/api-reference/private-endpoints/validate-a-draft-private-endpoint"}]},{"group":"Private Providers","pages":[{"title":"List private providers","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /private-providers","href":"/api/api-reference/private-providers/list-private-providers"},{"title":"Create a private provider","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /private-providers","href":"/api/api-reference/private-providers/create-a-private-provider"},{"title":"Get a private provider","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /private-providers/{slug}","href":"/api/api-reference/private-providers/get-a-private-provider"},{"title":"Delete a private provider","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml delete /private-providers/{slug}","href":"/api/api-reference/private-providers/delete-a-private-provider"},{"title":"Update a private provider","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml patch /private-providers/{slug}","href":"/api/api-reference/private-providers/update-a-private-provider"}]},{"group":"Providers","pages":[{"title":"List all providers","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /providers","href":"/api/api-reference/providers/list-all-providers"}]},{"group":"Rerank","pages":[{"title":"Submit a rerank request","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /rerank","href":"/api/api-reference/rerank/submit-a-rerank-request"}]},{"group":"Responses","pages":[{"title":"Create a response","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /responses","href":"/api/api-reference/responses/create-a-response"}]},{"group":"SCIM","pages":[{"title":"List SCIM group mappings","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /scim/group-mappings","href":"/api/api-reference/scim/list-scim-group-mappings"},{"title":"Create a SCIM group mapping","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /scim/group-mappings","href":"/api/api-reference/scim/create-a-scim-group-mapping"},{"title":"Get a SCIM group mapping","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /scim/group-mappings/{id}","href":"/api/api-reference/scim/get-a-scim-group-mapping"},{"title":"Delete a SCIM group mapping","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml delete /scim/group-mappings/{id}","href":"/api/api-reference/scim/delete-a-scim-group-mapping"},{"title":"Update a SCIM group mapping","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml patch /scim/group-mappings/{id}","href":"/api/api-reference/scim/update-a-scim-group-mapping"},{"title":"List SCIM groups","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /scim/groups","href":"/api/api-reference/scim/list-scim-groups"},{"title":"Start a SCIM directory sync","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /scim/sync-jobs","href":"/api/api-reference/scim/start-a-scim-directory-sync"},{"title":"Get SCIM directory sync status","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /scim/sync-jobs/{id}","href":"/api/api-reference/scim/get-scim-directory-sync-status"}]},{"group":"SystemOne","pages":[{"title":"Submit a System One request","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /systemone","href":"/api/api-reference/systemone/submit-a-system-one-request"}]},{"group":"Tools","pages":[{"title":"List server tools","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /tools","href":"/api/api-reference/tools/list-server-tools"},{"title":"Get a server tool","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /tools/{name}","href":"/api/api-reference/tools/get-a-server-tool"}]},{"group":"Vault","pages":[{"title":"List the connections an intern can use","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /vault/interns/{internId}/connections","href":"/api/api-reference/vault/list-the-connections-an-intern-can-use"},{"title":"List the secrets an intern receives","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /vault/interns/{internId}/effective-secrets","href":"/api/api-reference/vault/list-the-secrets-an-intern-receives"},{"title":"List intern secrets","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /vault/interns/{internId}/secrets","href":"/api/api-reference/vault/list-intern-secrets"},{"title":"Store an intern secret","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml put /vault/interns/{internId}/secrets/{name}","href":"/api/api-reference/vault/store-an-intern-secret"},{"title":"Delete an intern secret","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml delete /vault/interns/{internId}/secrets/{name}","href":"/api/api-reference/vault/delete-an-intern-secret"},{"title":"Copy workspace secrets to an intern","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /vault/interns/{internId}/secrets/copy","href":"/api/api-reference/vault/copy-workspace-secrets-to-an-intern"},{"title":"List workspace secrets","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /vault/secrets","href":"/api/api-reference/vault/list-workspace-secrets"},{"title":"Store a workspace secret","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml put /vault/secrets/{name}","href":"/api/api-reference/vault/store-a-workspace-secret"},{"title":"Delete a workspace secret","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml delete /vault/secrets/{name}","href":"/api/api-reference/vault/delete-a-workspace-secret"}]},{"group":"Video Generation","pages":[{"title":"Submit a video generation request","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /videos","href":"/api/api-reference/video-generation/submit-a-video-generation-request"},{"title":"Poll video generation status","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /videos/{jobId}","href":"/api/api-reference/video-generation/poll-video-generation-status"},{"title":"Download generated video content","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /videos/{jobId}/content","href":"/api/api-reference/video-generation/download-generated-video-content"},{"title":"List all video generation models","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /videos/models","href":"/api/api-reference/video-generation/list-all-video-generation-models"}]},{"group":"Workspaces","pages":[{"title":"List workspaces","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /workspaces","href":"/api/api-reference/workspaces/list-workspaces"},{"title":"Create a workspace","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /workspaces","href":"/api/api-reference/workspaces/create-a-workspace"},{"title":"Get a workspace","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /workspaces/{id}","href":"/api/api-reference/workspaces/get-a-workspace"},{"title":"Delete a workspace","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml delete /workspaces/{id}","href":"/api/api-reference/workspaces/delete-a-workspace"},{"title":"Update a workspace","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml patch /workspaces/{id}","href":"/api/api-reference/workspaces/update-a-workspace"},{"title":"List workspace members","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /workspaces/{id}/members","href":"/api/api-reference/workspaces/list-workspace-members"},{"title":"Bulk add members to a workspace","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /workspaces/{id}/members/add","href":"/api/api-reference/workspaces/bulk-add-members-to-a-workspace"},{"title":"Bulk remove members from a workspace","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml post /workspaces/{id}/members/remove","href":"/api/api-reference/workspaces/bulk-remove-members-from-a-workspace"},{"title":"List workspace budgets","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /workspaces/{workspace_ref}/budgets","href":"/api/api-reference/workspaces/list-workspace-budgets"},{"title":"Get a workspace budget","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml get /workspaces/{workspace_ref}/budgets/{interval}","href":"/api/api-reference/workspaces/get-a-workspace-budget"},{"title":"Create or update a workspace budget","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml put /workspaces/{workspace_ref}/budgets/{interval}","href":"/api/api-reference/workspaces/create-or-update-a-workspace-budget"},{"title":"Delete a workspace budget","deprecated":null,"version":null,"openapi":"/openapi/openapi.yaml delete /workspaces/{workspace_ref}/budgets/{interval}","href":"/api/api-reference/workspaces/delete-a-workspace-budget"}]}]}]},{"tab":"Client SDKs","icon":"cube","pages":[{"title":"Client SDKs","href":"/client-sdks/overview"}]},{"tab":"Agent SDK","icon":"cube","pages":[{"title":"Agent SDK","href":"/agent-sdk/overview"}]},{"tab":"Cookbook","icon":"book-open","pages":[{"title":"Cookbook","href":"/cookbook/get-started/quickstart"}]}]},"basePath":"","title":"Create a BYOK provider credential - OpenRouter | Documentation","buildId":"dpl_DQCMP4mismmBj3AFK7YZqNhrtLNq","deploymentId":"dpl_DQCMP4mismmBj3AFK7YZqNhrtLNq","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Dub5uFbX.js","utils-BAOmmv1r.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-Cfvfuq3w.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Chp3aFWD.js","snippetPresets-mdHEOVGp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-BRlO2pcM.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CrgNI3V9.js","shallow-Dl286uHn.js","getApiPlaygroundDisplay-YPKheyKd.js","CodeSnippet-BdD-lURy.js","CodeSnippets-BSggiSf7.js","Page-DZmn3mFl.js","getPastedJson-bQHv51S7.js","icon-SCSCTtsH.js","MethodPill-GnU2wo5s.js","DuplicateIcon-BM7jzGa_.js","createIcon-atdRs-Wh.js","DynamicMarkdown-B95U9rYS.js","SectionHeading-CvCxtB39.js","axios-vUo_bRtp.js","Markdown-CBJtw_nx.js","clsx-C_advUgl.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-Dpla8_R7.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BoWSGi0C.js"]}