About Openai Clojure
Openai Clojure is an unofficial Clojure library for driving the OpenAI API and the Azure OpenAI API from the same code. It aims to hide the small differences between the two services so that tools and applications written with it can work against either one.
The library covers chat completions, audio, text completions, embeddings and images on both services, and adds models, files, fine tuning and moderations on OpenAI. Its documentation also lists beta Assistants, Threads, Messages, Runs and Vector Stores endpoints. Token streaming is documented in its own guide, and a full API reference gives examples for every supported call. A chat conversation takes a single function call that accepts a model name and a list of messages and returns the response as a Clojure map including token usage.
It is added to a project through deps.edn or Leiningen using the net.clojars.wkok coordinates and requires Java 11 or later. Authentication uses an OPENAI_API_KEY environment variable, with an optional organization variable, or the documented alternatives, and Azure has its own authentication page. The HTTP layer is built on the Martian abstraction library. It is aimed at Clojure developers who want idiomatic access to OpenAI models.
The project is released under the MIT license and is free to use. The README states that it is not affiliated with or endorsed by OpenAI, and usage of the underlying APIs is billed separately by those providers.