{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Electron Hub API","colors":{"primary":"#8B5CF6","light":"#A855F7","dark":"#7C3AED"},"favicon":"https://mintcdn.com/electronhub/yFLLxumkQXKKJFGg/logo/electron.png?fit=max\u0026auto=format\u0026n=yFLLxumkQXKKJFGg\u0026q=85\u0026s=183ab7fb13d470a0655ab2426bf166f8","logo":{"light":"https://mintcdn.com/electronhub/GYN5h4bEUA-M-2dx/logo/electronhub-text.png?fit=max\u0026auto=format\u0026n=GYN5h4bEUA-M-2dx\u0026q=85\u0026s=84cb4ab70dde795f2feb23bbfa07a228","dark":"https://mintcdn.com/electronhub/GYN5h4bEUA-M-2dx/logo/electronhub-text.png?fit=max\u0026auto=format\u0026n=GYN5h4bEUA-M-2dx\u0026q=85\u0026s=84cb4ab70dde795f2feb23bbfa07a228"},"api":{"openapi":"api-reference/openapi.json","playground":{"display":"interactive"},"mdx":{"server":["https://api.electronhub.ai/v1"],"auth":{"method":"bearer","name":"Authorization"}}},"navbar":{"links":[{"label":"Playground","href":"https://app.electronhub.ai"},{"label":"Discord","href":"https://discord.com/invite/electronhub"}],"primary":{"type":"button","label":"Get API Key","href":"https://app.electronhub.ai"}},"footer":{"socials":{"discord":"https://discord.com/invite/electronhub","website":"https://electronhub.ai"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"electronhub","hasAudioNarration":false,"actualSubdomain":"electronhub","customDomains":["docs.electronhub.ai"],"gitSource":{"type":"github","owner":"snowby666","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6af0619199ffa6db6966e666","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"API Reference","count":57},{"language":"default","tag":"Router","count":30},{"language":"default","tag":"Billing","count":9},{"language":"default","tag":"Proxy Keys","count":8},{"language":"default","tag":"User","count":5},{"language":"default","tag":"Getting Started","count":5},{"language":"default","tag":"Guides","count":5},{"language":"default","tag":"Routing","count":5},{"language":"default","tag":"Examples","count":3},{"language":"default","tag":"Audio","count":2}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"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":"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":"editor-metadata","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},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/router/policies-import","slug":"/api-reference/router/policies-import","pageMetadata":{"title":"Import Policy","openapi":"POST /router/policies/{policy_id}/import","description":"Save an exported policy under `policy_id`. Returns the changes from the stored version in `diff`.","href":"/api-reference/router/policies-import"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Save an exported policy under \", _jsx(_components.code, {\n children: \"policy_id\"\n }), \". Returns the changes from the stored version in \", _jsx(_components.code, {\n children: \"diff\"\n }), \".\"]\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":"Import Policy","openapi":"POST /router/policies/{policy_id}/import","description":"Save an exported policy under `policy_id`. Returns the changes from the stored version in `diff`.","href":"/api-reference/router/policies-import"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Import policy","description":"Save an exported policy under `policy_id`. Returns the changes from the stored version in `diff`.","operationId":"importRouterPolicy","tags":["Router"],"responses":{"200":"e3df644b-cdb7-4fb9-aa49-301e4d697814","400":"485a95e5-e85e-4cfb-8d30-0cecdd8f0414","403":"35579688-76a6-4508-8ec9-c835baccb95f","409":"1274a7f5-8a07-4c1c-91a0-fa70ea52e6ca","429":"45fded9d-0985-4476-bda3-8f808f0e01af"},"parameters":["a53534c7-bb2b-499e-a64e-e5d701cd4a28","49b42683-02f8-4601-8578-b92624053f32"],"requestBody":"679bda9c-e01a-4e51-961f-6c9df1c5c3a4","method":"post","type":"path","servers":["f54d8da8-5466-4501-ad57-5d5223530b8a"],"security":["92b754c3-a81e-4874-aeae-29751f721b63"],"path":"/router/policies/{policy_id}/import","baseUrlOptions":["https://api.electronhub.ai/v1"],"title":"Import policy","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"a53534c7-bb2b-499e-a64e-e5d701cd4a28":{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,40}$","isRequired":true,"uniqueKey":"","typeLabel":"string"},"example":"work"},"49b42683-02f8-4601-8578-b92624053f32":{"name":"expected_version","in":"query","required":false,"schema":{"type":"integer","isRequired":false,"description":"Fail with 409 when the stored version differs. Can also be sent in the body.","uniqueKey":"","typeLabel":"integer"},"description":"Fail with 409 when the stored version differs. Can also be sent in the body."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Missing fields take defaults. See https://docs.electronhub.ai/routing/auto-router#policies","properties":{"policyId":{"type":"string","pattern":"^[a-z0-9-]{1,40}$","uniqueKey":"policyId","typeLabel":"string"},"name":{"type":"string","uniqueKey":"name","typeLabel":"string"},"schemaVersion":{"type":"integer","example":4,"uniqueKey":"schemaVersion","typeLabel":"integer"},"mode":{"type":"string","enum":["auto","custom"],"description":"`custom` evaluates `custom.rules` first.","uniqueKey":"mode","typeLabel":"enum\u003cstring>"},"auto":{"type":"object","properties":{"costTier":{"type":"string","enum":["low","medium","high","xhigh","max"],"default":"medium","uniqueKey":"auto.costTier","typeLabel":"enum\u003cstring>"},"qualityFloor":{"type":"number","minimum":0,"maximum":100,"description":"Minimum benchmark score (0 = off).","uniqueKey":"auto.qualityFloor","typeLabel":"number"},"preferFast":{"type":"boolean","description":"Prefer models with the fastest end-to-end response.","uniqueKey":"auto.preferFast","typeLabel":"boolean"},"preferVendor":{"oneOf":[{"type":"string","description":"Vendor to favour, e.g. `Anthropic`.","uniqueKey":"auto.preferVendor.oneOf.0","typeLabel":"string"},{"type":"null","description":"Vendor to favour, e.g. `Anthropic`.","uniqueKey":"auto.preferVendor.oneOf.1","typeLabel":"null"}],"uniqueKey":"auto.preferVendor","typeLabel":"string | null"},"preferStrength":{"type":"number","minimum":0,"maximum":0.2,"description":"How strongly to favour `preferVendor`.","uniqueKey":"auto.preferStrength","typeLabel":"number"},"maxTtft":{"type":"number","minimum":0,"description":"Maximum seconds to the first answer token (0 = off).","uniqueKey":"auto.maxTtft","typeLabel":"number"},"perCategory":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"auto.perCategory.additionalProperties","typeLabel":"string"},"description":"Fixed model per category, e.g. `{\"coding\": \"claude-sonnet-5-5\"}`.","uniqueKey":"auto.perCategory","typeLabel":"object"}},"uniqueKey":"auto","typeLabel":"object"},"custom":{"type":"object","properties":{"rules":{"type":"array","items":{"type":"object","uniqueKey":"custom.rules.items.[INDEX]","typeLabel":"object"},"description":"Ordered rules: `when` conditions on request signals, `then` actions.","uniqueKey":"custom.rules","typeLabel":"object[]"},"default":{"type":"array","items":{"type":"object","uniqueKey":"custom.default.items.[INDEX]","typeLabel":"object"},"description":"Actions when no rule matches. Default `[{\"action\": \"useAuto\"}]`.","uniqueKey":"custom.default","typeLabel":"object[]"}},"uniqueKey":"custom","typeLabel":"object"},"models":{"type":"object","properties":{"allowed":{"type":"array","items":{"type":"string","uniqueKey":"models.allowed.items.[INDEX]","typeLabel":"string"},"description":"Model patterns, e.g. `anthropic/*`.","uniqueKey":"models.allowed","typeLabel":"string[]"},"excluded":{"type":"array","items":{"type":"string","uniqueKey":"models.excluded.items.[INDEX]","typeLabel":"string"},"uniqueKey":"models.excluded","typeLabel":"string[]"},"strictAllowed":{"type":"boolean","description":"Fail with 404 when `allowed` matches nothing.","uniqueKey":"models.strictAllowed","typeLabel":"boolean"}},"uniqueKey":"models","typeLabel":"object"},"guardrails":{"type":"object","properties":{"maxCostPerReq":{"oneOf":[{"type":"number","description":"Estimated cost cap per request, in USD.","uniqueKey":"guardrails.maxCostPerReq.oneOf.0","typeLabel":"number"},{"type":"null","description":"Estimated cost cap per request, in USD.","uniqueKey":"guardrails.maxCostPerReq.oneOf.1","typeLabel":"null"}],"uniqueKey":"guardrails.maxCostPerReq","typeLabel":"number | null"},"blockOverCost":{"type":"boolean","description":"Block instead of downgrading when over `maxCostPerReq`.","uniqueKey":"guardrails.blockOverCost","typeLabel":"boolean"},"budgetUsd":{"oneOf":[{"type":"number","description":"Spend budget per window, in USD.","uniqueKey":"guardrails.budgetUsd.oneOf.0","typeLabel":"number"},{"type":"null","description":"Spend budget per window, in USD.","uniqueKey":"guardrails.budgetUsd.oneOf.1","typeLabel":"null"}],"uniqueKey":"guardrails.budgetUsd","typeLabel":"number | null"},"budgetWindow":{"type":"string","enum":["daily","weekly","monthly"],"description":"Windows start at 00:00 UTC.","uniqueKey":"guardrails.budgetWindow","typeLabel":"enum\u003cstring>"},"budgetScope":{"type":"string","enum":["routed","all"],"description":"Count Auto requests only, or all spend.","uniqueKey":"guardrails.budgetScope","typeLabel":"enum\u003cstring>"},"blockOverBudget":{"type":"boolean","description":"Block instead of using the cheapest model when the budget is spent.","uniqueKey":"guardrails.blockOverBudget","typeLabel":"boolean"},"pii":{"type":"object","description":"Privacy guard.","properties":{"enabled":{"type":"boolean","uniqueKey":"guardrails.pii.enabled","typeLabel":"boolean"},"action":{"type":"string","enum":["block","redact","route"],"uniqueKey":"guardrails.pii.action","typeLabel":"enum\u003cstring>"},"model":{"oneOf":[{"type":"string","description":"Model for `action: route`.","uniqueKey":"guardrails.pii.model.oneOf.0","typeLabel":"string"},{"type":"null","description":"Model for `action: route`.","uniqueKey":"guardrails.pii.model.oneOf.1","typeLabel":"null"}],"uniqueKey":"guardrails.pii.model","typeLabel":"string | null"},"entities":{"type":"object","additionalProperties":{"type":"boolean","uniqueKey":"guardrails.pii.entities.additionalProperties","typeLabel":"boolean"},"description":"Entity types to detect; empty means all except `name`.","uniqueKey":"guardrails.pii.entities","typeLabel":"object"},"scanAll":{"type":"boolean","description":"Scan every message, not only the latest.","uniqueKey":"guardrails.pii.scanAll","typeLabel":"boolean"}},"uniqueKey":"guardrails.pii","typeLabel":"object"}},"uniqueKey":"guardrails","typeLabel":"object"},"cache":{"type":"object","description":"Response cache for repeated requests.","properties":{"enabled":{"type":"boolean","uniqueKey":"cache.enabled","typeLabel":"boolean"},"ttlMin":{"type":"integer","minimum":1,"maximum":43200,"uniqueKey":"cache.ttlMin","typeLabel":"integer"},"maxEntries":{"type":"integer","minimum":1,"maximum":5000,"uniqueKey":"cache.maxEntries","typeLabel":"integer"},"semantic":{"type":"boolean","description":"Also match similar, not only identical, requests.","uniqueKey":"cache.semantic","typeLabel":"boolean"},"semanticThreshold":{"type":"number","minimum":0.8,"maximum":0.99,"uniqueKey":"cache.semanticThreshold","typeLabel":"number"}},"uniqueKey":"cache","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"policyId":"work","name":"Work","mode":"auto","auto":{"costTier":"high"},"models":{"excluded":["*:free"]},"guardrails":{"budgetUsd":5,"budgetWindow":"daily"}},"examples":{"Example":{"title":"Example","value":{"policyId":"work","name":"Work","mode":"auto","auto":{"costTier":"high"},"models":{"excluded":["*:free"]},"guardrails":{"budgetUsd":5,"budgetWindow":"daily"}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"e3df644b-cdb7-4fb9-aa49-301e4d697814":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","uniqueKey":"ok","typeLabel":"boolean"},"errors":{"type":"array","items":{"type":"string","uniqueKey":"errors.items.[INDEX]","typeLabel":"string"},"uniqueKey":"errors","typeLabel":"string[]"},"warnings":{"type":"array","items":{"type":"string","uniqueKey":"warnings.items.[INDEX]","typeLabel":"string"},"uniqueKey":"warnings","typeLabel":"string[]"},"policy":{"oneOf":[{"type":"object","description":"Missing fields take defaults. See https://docs.electronhub.ai/routing/auto-router#policies","properties":{"policyId":{"type":"string","pattern":"^[a-z0-9-]{1,40}$","uniqueKey":"policy.oneOf.0.policyId","typeLabel":"string"},"name":{"type":"string","uniqueKey":"policy.oneOf.0.name","typeLabel":"string"},"schemaVersion":{"type":"integer","example":4,"uniqueKey":"policy.oneOf.0.schemaVersion","typeLabel":"integer"},"mode":{"type":"string","enum":["auto","custom"],"description":"`custom` evaluates `custom.rules` first.","uniqueKey":"policy.oneOf.0.mode","typeLabel":"enum\u003cstring>"},"auto":{"type":"object","properties":{"costTier":{"type":"string","enum":["low","medium","high","xhigh","max"],"default":"medium","uniqueKey":"policy.oneOf.0.auto.costTier","typeLabel":"enum\u003cstring>"},"qualityFloor":{"type":"number","minimum":0,"maximum":100,"description":"Minimum benchmark score (0 = off).","uniqueKey":"policy.oneOf.0.auto.qualityFloor","typeLabel":"number"},"preferFast":{"type":"boolean","description":"Prefer models with the fastest end-to-end response.","uniqueKey":"policy.oneOf.0.auto.preferFast","typeLabel":"boolean"},"preferVendor":{"oneOf":[{"type":"string","description":"Vendor to favour, e.g. `Anthropic`.","uniqueKey":"policy.oneOf.0.auto.preferVendor.oneOf.0","typeLabel":"string"},{"type":"null","description":"Vendor to favour, e.g. `Anthropic`.","uniqueKey":"policy.oneOf.0.auto.preferVendor.oneOf.1","typeLabel":"null"}],"uniqueKey":"policy.oneOf.0.auto.preferVendor","typeLabel":"string | null"},"preferStrength":{"type":"number","minimum":0,"maximum":0.2,"description":"How strongly to favour `preferVendor`.","uniqueKey":"policy.oneOf.0.auto.preferStrength","typeLabel":"number"},"maxTtft":{"type":"number","minimum":0,"description":"Maximum seconds to the first answer token (0 = off).","uniqueKey":"policy.oneOf.0.auto.maxTtft","typeLabel":"number"},"perCategory":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"policy.oneOf.0.auto.perCategory.additionalProperties","typeLabel":"string"},"description":"Fixed model per category, e.g. `{\"coding\": \"claude-sonnet-5-5\"}`.","uniqueKey":"policy.oneOf.0.auto.perCategory","typeLabel":"object"}},"uniqueKey":"policy.oneOf.0.auto","typeLabel":"object"},"custom":{"type":"object","properties":{"rules":{"type":"array","items":{"type":"object","uniqueKey":"policy.oneOf.0.custom.rules.items.[INDEX]","typeLabel":"object"},"description":"Ordered rules: `when` conditions on request signals, `then` actions.","uniqueKey":"policy.oneOf.0.custom.rules","typeLabel":"object[]"},"default":{"type":"array","items":{"type":"object","uniqueKey":"policy.oneOf.0.custom.default.items.[INDEX]","typeLabel":"object"},"description":"Actions when no rule matches. Default `[{\"action\": \"useAuto\"}]`.","uniqueKey":"policy.oneOf.0.custom.default","typeLabel":"object[]"}},"uniqueKey":"policy.oneOf.0.custom","typeLabel":"object"},"models":{"type":"object","properties":{"allowed":{"type":"array","items":{"type":"string","uniqueKey":"policy.oneOf.0.models.allowed.items.[INDEX]","typeLabel":"string"},"description":"Model patterns, e.g. `anthropic/*`.","uniqueKey":"policy.oneOf.0.models.allowed","typeLabel":"string[]"},"excluded":{"type":"array","items":{"type":"string","uniqueKey":"policy.oneOf.0.models.excluded.items.[INDEX]","typeLabel":"string"},"uniqueKey":"policy.oneOf.0.models.excluded","typeLabel":"string[]"},"strictAllowed":{"type":"boolean","description":"Fail with 404 when `allowed` matches nothing.","uniqueKey":"policy.oneOf.0.models.strictAllowed","typeLabel":"boolean"}},"uniqueKey":"policy.oneOf.0.models","typeLabel":"object"},"guardrails":{"type":"object","properties":{"maxCostPerReq":{"oneOf":[{"type":"number","description":"Estimated cost cap per request, in USD.","uniqueKey":"policy.oneOf.0.guardrails.maxCostPerReq.oneOf.0","typeLabel":"number"},{"type":"null","description":"Estimated cost cap per request, in USD.","uniqueKey":"policy.oneOf.0.guardrails.maxCostPerReq.oneOf.1","typeLabel":"null"}],"uniqueKey":"policy.oneOf.0.guardrails.maxCostPerReq","typeLabel":"number | null"},"blockOverCost":{"type":"boolean","description":"Block instead of downgrading when over `maxCostPerReq`.","uniqueKey":"policy.oneOf.0.guardrails.blockOverCost","typeLabel":"boolean"},"budgetUsd":{"oneOf":[{"type":"number","description":"Spend budget per window, in USD.","uniqueKey":"policy.oneOf.0.guardrails.budgetUsd.oneOf.0","typeLabel":"number"},{"type":"null","description":"Spend budget per window, in USD.","uniqueKey":"policy.oneOf.0.guardrails.budgetUsd.oneOf.1","typeLabel":"null"}],"uniqueKey":"policy.oneOf.0.guardrails.budgetUsd","typeLabel":"number | null"},"budgetWindow":{"type":"string","enum":["daily","weekly","monthly"],"description":"Windows start at 00:00 UTC.","uniqueKey":"policy.oneOf.0.guardrails.budgetWindow","typeLabel":"enum\u003cstring>"},"budgetScope":{"type":"string","enum":["routed","all"],"description":"Count Auto requests only, or all spend.","uniqueKey":"policy.oneOf.0.guardrails.budgetScope","typeLabel":"enum\u003cstring>"},"blockOverBudget":{"type":"boolean","description":"Block instead of using the cheapest model when the budget is spent.","uniqueKey":"policy.oneOf.0.guardrails.blockOverBudget","typeLabel":"boolean"},"pii":{"type":"object","description":"Privacy guard.","properties":{"enabled":{"type":"boolean","uniqueKey":"policy.oneOf.0.guardrails.pii.enabled","typeLabel":"boolean"},"action":{"type":"string","enum":["block","redact","route"],"uniqueKey":"policy.oneOf.0.guardrails.pii.action","typeLabel":"enum\u003cstring>"},"model":{"oneOf":[{"type":"string","description":"Model for `action: route`.","uniqueKey":"policy.oneOf.0.guardrails.pii.model.oneOf.0","typeLabel":"string"},{"type":"null","description":"Model for `action: route`.","uniqueKey":"policy.oneOf.0.guardrails.pii.model.oneOf.1","typeLabel":"null"}],"uniqueKey":"policy.oneOf.0.guardrails.pii.model","typeLabel":"string | null"},"entities":{"type":"object","additionalProperties":{"type":"boolean","uniqueKey":"policy.oneOf.0.guardrails.pii.entities.additionalProperties","typeLabel":"boolean"},"description":"Entity types to detect; empty means all except `name`.","uniqueKey":"policy.oneOf.0.guardrails.pii.entities","typeLabel":"object"},"scanAll":{"type":"boolean","description":"Scan every message, not only the latest.","uniqueKey":"policy.oneOf.0.guardrails.pii.scanAll","typeLabel":"boolean"}},"uniqueKey":"policy.oneOf.0.guardrails.pii","typeLabel":"object"}},"uniqueKey":"policy.oneOf.0.guardrails","typeLabel":"object"},"cache":{"type":"object","description":"Response cache for repeated requests.","properties":{"enabled":{"type":"boolean","uniqueKey":"policy.oneOf.0.cache.enabled","typeLabel":"boolean"},"ttlMin":{"type":"integer","minimum":1,"maximum":43200,"uniqueKey":"policy.oneOf.0.cache.ttlMin","typeLabel":"integer"},"maxEntries":{"type":"integer","minimum":1,"maximum":5000,"uniqueKey":"policy.oneOf.0.cache.maxEntries","typeLabel":"integer"},"semantic":{"type":"boolean","description":"Also match similar, not only identical, requests.","uniqueKey":"policy.oneOf.0.cache.semantic","typeLabel":"boolean"},"semanticThreshold":{"type":"number","minimum":0.8,"maximum":0.99,"uniqueKey":"policy.oneOf.0.cache.semanticThreshold","typeLabel":"number"}},"uniqueKey":"policy.oneOf.0.cache","typeLabel":"object"}},"uniqueKey":"policy.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"policy.oneOf.1","typeLabel":"null"}],"uniqueKey":"policy","typeLabel":"object | null"},"migrated":{"type":"boolean","uniqueKey":"migrated","typeLabel":"boolean"},"diff":{"type":"array","items":{"type":"object","uniqueKey":"diff.items.[INDEX]","typeLabel":"object"},"uniqueKey":"diff","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"example":{"ok":true,"errors":[],"warnings":[],"policy":{"policyId":"imported","name":"Work","schemaVersion":4,"mode":"auto","auto":{"costTier":"high","qualityFloor":0,"preferFast":false,"preferVendor":null,"preferStrength":0,"maxTtft":0,"perCategory":{}},"custom":{"rules":[],"default":[{"action":"useAuto"}]},"models":{"allowed":[],"excluded":["*:free"],"strictAllowed":false},"guardrails":{"maxCostPerReq":null,"blockOverCost":false,"budgetUsd":5,"budgetWindow":"daily","budgetScope":"routed","blockOverBudget":false,"pii":{"enabled":false,"action":"block","model":null,"entities":{},"labels":{},"custom":[],"scanAll":false}},"cache":{"enabled":false,"ttlMin":1440,"maxEntries":100,"semantic":false,"semanticThreshold":0.9}},"migrated":false,"diff":[{"label":"Cost tier","from":"medium","to":"high"},{"label":"Excluded models","from":0,"to":1},{"label":"Budget","from":null,"to":5}],"version":1},"examples":{"Example":{"title":"Example","value":{"ok":true,"errors":[],"warnings":[],"policy":{"policyId":"imported","name":"Work","schemaVersion":4,"mode":"auto","auto":{"costTier":"high","qualityFloor":0,"preferFast":false,"preferVendor":null,"preferStrength":0,"maxTtft":0,"perCategory":{}},"custom":{"rules":[],"default":[{"action":"useAuto"}]},"models":{"allowed":[],"excluded":["*:free"],"strictAllowed":false},"guardrails":{"maxCostPerReq":null,"blockOverCost":false,"budgetUsd":5,"budgetWindow":"daily","budgetScope":"routed","blockOverBudget":false,"pii":{"enabled":false,"action":"block","model":null,"entities":{},"labels":{},"custom":[],"scanAll":false}},"cache":{"enabled":false,"ttlMin":1440,"maxEntries":100,"semantic":false,"semanticThreshold":0.9}},"migrated":false,"diff":[{"label":"Cost tier","from":"medium","to":"high"},{"label":"Excluded models","from":0,"to":1},{"label":"Budget","from":null,"to":5}],"version":1}}},"exampleType":"examples"}},"exampleType":"examples"},"485a95e5-e85e-4cfb-8d30-0cecdd8f0414":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","uniqueKey":"error.code","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Body must be an object.","type":"invalid_request_error","param":null,"code":400}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Body must be an object.","type":"invalid_request_error","param":null,"code":400}}}},"exampleType":"examples"}},"exampleType":"examples"},"35579688-76a6-4508-8ec9-c835baccb95f":{"description":"Proxy keys cannot manage Router settings","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","uniqueKey":"error.code","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Only master keys can manage Router settings.","type":"error","param":null,"code":403}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Only master keys can manage Router settings.","type":"error","param":null,"code":403}}}},"exampleType":"examples"}},"exampleType":"examples"},"1274a7f5-8a07-4c1c-91a0-fa70ea52e6ca":{"description":"Version conflict. `current` holds the stored document.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","uniqueKey":"error.code","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Version conflict","type":"router_conflict","param":null,"code":409},"current":{"policy":{"policyId":"work","name":"Work","schemaVersion":4,"mode":"auto","auto":{"costTier":"high","qualityFloor":0,"preferFast":false,"preferVendor":null,"preferStrength":0,"maxTtft":0,"perCategory":{}},"custom":{"rules":[],"default":[{"action":"useAuto"}]},"models":{"allowed":[],"excluded":["*:free"],"strictAllowed":false},"guardrails":{"maxCostPerReq":null,"blockOverCost":false,"budgetUsd":5,"budgetWindow":"daily","budgetScope":"routed","blockOverBudget":false,"pii":{"enabled":false,"action":"block","model":null,"entities":{},"labels":{},"custom":[],"scanAll":false}},"cache":{"enabled":false,"ttlMin":1440,"maxEntries":100,"semantic":false,"semanticThreshold":0.9}},"version":4,"updatedAt":"2026-11-08T07:34:14.937184Z","updatedBy":"client"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Version conflict","type":"router_conflict","param":null,"code":409},"current":{"policy":{"policyId":"work","name":"Work","schemaVersion":4,"mode":"auto","auto":{"costTier":"high","qualityFloor":0,"preferFast":false,"preferVendor":null,"preferStrength":0,"maxTtft":0,"perCategory":{}},"custom":{"rules":[],"default":[{"action":"useAuto"}]},"models":{"allowed":[],"excluded":["*:free"],"strictAllowed":false},"guardrails":{"maxCostPerReq":null,"blockOverCost":false,"budgetUsd":5,"budgetWindow":"daily","budgetScope":"routed","blockOverBudget":false,"pii":{"enabled":false,"action":"block","model":null,"entities":{},"labels":{},"custom":[],"scanAll":false}},"cache":{"enabled":false,"ttlMin":1440,"maxEntries":100,"semantic":false,"semanticThreshold":0.9}},"version":4,"updatedAt":"2026-11-08T07:34:14.937184Z","updatedBy":"client"}}}},"exampleType":"examples"}},"exampleType":"examples"},"45fded9d-0985-4476-bda3-8f808f0e01af":{"description":"More than 60 Router writes in a minute","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","uniqueKey":"error.code","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Too many Router changes. Retry in a minute.","type":"rate_limit_exceeded","param":null,"code":429}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Too many Router changes. Retry in a minute.","type":"rate_limit_exceeded","param":null,"code":429}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"92b754c3-a81e-4874-aeae-29751f721b63":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter your API key (starts with 'ek-')","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"f54d8da8-5466-4501-ad57-5d5223530b8a":{"url":"https://api.electronhub.ai/v1","description":"Production API v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter your API key (starts with 'ek-')","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Enter your API key (starts with 'ek-')","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"electronhub","siteName":"Electron Hub API","title":"Import Policy - Electron Hub API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-08T07:38:42.726Z","originalFileLocation":"api-reference/router/policies-import.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=\"system\"}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=\"Save an exported policy under policy_id. Returns the changes from the stored version in diff.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Electron Hub API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/electronhub/loIKWMWRhd1rlk7z/_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=\"/mintlify-assets/_mintlify/favicons/electronhub/loIKWMWRhd1rlk7z/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/electronhub/loIKWMWRhd1rlk7z/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/electronhub/loIKWMWRhd1rlk7z/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/electronhub/loIKWMWRhd1rlk7z/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/electronhub/loIKWMWRhd1rlk7z/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/electronhub/loIKWMWRhd1rlk7z/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/electronhub/loIKWMWRhd1rlk7z/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/electronhub/loIKWMWRhd1rlk7z/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Import Policy - Electron Hub API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Save an exported policy under policy_id. Returns the changes from the stored version in diff.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Electron Hub API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.electronhub.ai/api-reference/router/policies-import\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://electronhub.mintlify.site/_mintlify/api/og/v2?division=Router\u0026amp;title=Import+Policy\u0026amp;description=Save+an+exported+policy+under+%60policy_id%60.+Returns+the+changes+from+the+stored+version+in+%60diff%60.\u0026amp;theme=3184d595bdbed6241042467b\u0026amp;signature=161fc372688168aa5acdbfefb9f48fb0e7e18373bbb322adba1ce0e9af7be52c\">\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=\"Import Policy - Electron Hub API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Save an exported policy under policy_id. Returns the changes from the stored version in diff.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://electronhub.mintlify.site/_mintlify/api/og/v2?division=Router\u0026amp;title=Import+Policy\u0026amp;description=Save+an+exported+policy+under+%60policy_id%60.+Returns+the+changes+from+the+stored+version+in+%60diff%60.\u0026amp;theme=3184d595bdbed6241042467b\u0026amp;signature=161fc372688168aa5acdbfefb9f48fb0e7e18373bbb322adba1ce0e9af7be52c\">\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=\"/mintlify-assets/_mintlify/favicons/electronhub/loIKWMWRhd1rlk7z/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Electron Hub API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#8B5CF6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.electronhub.ai/api-reference/router/policies-import\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/router/policies-import.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.electronhub.ai/#organization\",\"name\":\"Electron Hub API\",\"url\":\"https://docs.electronhub.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/electronhub/GYN5h4bEUA-M-2dx/logo/electronhub-text.png?fit=max\u0026auto=format\u0026n=GYN5h4bEUA-M-2dx\u0026q=85\u0026s=84cb4ab70dde795f2feb23bbfa07a228\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.electronhub.ai#website\",\"name\":\"Electron Hub API\",\"url\":\"https://docs.electronhub.ai\",\"publisher\":{\"@id\":\"https://docs.electronhub.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.electronhub.ai/api-reference/router/policies-import#webpage\",\"url\":\"https://docs.electronhub.ai/api-reference/router/policies-import\",\"name\":\"Import Policy\",\"description\":\"Save an exported policy under policy_id. Returns the changes from the stored version in diff.\",\"dateModified\":\"2026-11-08T07:38:42.726Z\",\"isPartOf\":{\"@id\":\"https://docs.electronhub.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.electronhub.ai/api-reference/router/policies-import#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.electronhub.ai/api-reference/router/policies-import#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.electronhub.ai/api-reference/models\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Router\",\"item\":\"https://docs.electronhub.ai/api-reference/router/settings-get\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Import Policy\",\"item\":\"https://docs.electronhub.ai/api-reference/router/policies-import\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.electronhub.ai/api-reference/router/policies-import#apireference\",\"headline\":\"Import Policy\",\"name\":\"Import Policy\",\"description\":\"Save an exported policy under policy_id. Returns the changes from the stored version in diff.\",\"url\":\"https://docs.electronhub.ai/api-reference/router/policies-import\",\"mainEntityOfPage\":{\"@id\":\"https://docs.electronhub.ai/api-reference/router/policies-import#webpage\"},\"dateModified\":\"2026-11-08T07:38:42.726Z\",\"publisher\":{\"@id\":\"https://docs.electronhub.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.electronhub.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Electron Hub API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Electron Hub API","nav":{"global":null,"groups":[{"group":"Getting Started","pages":[{"title":"Introduction","icon":"flag","href":"/getting-started/introduction"},{"title":"Quickstart","icon":"bolt","href":"/getting-started/quickstart"},{"title":"Authentication","icon":"shield","href":"/getting-started/authentication"},{"title":"Rate Limits","icon":"gauge","href":"/getting-started/rate-limits"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/getting-started/errors"}],"icon":"rocket"},{"group":"Routing","pages":[{"title":"Routing Overview","icon":"route","href":"/routing/overview"},{"title":"Auto Router","icon":"wand-magic-sparkles","href":"/routing/auto-router"},{"title":"Provider Routing","icon":"server","href":"/routing/provider-routing"},{"title":"Model Variants","icon":"tags","href":"/routing/model-variants"},{"title":"Model Fallbacks","icon":"life-ring","href":"/routing/model-fallbacks"}],"icon":"route"},{"group":"API Reference","pages":[{"group":"Models","icon":"brain","pages":[{"title":"List Models","openapi":"GET /models","href":"/api-reference/models"},{"title":"List Model Providers","openapi":"GET /models/{model}/providers","href":"/api-reference/model-providers"}]},{"group":"Chat","icon":"message","pages":[{"title":"Chat Completions","openapi":"POST /chat/completions","href":"/api-reference/chat/completions"}]},{"title":"Messages API","openapi":"POST /messages","href":"/api-reference/messages"},{"title":"Responses API","openapi":"POST /responses","href":"/api-reference/responses"},{"group":"Images","icon":"image","pages":[{"title":"Image Generations","openapi":"POST /images/generations","href":"/api-reference/images/generations"},{"title":"Image Edits","openapi":"POST /images/edits","href":"/api-reference/images/edits"}]},{"group":"Videos","icon":"video","pages":[{"title":"Video Generations","openapi":"POST /videos/generations","href":"/api-reference/videos/generations"}]},{"group":"Audio","icon":"volume-high","pages":[{"title":"Text-to-Speech","openapi":"POST /audio/speech","href":"/api-reference/audio/speech"},{"title":"Speech-to-Text","openapi":"POST /audio/transcriptions","href":"/api-reference/audio/transcriptions"}]},{"title":"Moderations","openapi":"POST /moderations","href":"/api-reference/moderations"},{"title":"Decisions","openapi":"POST /systemone","href":"/api-reference/systemone"},{"title":"Embeddings","openapi":"POST /embeddings","href":"/api-reference/embeddings"},{"group":"Router","icon":"route","pages":[{"title":"Get Router Settings","openapi":"GET /router/settings","href":"/api-reference/router/settings-get"},{"title":"Update Router Settings","openapi":"PATCH /router/settings","href":"/api-reference/router/settings-update"},{"title":"List Policies","openapi":"GET /router/policies","href":"/api-reference/router/policies-list"},{"title":"Create Policy","openapi":"POST /router/policies","href":"/api-reference/router/policies-create"},{"title":"Get Policy","openapi":"GET /router/policies/{policy_id}","href":"/api-reference/router/policies-get"},{"title":"Replace Policy","openapi":"PUT /router/policies/{policy_id}","href":"/api-reference/router/policies-replace"},{"title":"Update Policy","openapi":"PATCH /router/policies/{policy_id}","href":"/api-reference/router/policies-update"},{"title":"Delete Policy","openapi":"DELETE /router/policies/{policy_id}","href":"/api-reference/router/policies-delete"},{"title":"Validate Policy","openapi":"POST /router/policies/validate","href":"/api-reference/router/policies-validate"},{"title":"Export Policy","openapi":"GET /router/policies/{policy_id}/export","description":"A portable copy of the policy for backup or sharing. Import it with the import endpoint.","href":"/api-reference/router/policies-export"},{"title":"Import Policy","openapi":"POST /router/policies/{policy_id}/import","href":"/api-reference/router/policies-import"},{"title":"Policy History","openapi":"GET /router/policies/{policy_id}/history","description":"Previous versions of a policy, newest first (up to 20).","href":"/api-reference/router/policies-history"},{"title":"Restore Policy Version","openapi":"POST /router/policies/{policy_id}/restore","href":"/api-reference/router/policies-restore"},{"title":"List Pins","openapi":"GET /router/pins","href":"/api-reference/router/pins-list"},{"title":"Get Pin","openapi":"GET /router/pins/{session_key}","href":"/api-reference/router/pins-get"},{"title":"Pin Session","openapi":"PUT /router/pins/{session_key}","href":"/api-reference/router/pins-set"},{"title":"Delete Pin","openapi":"DELETE /router/pins/{session_key}","href":"/api-reference/router/pins-delete"},{"title":"Delete All Pins","openapi":"DELETE /router/pins","href":"/api-reference/router/pins-clear"},{"title":"Model Ranking","openapi":"GET /router/catalog/ranking","href":"/api-reference/router/ranking"},{"title":"List Decisions","openapi":"GET /router/decisions","href":"/api-reference/router/decisions-list"},{"title":"Decisions Summary","openapi":"GET /router/decisions/summary","href":"/api-reference/router/decisions-summary"},{"title":"Delete Decisions","openapi":"DELETE /router/decisions","href":"/api-reference/router/decisions-clear"},{"title":"Get Spend","openapi":"GET /router/spend","href":"/api-reference/router/spend-get"},{"title":"Reset Spend","openapi":"POST /router/spend/reset","href":"/api-reference/router/spend-reset"},{"title":"Cache Stats","openapi":"GET /router/cache/stats","href":"/api-reference/router/cache-stats"},{"title":"List Cache Entries","openapi":"GET /router/cache","href":"/api-reference/router/cache-list"},{"title":"Clear Cache","openapi":"DELETE /router/cache","href":"/api-reference/router/cache-clear"},{"title":"Delete Cache Entry","openapi":"DELETE /router/cache/{key}","href":"/api-reference/router/cache-delete"},{"title":"Routing Usage","openapi":"GET /router/stats/usage","href":"/api-reference/router/stats-usage"},{"title":"Routing Mix","openapi":"GET /router/stats/mix","href":"/api-reference/router/stats-mix"}]},{"group":"User","icon":"user","pages":[{"title":"Get Usage","openapi":"GET /user/me","href":"/api-reference/usage"},{"title":"Get Model Breakdown","openapi":"GET /user/models","href":"/api-reference/user-models"},{"title":"Get User Logs","openapi":"GET /user/logs","href":"/api-reference/user-logs"},{"title":"Get Provider Settings","openapi":"GET /users/settings/routing","href":"/api-reference/provider-settings-get"},{"title":"Update Provider Settings","openapi":"PATCH /users/settings/routing","href":"/api-reference/provider-settings-update"}]},{"group":"Proxy Keys","icon":"key","pages":[{"title":"List Proxy Keys","api":"GET https://api.electronhub.ai/v1/auth/proxy","openapi":"GET /auth/proxy","href":"/api-reference/proxy-keys"},{"title":"Lookup Proxy Key","api":"POST https://api.electronhub.ai/v1/auth/proxy/lookup","openapi":"POST /auth/proxy/lookup","href":"/api-reference/proxy-lookup"},{"title":"Create Proxy Key","api":"POST https://api.electronhub.ai/v1/auth/proxy/create","openapi":"POST /auth/proxy/create","href":"/api-reference/proxy-create"},{"title":"Update Proxy Key","api":"POST https://api.electronhub.ai/v1/auth/proxy/update","openapi":"POST /auth/proxy/update","href":"/api-reference/proxy-update"},{"title":"Toggle Proxy Key Status","api":"POST https://api.electronhub.ai/v1/auth/proxy/toggle","openapi":"POST /auth/proxy/toggle","href":"/api-reference/proxy-toggle"},{"title":"Delete Proxy Key","api":"POST https://api.electronhub.ai/v1/auth/proxy/remove","openapi":"POST /auth/proxy/remove","href":"/api-reference/proxy-delete"},{"title":"Delete All Proxy Keys","api":"DELETE https://api.electronhub.ai/v1/auth/proxy/delete","openapi":"DELETE /auth/proxy/delete","href":"/api-reference/proxy-delete-all"},{"title":"Validate Proxy Key Access","api":"POST https://api.electronhub.ai/v1/auth/proxy/validate","openapi":"POST /auth/proxy/validate","href":"/api-reference/proxy-validate"}]},{"title":"Regenerate API Key","api":"GET https://api.electronhub.ai/v1/auth/key/regen","openapi":"GET /auth/key/regen","href":"/api-reference/regenerate-key"}],"icon":"code"},{"group":"Guides","pages":[{"title":"Best Practices","icon":"star","href":"/guides/best-practices"},{"title":"OpenAI SDKs","icon":"code","href":"/guides/openai-sdks"},{"title":"Anthropic SDKs","icon":"robot","href":"/guides/anthropic-sdks"},{"title":"Prompt Caching","icon":"zap","href":"/guides/prompt-caching"},{"title":"In-chat Image Generation","icon":"image","href":"/guides/in-chat-image-generation"}],"icon":"book-open"},{"group":"Examples","pages":[{"title":"Chat Examples","icon":"message","href":"/examples/chat-examples"},{"title":"Image Examples","icon":"image","href":"/examples/image-examples"},{"title":"Embedding Examples","icon":"vector-square","href":"/examples/embedding-examples"}],"icon":"play"},{"group":"Billing","pages":[{"title":"Billing \u0026 Credits Overview","icon":"grid","href":"/billing/overview"},{"title":"Subscriptions","icon":"repeat","href":"/billing/subscriptions"},{"title":"Coding Plan (DevPass)","icon":"terminal","href":"/billing/coding-plan"},{"title":"Pay-as-You-Go","icon":"wallet","href":"/billing/pay-as-you-go"},{"title":"Understanding Credits","icon":"coins","href":"/billing/credits"},{"title":"Model Types \u0026 Access","icon":"brain","href":"/billing/model-access"},{"title":"Advanced Billing Topics","icon":"sliders","href":"/billing/advanced"},{"title":"Billing Troubleshooting","icon":"wrench","href":"/billing/troubleshooting"},{"title":"Privacy \u0026 Security","icon":"shield-check","href":"/billing/privacy-security"}],"icon":"credit-card"}]},"basePath":"","title":"Import Policy - Electron Hub API","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CBsVopKK.js","utils-DZAk68jJ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D32AYZrP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D_A5_cny.js","snippetPresets-xNRfS9th.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BIB25-tq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CydJ4w4j.js","shallow-CYPBeQSG.js","getApiPlaygroundDisplay-A5xJVBOu.js","CodeSnippet-BVRTgi3m.js","CodeSnippets-DjD6BSlt.js","Page-Dr40SSJq.js","getPastedJson-D4V4JyrR.js","icon-uhcnG22T.js","MethodPill-CM-ZQdGH.js","DuplicateIcon-B_WnOiNf.js","createIcon-CJsb8utt.js","DynamicMarkdown-D-2HDKEp.js","SectionHeading-KP5xmMgQ.js","axios-vUo_bRtp.js","Markdown-D_k0dg6k.js","clsx-DK3K4Z1S.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DE3EVdvd.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-fN9H9n9g.js"]}