Electron is OpenAI-compatible. If you can call the OpenAI Chat Completions API, you can call Electron — change the base URL and the API key, and your existing code works.
In the Smallest AI Console, go to Settings → API Keys and click Create API Key. Copy it and export:
Paste this cURL — no install required:
You’ll get back the standard OpenAI chat-completion shape:
Because Electron speaks the OpenAI wire format, you can use the official OpenAI SDKs verbatim — just override base_url (or baseURL) and api_key.
Install the SDK if you don’t already have it:
Get tokens as they’re generated. Set stream: true for SSE.
Use Electron for agents — it returns OpenAI-style tool_calls and is trained to handle voice-agent flows.
Cached input tokens are billed at 75% off. Structure your prompts to hit the cache.
Side-by-side diff: what changes when you switch from api.openai.com.