Call OpenRouter over HTTP with the key provisioned by InsForge, plus reference the legacy Model Gateway proxy endpoints for chat, images, and embeddings.
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.
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.
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.