A Rust library giving one common API for chatting with many AI providers using each provider's native protocol.
ksylvest/omniai
A unified Ruby API for chat, speech, and embeddings across multiple AI providers such as OpenAI, Anthropic, Google, Mistral, and DeepSeek.
- Stars
- 254
- Forks
- 15
- Open issues
- 1
- Last commit
- 7 days ago
What is it?
OmniAI is a Ruby library that gives developers one consistent interface to several AI providers, including Anthropic, DeepSeek, Google, Mistral, and OpenAI. Each provider is shipped as its own gem, so you install only the clients you need, and switching providers requires changing the client rather than the calling code.
The library covers chat (with streaming, multimodal prompts, tool calling, and structured output via schemas), text-to-speech, speech-to-text, and embeddings. It also includes a command line interface for quick tests and an MCP server implementation that runs over stdio.
The project additionally documents support for OpenAI-compatible endpoints such as LocalAI and Ollama, configurable logging and timeouts, and options for extended thinking and prompt caching where providers support them.
Key features
- 01Single client interface across OpenAI, Anthropic, Google, Mistral, and DeepSeek
- 02Chat with streaming output, system and user messages, and image inputs
- 03Tool calling with Ruby tool classes and schema-based structured responses
- 04Text-to-speech, speech-to-text, and embedding generation
- 05Command line interface and an MCP server over stdio
Use cases
- Building a Ruby or Rails application that needs to call an LLM without locking into one vendor
- Comparing responses from different providers using the same code
- Adding speech transcription or synthesis to a Ruby service
- Connecting a Ruby app to a local OpenAI-compatible model server
Quick start
- 1
Install the main omniai gem
gem install omniai - 2
Install a provider gem, such as OpenAI
gem install omniai-openai - 3
Create a client and send a chat request
Things to know
- Requires API keys from the individual AI providers to make requests.
- Each provider needs its own separate gem installed.
In collections
Topics
FAQ
- What is omniai?
- A unified Ruby API for chat, speech, and embeddings across multiple AI providers such as OpenAI, Anthropic, Google, Mistral, and DeepSeek. OmniAI is a Ruby library that gives developers one consistent interface to several AI providers, including Anthropic, DeepSeek, Google, Mistral, and OpenAI. Each provider is shipped as its own gem, so you install only the clients you need, and switching providers requires changing the client rather than the calling code.
- Is omniai free to use? What license does it have?
- omniai is open source under the MIT license. Check the license terms before using it in commercial products.
- Is omniai still maintained?
- Actively maintained. The last commit to omniai was on Oct 30, 2026.
- What can I use omniai for?
- Building a Ruby or Rails application that needs to call an LLM without locking into one vendor Comparing responses from different providers using the same code Adding speech transcription or synthesis to a Ruby service Connecting a Ruby app to a local OpenAI-compatible model server
- How do I install omniai?
- Install the main omniai gem: gem install omniai Install a provider gem, such as OpenAI: gem install omniai-openai Create a client and send a chat request
- Where can I get omniai?
- The source code and installation instructions are on GitHub: https://github.com/ksylvest/omniai
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Java library giving JVM applications one unified API for LLM providers and vector stores, with tool calling, agents and RAG.
A tiny on-device foundation model for tool calling, structured extraction, embeddings and speech-to-text on phones, wearables, robots and microcontrollers.
A lightweight Python library that gives one OpenAI-style API across many LLM providers, plus an Agents API with tools and MCP support.
Java-based HTTP proxy that gives a single unified API over multiple chat completion and embedding models, assistants and applications.
A Java library for calling the Ollama server's REST API, covering chat, generation, tools, embeddings and model management.