Migrate from OpenAI
Electron speaks the OpenAI Chat Completions wire format. To migrate an existing OpenAI integration, change exactly two strings:
base_url→https://api.smallest.ai/waves/v1api_key→ your Smallest AI keymodel→"electron"
That’s it. Streaming, tool calling, JSON mode, multi-turn — all work identically because Electron implements the same protocol.
Side-by-side: Python
Side-by-side: JavaScript
What works identically
- Messages — same
system,user,assistant,toolrole conventions. - Streaming — same SSE format, same
[DONE]marker, same delta chunks. Withstream_options.include_usage: true, you get the final usage chunk just like OpenAI. - Tool calling — same
toolsarray, sametool_callsin response, same multi-turn pattern. (Electron adds a voice-friendly filler incontentalongsidetool_calls— see Tool Calling.) - Error envelope —
{"error": {"message", "type", "details", "request_id"}}. (Electron usesdetails: [{code, message, path}]for validation errors where OpenAI usesparam; otherwise the envelope shape is the same.) - OpenAI SDKs — Python, JavaScript, Go, Java, Ruby, etc. All work without code changes beyond the two strings above.
Differences to be aware of
Common migration questions
Will my fine-tuned OpenAI model work?
No — Electron is a separate model. There is no migration path for OpenAI fine-tunes today. For most use cases, careful system-prompt engineering on Electron achieves comparable behavior; reach out to support if you want help replicating a specific fine-tune.
What about function-calling formats — does it work with my existing tool definitions?
Yes. Pass your existing tools array unchanged. Electron returns tool_calls in the same JSON shape as OpenAI. The only behavioral difference: Electron may also populate content with a short filler phrase on tool-call turns — see Tool Calling.
Does response_format: {type: 'json_object'} work?
Does response_format: {type: 'json_object'} work?
Yes. JSON mode is supported and follows OpenAI’s semantics — instruct the model to produce JSON in the system or user message, set response_format, and the output will be JSON.
How do I get the equivalent of OpenAI's tier-1/2/3 rate limits?
Electron uses per-plan limits documented in Concurrency and Limits. Contact sales for higher limits if your workload needs more than 200 RPM / 20 concurrent.
Are there any prompts that work on OpenAI but don't work on Electron?
Electron is competitive with frontier models on most tasks, including in 70 languages with first-class Indic support. If you find a specific prompt that performs worse on Electron, please share it with support — we use real customer prompts to drive ongoing improvements.
Reverse compatibility
Some teams want to keep the option to fall back to OpenAI. Because Electron uses the same SDK, you can wire both clients with a simple factory and select per-request:

