OpenAI’s client is widely used by developers who consume AI inference in their products. As such, we provide a mock OpenAI API for developers to access any of the millions of open-source AI models by changing only two lines of code:
ai.js
// 💥 Create a Muna client
const muna = new Muna();

// 🔥 Retrieve the mock OpenAI client
const openai = muna.beta.openai;

// 🚀 Create a chat completion
const completion = await openai.chat.completions.create({
    model: "@google/gemma-3-270m",  // use an LLM predictor from Muna!
    acceleration: "remote_a100",    // use an Nvidia GPU in the ☁️
    messages: [{ role: "developer", content: "You are a helpful assistant." }]
});
Unlike OpenAI’s own client, every operation in Muna’s OpenAI client allows for running the model either locally or in the cloud, accelerated by powerful GPUs.

Using Muna’s OpenAI Client

We currently support a small-but-growing set of operations from the OpenAI client:
The mock OpenAI client is experimental, with many features still missing.

Create Chat Completion

INCOMPLETE

Create Embeddings

INCOMPLETE

Create Speech

INCOMPLETE

Create Transcription

INCOMPLETE

Creating OpenAI Compatible Predictors

INCOMPLETE