OpenAI#
typescript
import { OpenAIProvider } from '@AxilJS/ai'
const ai = new OpenAIProvider({ apiKey: process.env.OPENAI_API_KEY })Anthropic#
typescript
import { AnthropicProvider } from '@AxilJS/ai'
const ai = new AnthropicProvider({ apiKey: process.env.ANTHROPIC_API_KEY })Gemini#
typescript
import { GeminiProvider } from '@AxilJS/ai'
const ai = new GeminiProvider({ apiKey: process.env.GOOGLE_API_KEY })Ollama (local)#
typescript
import { OllamaProvider } from '@AxilJS/ai'
const ai = new OllamaProvider({ model: 'llama3.2' })All share: ai.complete(), ai.stream(), ai.embed()
Note
Provider HTTP errors are caught — the server never crashes from a failed AI call.