We provide SDKs for common development frameworks:
# Run this in Terminal$ npm install muna
# Run this in Terminal$ pip install --upgrade muna
# Run this in Terminal$ npm install @muna/expo
# Add this to your `pubspec.yml`dependencies: muna: 0.0.2
// Add this to your `build.gradle` or `build.gradle.kts` filedependencies { implementation("ai.muna:muna:0.0.10")}
let package = Package( name: "MySwiftPackage", dependencies: [ // Add the package to your dependencies .package(url: "https://github.com/muna-ai/muna-swift.git", from: "0.0.2"), ], targets: [ // Then add `Muna` as a dependency to your target .target(name: "MySwitPackage", dependencies: ["Muna"]), ])
// Add this to your `Packages/manifest.json` file{ "scopedRegistries": [ { "name": "Muna", "url": "https://registry.npmjs.com", "scopes": ["ai.muna"] } ], "dependencies": { "ai.muna.muna": "0.0.48" }}
Most of our client SDKs are open-source. Star them on GitHub!
import { Muna } from "muna"// π₯ Create an OpenAI clientconst openai = new Muna({ accessKey: "..." }).beta.openai;// π₯ Create a chat completionconst completion = await openai.chat.completions.create({ model: "@openai/gpt-oss-20b", messages: [{ role: "user", content: "What is the capital of France?" }]});// π Print the resultconsole.log(completion.choices[0]);
from muna import Muna# π₯ Create an OpenAI clientopenai = Muna(access_key="...").beta.openai# π₯ Create a chat completioncompletion = openai.chat.completions.create( model="@openai/gpt-oss-20b", messages=[{ "role": "user", "content": "What is the capital of France?" }])# π Print the resultprint(completion.choices[0].message)
Our OpenAI-style client in muna.beta.openai that has the same interface
as the official OpenAI client. This allows you to migrate in two lines of code.
The first time you run the code above might take a few minutes, because we have to download the (rather large) model weights. Subsequent runs should take a few seconds.
Munaβs central feature is the ability to choose where inference runs, on each request. Letβs run
the same model on a datacenter GPU:
// π₯ Create a chat completion with a datacenter GPUconst completion = await openai.chat.completions.create({ model: "@openai/gpt-oss-20b", messages: [{ role: "user", content: "What is the capital of France?" }], acceleration: "remote_a100"});
# π₯ Create a chat completion with a datacenter GPUcompletion = openai.chat.completions.create( model="@openai/gpt-oss-20b", messages=[{ "role": "user", "content": "What is the capital of France?" }], acceleration="remote_a100")