ReqAI

CI Hex version Hex Docs

ReqAI is a lightweight Elixir client for LLM APIs, built on Req.

alias ReqAI.Provider.OpenAI

{:ok, %Req.Response{}, body} =
  ReqAI.generate(OpenAI, model: "gpt-5.4-mini", input: "Say hello")

%{"output" => [%{"content" => [%{"text" => text}]}]} = body

IO.puts(text)

See the Getting Started guide for configuration and usage examples.

Philosophy

Features

Installation

Add ReqAI to your dependencies in mix.exs:

{:req_ai, ">= 0.0.0"}

Requires Elixir 1.18 or later and Req 0.8.0 or later.