Call OpenRouter over HTTP with the key provisioned by InsForge, plus reference the legacy Model Gateway proxy endpoints for chat, images, and embeddings.
Overview
New AI integrations should call OpenRouter directly with the OpenRouter key provisioned by InsForge. The InsForge AI proxy routes for chat, image generation, and embeddings are deprecated compatibility endpoints.Use the dashboard to copy the active OpenRouter key into a server-only OPENROUTER_API_KEY environment variable.
OpenRouter owns the current request and response shape for AI model calls. Check OpenRouter’s API docs for model-specific parameters, supported modalities, plugins, and video generation endpoints.
InsForge Admin Helper Endpoints
These endpoints help the dashboard display the active Model Gateway key, model catalog, and usage overview. They require admin authentication.Use either an admin JWT bearer token or an InsForge API key bearer token in the Authorization header.
GET /api/ai/models now returns a flat array of model objects. Older AI proxy docs described a categorized object such as { "text": [...], "image": [...] }; update existing callers that read category properties to filter by inputModality or outputModality instead.
Returns the normalized OpenRouter model catalog as an array:
apiKey is a raw secret. Do not log it, commit it, store it in browser storage, or return it from public endpoints. Only maskedKey is safe to display in client UI.
Returns key-level OpenRouter usage and activity time series when the active key has activity access.
Deprecated InsForge Proxy Routes
The following routes still exist for existing applications, but new code should use OpenRouter directly.
Method
Endpoint
Replacement
POST
/api/ai/chat/completion
POST https://openrouter.ai/api/v1/chat/completions
POST
/api/ai/image/generation
OpenRouter chat completions with image output or OpenRouter image-capable model docs
POST
/api/ai/embeddings
POST https://openrouter.ai/api/v1/embeddings
Legacy Chat Proxy
POST /api/ai/chat/completion
This route validates an InsForge-shaped request, forwards it to OpenRouter, and returns an InsForge-shaped response. It does not expose the complete OpenRouter API surface.
Legacy Image Proxy
POST /api/ai/image/generation
This route forwards an InsForge-shaped image request to OpenRouter chat completions with image output. It is retained for compatibility only.
Legacy Embeddings Proxy
POST /api/ai/embeddings
This route forwards an InsForge-shaped embeddings request to OpenRouter. Prefer the direct OpenRouter embeddings endpoint for new code.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"InsForge Docs","colors":{"primary":"#07C983","light":"#4ADE80","dark":"#059669"},"logo":{"light":"https://mintcdn.com/insforge-468ccf39/zmUpobGBlFjbnmEB/logo/light.svg?fit=max\u0026auto=format\u0026n=zmUpobGBlFjbnmEB\u0026q=85\u0026s=209341b17ebf95d46e1ef58da387ebbe","dark":"https://mintcdn.com/insforge-468ccf39/214YR-PipW-bJ_2V/logo/dark.svg?fit=max\u0026auto=format\u0026n=214YR-PipW-bJ_2V\u0026q=85\u0026s=ec73d468316a98fadf0d6ac731de3040","href":"https://insforge.dev"},"favicon":"https://mintcdn.com/insforge-468ccf39/UjZmtHgw_AnKpRxW/favicon.png?fit=max\u0026auto=format\u0026n=UjZmtHgw_AnKpRxW\u0026q=85\u0026s=2e75e48a731a89fac5878538e29d4df6","appearance":{"default":"dark"},"navbar":{"primary":{"type":"button","label":"Get Started","href":"https://insforge.dev/auth/sign-up"}},"footer":{"socials":{"x":"https://x.com/InsForge_dev","github":"https://github.com/InsForge/InsForge","linkedin":"https://linkedin.com/company/insforge"}},"search":{"prompt":"Search InsForge docs..."},"seo":{"metatags":{"og:site_name":"InsForge Docs","google-site-verification":"2dSsr0kxw61j9-qSOR0a1dq1PT6U1-2o3kiZMdsIf9g"},"indexing":"navigable"},"styling":{"eyebrows":"section","latex":true},"integrations":{"posthog":{"apiKey":"phc_ueV1ii62wdBTkH7E70ugyeqHIHu8dFDdjs0qq3TZhJz","sessionRecording":false}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"navigation":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/MPxwj5xVvW"},{"anchor":"Blog","icon":"newspaper","href":"https://insforge.dev/blog"},{"anchor":"Roadmap","icon":"route","href":"https://feedback.insforge.dev/roadmap"},{"anchor":"GitHub","icon":"github","href":"https://github.com/InsForge/InsForge"}]},"languages":[{"language":"en","default":true,"href":"introduction"},{"language":"zh","href":"zh/introduction"},{"language":"zh-Hant","href":"zh-Hant/introduction"},{"language":"es","href":"es/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"insforge-468ccf39","hasAudioNarration":false,"actualSubdomain":"insforge-468ccf39","customDomains":["docs.insforge.dev"],"gitSource":{"type":"github","owner":"insforge","repo":"insforge","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"agentFeedback":true,"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":"6adc3a7c05cea914c55c3b64","clientVersion":"0.0.4138","searchFilterCounts":[{"language":"default","tag":"API Reference","count":213},{"language":"default","tag":"Admin","count":95},{"language":"default","tag":"Authentication","count":49},{"language":"default","tag":"Client","count":47},{"language":"default","tag":"Payments","count":47},{"language":"en","tag":"Docs","count":44},{"language":"es","tag":"Documentación","count":43},{"language":"zh-Hant","tag":"文件","count":43},{"language":"zh","tag":"文档","count":43},{"language":"en","tag":"SDK \u0026 Examples","count":38},{"language":"es","tag":"SDK y ejemplos","count":38},{"language":"zh-Hant","tag":"SDK 與範例","count":38},{"language":"zh","tag":"SDK 与示例","count":38},{"language":"default","tag":"Storage","count":25},{"language":"default","tag":"Stripe Payments","count":23},{"language":"default","tag":"Razorpay Payments","count":22},{"language":"en","tag":"Products","count":20},{"language":"es","tag":"Products","count":20},{"language":"zh-Hant","tag":"Products","count":20},{"language":"zh","tag":"Products","count":20},{"language":"default","tag":"Deployments","count":18},{"language":"en","tag":"TypeScript","count":16},{"language":"es","tag":"TypeScript","count":16},{"language":"zh-Hant","tag":"TypeScript","count":16},{"language":"zh","tag":"TypeScript","count":16},{"language":"default","tag":"Realtime","count":11},{"language":"en","tag":"Self-Hosting","count":8},{"language":"en","tag":"Kotlin","count":7},{"language":"en","tag":"REST API","count":7},{"language":"en","tag":"Swift","count":7},{"language":"es","tag":"Self-Hosting","count":7},{"language":"es","tag":"Kotlin","count":7},{"language":"es","tag":"REST API","count":7},{"language":"es","tag":"Swift","count":7},{"language":"zh-Hant","tag":"Self-Hosting","count":7},{"language":"zh-Hant","tag":"Kotlin","count":7},{"language":"zh-Hant","tag":"REST API","count":7},{"language":"zh-Hant","tag":"Swift","count":7},{"language":"zh","tag":"Self-Hosting","count":7},{"language":"zh","tag":"Kotlin","count":7},{"language":"zh","tag":"REST API","count":7},{"language":"zh","tag":"Swift","count":7},{"language":"en","tag":"Agent-Native Initiatives","count":6},{"language":"en","tag":"Payments","count":6},{"language":"es","tag":"Agent-Native Initiatives","count":6},{"language":"es","tag":"Pagos","count":6},{"language":"zh-Hant","tag":"Agent-Native Initiatives","count":6},{"language":"zh-Hant","tag":"金流","count":6},{"language":"zh","tag":"Agent-Native Initiatives","count":6},{"language":"zh","tag":"支付","count":6}]},"assistantConfig":{"enableStarterQuestions":false,"deflection":{"enabled":true,"email":"support@insforge.dev","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"sdks/rest/ai","slug":"/sdks/rest/ai","pageMetadata":{"title":"AI REST Reference","description":"Call OpenRouter over HTTP with the key provisioned by InsForge, plus reference the legacy Model Gateway proxy endpoints for chat, images, and embeddings.","href":"/sdks/rest/ai"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Call OpenRouter over HTTP with the key provisioned by InsForge, plus reference the legacy Model Gateway proxy endpoints for chat, images, and embeddings.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`New AI integrations should call OpenRouter directly with the OpenRouter key provisioned by InsForge. The InsForge AI proxy routes for chat, image generation, and embeddings are deprecated compatibility endpoints.`}),`\n`,_jsxs(_components.p,{children:[`Use the dashboard to copy the active OpenRouter key into a server-only `,_jsx(_components.code,{children:`OPENROUTER_API_KEY`}),` environment variable.`]}),`\n`,_jsx(Heading,{level:`2`,id:`direct-openrouter-rest`,children:`Direct OpenRouter REST`}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Bearer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $OPENROUTER_API_KEY`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`Content-Type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` application/json`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`chat-completion`,children:`Chat Completion`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://openrouter.ai/api/v1/chat/completions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$OPENROUTER_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"openai/gpt-4o\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"role\": \"user\", \"content\": \"What is the capital of France?\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`streaming`,children:`Streaming`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://openrouter.ai/api/v1/chat/completions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$OPENROUTER_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"anthropic/claude-3.5-haiku\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"stream\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"role\": \"user\", \"content\": \"Write a short product update.\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`embeddings`,children:`Embeddings`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://openrouter.ai/api/v1/embeddings`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$OPENROUTER_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"openai/text-embedding-3-small\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"input\": \"Hello world\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`models`,children:`Models`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://openrouter.ai/api/v1/models?output_modalities=all\"`})]}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`OpenRouter owns the current request and response shape for AI model calls. Check OpenRouter’s API docs for model-specific parameters, supported modalities, plugins, and video generation endpoints.`})}),`\n`,_jsx(Heading,{level:`2`,id:`insforge-admin-helper-endpoints`,children:`InsForge Admin Helper Endpoints`}),`\n`,_jsx(_components.p,{children:`These endpoints help the dashboard display the active Model Gateway key, model catalog, and usage overview. They require admin authentication.`}),`\n`,_jsxs(_components.p,{children:[`Use either an admin JWT bearer token or an InsForge API key bearer token in the `,_jsx(_components.code,{children:`Authorization`}),` header.`]}),`\n`,_jsx(Heading,{level:`3`,id:`get-available-models`,children:`Get Available Models`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`GET /api/ai/models`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://your-app.insforge.app/api/ai/models\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer \u003cADMIN_JWT_TOKEN>\"`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://your-app.insforge.app/api/ai/models\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer \u003cINSFORGE_API_KEY>\"`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`GET /api/ai/models`}),` now returns a flat array of model objects. Older AI proxy docs described a categorized object such as `,_jsx(_components.code,{children:`{ \"text\": [...], \"image\": [...] }`}),`; update existing callers that read category properties to filter by `,_jsx(_components.code,{children:`inputModality`}),` or `,_jsx(_components.code,{children:`outputModality`}),` instead.`]})}),`\n`,_jsx(_components.p,{children:`Returns the normalized OpenRouter model catalog as an array:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"openai/gpt-4o\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"modelId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"openai/gpt-4o\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"provider\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"openrouter\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"inputModality\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"outputModality\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"inputPrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2.5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"outputPrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"inputPriceLabel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$2.50 / 1M tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"outputPriceLabel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$10.00 / 1M tokens\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`get-active-openrouter-key`,children:`Get Active OpenRouter Key`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`GET /api/ai/openrouter/api-key`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://your-app.insforge.app/api/ai/openrouter/api-key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer \u003cADMIN_JWT_TOKEN>\"`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://your-app.insforge.app/api/ai/openrouter/api-key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer \u003cINSFORGE_API_KEY>\"`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apiKey\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sk-or-...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maskedKey\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sk-or-abcd••••••••1234\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`apiKey`}),` is a raw secret. Do not log it, commit it, store it in browser storage, or return it from public endpoints. Only `,_jsx(_components.code,{children:`maskedKey`}),` is safe to display in client UI.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`get-usage-overview`,children:`Get Usage Overview`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`GET /api/ai/overview`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://your-app.insforge.app/api/ai/overview\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer \u003cADMIN_JWT_TOKEN>\"`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://your-app.insforge.app/api/ai/overview\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer \u003cINSFORGE_API_KEY>\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Returns key-level OpenRouter usage and activity time series when the active key has activity access.`}),`\n`,_jsx(Heading,{level:`2`,id:`deprecated-insforge-proxy-routes`,children:`Deprecated InsForge Proxy Routes`}),`\n`,_jsx(_components.p,{children:`The following routes still exist for existing applications, but new code should use OpenRouter directly.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Method`}),_jsx(_components.th,{children:`Endpoint`}),_jsx(_components.th,{children:`Replacement`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`POST`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/api/ai/chat/completion`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`POST https://openrouter.ai/api/v1/chat/completions`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`POST`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/api/ai/image/generation`})}),_jsx(_components.td,{children:`OpenRouter chat completions with image output or OpenRouter image-capable model docs`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`POST`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/api/ai/embeddings`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`POST https://openrouter.ai/api/v1/embeddings`})})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`legacy-chat-proxy`,children:`Legacy Chat Proxy`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST /api/ai/chat/completion`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`This route validates an InsForge-shaped request, forwards it to OpenRouter, and returns an InsForge-shaped response. It does not expose the complete OpenRouter API surface.`}),`\n`,_jsx(Heading,{level:`3`,id:`legacy-image-proxy`,children:`Legacy Image Proxy`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST /api/ai/image/generation`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`This route forwards an InsForge-shaped image request to OpenRouter chat completions with image output. It is retained for compatibility only.`}),`\n`,_jsx(Heading,{level:`3`,id:`legacy-embeddings-proxy`,children:`Legacy Embeddings Proxy`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST /api/ai/embeddings`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`This route forwards an InsForge-shaped embeddings request to OpenRouter. Prefer the direct OpenRouter embeddings endpoint for new code.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"AI REST Reference","description":"Call OpenRouter over HTTP with the key provisioned by InsForge, plus reference the legacy Model Gateway proxy endpoints for chat, images, and embeddings.","href":"/sdks/rest/ai"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Direct OpenRouter REST","slug":"direct-openrouter-rest","depth":2,"children":[{"title":"Headers","slug":"headers","depth":3,"children":[]},{"title":"Chat Completion","slug":"chat-completion","depth":3,"children":[]},{"title":"Streaming","slug":"streaming","depth":3,"children":[]},{"title":"Embeddings","slug":"embeddings","depth":3,"children":[]},{"title":"Models","slug":"models","depth":3,"children":[]}]},{"title":"InsForge Admin Helper Endpoints","slug":"insforge-admin-helper-endpoints","depth":2,"children":[{"title":"Get Available Models","slug":"get-available-models","depth":3,"children":[]},{"title":"Get Active OpenRouter Key","slug":"get-active-openrouter-key","depth":3,"children":[]},{"title":"Get Usage Overview","slug":"get-usage-overview","depth":3,"children":[]}]},{"title":"Deprecated InsForge Proxy Routes","slug":"deprecated-insforge-proxy-routes","depth":2,"children":[{"title":"Legacy Chat Proxy","slug":"legacy-chat-proxy","depth":3,"children":[]},{"title":"Legacy Image Proxy","slug":"legacy-image-proxy","depth":3,"children":[]},{"title":"Legacy Embeddings Proxy","slug":"legacy-embeddings-proxy","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"insforge-468ccf39","siteName":"InsForge Docs","title":"AI REST Reference - InsForge Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/sdks/rest/ai","matchLevel":0},"zh":{"href":"/zh/sdks/rest/ai","matchLevel":1},"zh-Hant":{"href":"/zh-Hant/sdks/rest/ai","matchLevel":1},"es":{"href":"/es/sdks/rest/ai","matchLevel":1}}},"lastModified":"2026-08-04T08:34:52.269Z","originalFileLocation":"sdks/rest/ai.mdx","locale":"en"},"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=\"Call OpenRouter over HTTP with the key provisioned by InsForge, plus reference the legacy Model Gateway proxy endpoints for chat, images, and embeddings.\">\u003cmeta data-mint-head name=\"application-name\" content=\"InsForge Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/insforge-468ccf39/a9Cgld7YYxRWEtOm/_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/insforge-468ccf39/a9Cgld7YYxRWEtOm/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/insforge-468ccf39/a9Cgld7YYxRWEtOm/_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/insforge-468ccf39/a9Cgld7YYxRWEtOm/_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/insforge-468ccf39/a9Cgld7YYxRWEtOm/_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/insforge-468ccf39/a9Cgld7YYxRWEtOm/_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/insforge-468ccf39/a9Cgld7YYxRWEtOm/_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/insforge-468ccf39/a9Cgld7YYxRWEtOm/_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/insforge-468ccf39/a9Cgld7YYxRWEtOm/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"AI REST Reference - InsForge Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Call OpenRouter over HTTP with the key provisioned by InsForge, plus reference the legacy Model Gateway proxy endpoints for chat, images, and embeddings.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"InsForge Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.insforge.dev/sdks/rest/ai\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://insforge-468ccf39.mintlify.site/_mintlify/api/og/v2?division=REST+API\u0026amp;title=AI+REST+Reference\u0026amp;description=Call+OpenRouter+over+HTTP+with+the+key+provisioned+by+InsForge%2C+plus+reference+the+legacy+Model+Gateway+proxy+endpoints+for+chat%2C+images%2C+and+embeddings.\u0026amp;theme=6a0ea135cc082016d20c576e\u0026amp;signature=b72989b6e2a8c669cf824584b11654ac5b8e1d04059a6e19756b5cef9884aa14\">\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=\"AI REST Reference - InsForge Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Call OpenRouter over HTTP with the key provisioned by InsForge, plus reference the legacy Model Gateway proxy endpoints for chat, images, and embeddings.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://insforge-468ccf39.mintlify.site/_mintlify/api/og/v2?division=REST+API\u0026amp;title=AI+REST+Reference\u0026amp;description=Call+OpenRouter+over+HTTP+with+the+key+provisioned+by+InsForge%2C+plus+reference+the+legacy+Model+Gateway+proxy+endpoints+for+chat%2C+images%2C+and+embeddings.\u0026amp;theme=6a0ea135cc082016d20c576e\u0026amp;signature=b72989b6e2a8c669cf824584b11654ac5b8e1d04059a6e19756b5cef9884aa14\">\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/insforge-468ccf39/a9Cgld7YYxRWEtOm/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"InsForge Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#07C983\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"2dSsr0kxw61j9-qSOR0a1dq1PT6U1-2o3kiZMdsIf9g\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.insforge.dev/sdks/rest/ai\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sdks/rest/ai.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.insforge.dev/sdks/rest/ai\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.insforge.dev/zh/sdks/rest/ai\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hant\" href=\"https://docs.insforge.dev/zh-Hant/sdks/rest/ai\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.insforge.dev/es/sdks/rest/ai\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.insforge.dev/sdks/rest/ai\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.insforge.dev/#organization\",\"name\":\"InsForge Docs\",\"url\":\"https://docs.insforge.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/insforge-468ccf39/zmUpobGBlFjbnmEB/logo/light.svg?fit=max\u0026auto=format\u0026n=zmUpobGBlFjbnmEB\u0026q=85\u0026s=209341b17ebf95d46e1ef58da387ebbe\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.insforge.dev#website\",\"name\":\"InsForge Docs\",\"url\":\"https://docs.insforge.dev\",\"publisher\":{\"@id\":\"https://docs.insforge.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.insforge.dev/sdks/rest/ai#webpage\",\"url\":\"https://docs.insforge.dev/sdks/rest/ai\",\"name\":\"AI REST Reference\",\"description\":\"Call OpenRouter over HTTP with the key provisioned by InsForge, plus reference the legacy Model Gateway proxy endpoints for chat, images, and embeddings.\",\"dateModified\":\"2026-08-04T08:34:52.269Z\",\"isPartOf\":{\"@id\":\"https://docs.insforge.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.insforge.dev/sdks/rest/ai#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.insforge.dev/sdks/rest/ai#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"REST API\",\"item\":\"https://docs.insforge.dev/sdks/rest/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI REST Reference\",\"item\":\"https://docs.insforge.dev/sdks/rest/ai\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.insforge.dev/sdks/rest/ai#article\",\"headline\":\"AI REST Reference\",\"name\":\"AI REST Reference\",\"description\":\"Call OpenRouter over HTTP with the key provisioned by InsForge, plus reference the legacy Model Gateway proxy endpoints for chat, images, and embeddings.\",\"url\":\"https://docs.insforge.dev/sdks/rest/ai\",\"mainEntityOfPage\":{\"@id\":\"https://docs.insforge.dev/sdks/rest/ai#webpage\"},\"dateModified\":\"2026-08-04T08:34:52.269Z\",\"publisher\":{\"@id\":\"https://docs.insforge.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.insforge.dev#website\"}}]}\u003c/script>","agentPointerHref":"/sdks/rest/ai.md","siteName":"InsForge Docs","nav":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/MPxwj5xVvW"},{"anchor":"Blog","icon":"newspaper","href":"https://insforge.dev/blog"},{"anchor":"Roadmap","icon":"route","href":"https://feedback.insforge.dev/roadmap"},{"anchor":"GitHub","icon":"github","href":"https://github.com/InsForge/InsForge"}]},"languages":[{"language":"en","default":true,"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":"/introduction"}]},{"tab":"SDK \u0026 Examples","groups":[{"group":"TypeScript","icon":"js","pages":[{"title":"TypeScript and JavaScript SDK for InsForge","href":"/sdks/typescript/overview"},{"title":"Database SDK Reference","href":"/sdks/typescript/database"},{"title":"Authentication SDK Reference","href":"/sdks/typescript/auth"},{"title":"Storage SDK Reference","href":"/sdks/typescript/storage"},{"title":"Functions SDK Reference","href":"/sdks/typescript/functions"},{"title":"Model Gateway","href":"/sdks/typescript/ai"},{"title":"TypeScript realtime SDK reference","href":"/sdks/typescript/realtime"},{"title":"Email SDK Reference","href":"/sdks/typescript/email"},{"group":"Payments","pages":[{"title":"Payments","href":"/sdks/typescript/payments"},{"title":"Stripe Payments SDK","href":"/sdks/typescript/payments-stripe"},{"title":"Razorpay Payments SDK","href":"/sdks/typescript/payments-razorpay"}]},{"group":"Framework Guides","pages":[{"title":"Next.js","href":"/examples/framework-guides/nextjs"},{"title":"React","href":"/examples/framework-guides/react"},{"title":"Vue","href":"/examples/framework-guides/vue"},{"title":"Nuxt","href":"/examples/framework-guides/nuxt"},{"title":"Svelte","href":"/examples/framework-guides/svelte"}]}]},{"group":"Swift","icon":"swift","pages":[{"title":"Swift SDK for iOS, macOS, tvOS, watchOS","href":"/sdks/swift/overview"},{"title":"Database SDK Reference","href":"/sdks/swift/database"},{"title":"Swift authentication SDK reference","href":"/sdks/swift/auth"},{"title":"Storage SDK Reference","href":"/sdks/swift/storage"},{"title":"Functions SDK Reference","href":"/sdks/swift/functions"},{"title":"Model Gateway","href":"/sdks/swift/ai"},{"title":"Swift realtime SDK reference","href":"/sdks/swift/realtime"}]},{"group":"Kotlin","icon":"android","pages":[{"title":"Kotlin SDK for Android and Multiplatform","href":"/sdks/kotlin/overview"},{"title":"Kotlin database SDK reference","href":"/sdks/kotlin/database"},{"title":"Authentication SDK Reference","href":"/sdks/kotlin/auth"},{"title":"Storage SDK Reference","href":"/sdks/kotlin/storage"},{"title":"Functions SDK Reference","href":"/sdks/kotlin/functions"},{"title":"Model Gateway","href":"/sdks/kotlin/ai"},{"title":"Kotlin realtime SDK reference","href":"/sdks/kotlin/realtime"}]},{"group":"REST API","icon":"code","pages":[{"title":"InsForge REST API overview","href":"/sdks/rest/overview"},{"title":"Database API Reference","href":"/sdks/rest/database"},{"title":"Authentication API Reference","href":"/sdks/rest/auth"},{"title":"Storage API Reference","href":"/sdks/rest/storage"},{"title":"Functions API Reference","description":"Invoke and manage serverless edge functions over HTTP with the InsForge REST API, running on Deno Subhosting in the cloud or locally in Docker.","href":"/sdks/rest/functions"},{"title":"AI REST Reference","href":"/sdks/rest/ai"},{"title":"Realtime API Reference","description":"Manage InsForge realtime channels, inspect message history, tune retention, and publish or subscribe with the raw Socket.IO surface over the REST API.","href":"/sdks/rest/realtime"}]},{"group":"Examples","pages":[{"title":"InsForge cookbook and framework examples","href":"/examples/overview"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/admin/list-tables"}]}]},{"language":"zh","pages":[{"title":"zh","href":"/zh/sdks/rest/ai"}]},{"language":"zh-Hant","pages":[{"title":"zh-Hant","href":"/zh-Hant/sdks/rest/ai"}]},{"language":"es","pages":[{"title":"es","href":"/es/sdks/rest/ai"}]}]},"basePath":"","title":"AI REST Reference - InsForge Docs","buildId":"dpl_715YoAgvjTGBDdo8RtXmHKM22b5p","deploymentId":"dpl_715YoAgvjTGBDdo8RtXmHKM22b5p","dynamics":[],"chunks":[]}