Overview
InsForge provisions an OpenRouter API key for Model Gateway projects. New Kotlin applications should call OpenRouter from trusted server-side code, a backend API, or another secure boundary. Do not embed the OpenRouter key in Android or desktop client binaries. The previous InsForge Kotlin AI SDK methods are deprecated compatibility wrappers. Use the InsForge SDK for database, auth, storage, functions, and realtime; use OpenRouter for model calls.Recommended Architecture
Server-Side OpenRouter Call
Use the OpenAI SDK or REST from your backend. For TypeScript backends:Calling Your Backend from Kotlin
Legacy InsForge AI Methods
These Kotlin SDK methods are deprecated for new AI integrations:client.ai.listModels()client.ai.chatCompletion(...)client.ai.chatCompletionStream(...)client.ai.generateEmbeddings(...)client.ai.generateImage(...)