# ruby-openai

> Use the OpenAI API with Ruby

Source: https://talira.ai/catalog/ruby-openai-3ac0fca8
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [ai / llm / client libraries](https://talira.ai/categories/ai/llm/client-libraries), [languages / ruby](https://talira.ai/categories/languages/ruby)
- Licence: MIT[^1][^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes[^3]
- Creator: Alex Rudall
- Sponsors: InferToGo, SerpApi

ruby-openai is a community Ruby gem for the [OpenAI API](https://talira.ai/catalog/openai-api-t57ph5ck.md) by Alex Rudall, separate from OpenAI's own [OpenAI Ruby SDK](https://talira.ai/catalog/openai-ruby-sdk-8bnqs7b1.md) (the `openai` gem). Built on Faraday, it covers chat with streaming through a proc, JSON mode, functions, the Responses API, embeddings, batches, files, fine-tunes, vector stores, assistants, image generation, Whisper transcription and Realtime WebRTC sessions, and it can point at Azure OpenAI or OpenAI-compatible APIs such as [Ollama](https://talira.ai/catalog/ollama-gr2tx5nn.md), Groq, Deepseek and Gemini. Its support policy says one volunteer maintainer keeps it, with the 8.x line supported; the latest release is 8.3.0 from August 2025.

## Links

- GitHub: https://github.com/alexrudall/ruby-openai

## Problems it solves

- call OpenAI's chat API from Ruby with streaming through a block
- point the same Ruby OpenAI client at Ollama, Groq or Deepseek
- add Faraday middleware such as logging to my Ruby OpenAI calls
- use Azure OpenAI deployments from a Ruby app
- keep an existing Rails integration that was written against the ruby-openai gem working

## Features

- chat completions with streaming procs
- JSON mode and functions
- Responses API and conversations
- embeddings, batches, files, fine-tunes, vector stores
- assistants, threads and runs
- image generation, edits and variations; moderations; Whisper
- Realtime WebRTC sessions
- Azure OpenAI and OpenAI-compatible providers (Ollama, Groq, Deepseek, Gemini)
- Faraday middleware and configurable logging of errors

## Trust

Overall: 0.29 out of 1.
Signals: backing 0.35, extensibility 0.00.

- created by Alex Rudall
- sponsored by InferToGo, SerpApi

Warnings:

- GitHub activity not fetched yet

## Related

- Works with [OpenAI API](https://talira.ai/catalog/openai-api-t57ph5ck.md)

## Alternatives

- [OpenAI Ruby SDK](https://talira.ai/catalog/openai-ruby-sdk-8bnqs7b1.md): Official Ruby SDK for the OpenAI API
- [RubyLLM](https://talira.ai/catalog/rubyllm-2fxp4hmn.md): The Ruby AI framework

## Sources

[^1]: https://github.com/alexrudall/ruby-openai/blob/main/LICENSE.txt (checked 20 Nov 2026)
[^2]: https://rubygems.org/gems/ruby-openai (checked 20 Nov 2026)
[^3]: https://github.com/alexrudall/ruby-openai (checked 20 Nov 2026)
