Authentication

To use the Mume Gateway API, you'll need an API key. Here's how to generate one and configure your environment.

Generating an API Key

StepAction
1Navigate to mume.ai/dashboard/keys
2Sign in to your Mume account (or create one)
3Click the "Generate API Key" button
4Copy your key immediately and store it securely

Security: Never share your API key publicly, commit it to version control, or expose it in client-side code. If compromised, revoke it immediately and generate a new one.


Environment Variables

macOS / Linux

Bash
export MUME_API_KEY="your-api-key-here" # Make it permanent: echo 'export MUME_API_KEY="your-api-key-here"' >> ~/.bashrc source ~/.bashrc

Windows (Command Prompt)

CMD
set MUME_API_KEY=your-api-key-here :: Make it permanent: setx MUME_API_KEY "your-api-key-here"

Windows (PowerShell)

PowerShell
$env:MUME_API_KEY = "your-api-key-here" # Make it permanent: [System.Environment]::SetEnvironmentVariable('MUME_API_KEY', 'your-api-key-here', 'User')

Using a .env File

Create a .env file in your project root:

.env
MUME_API_KEY=your-api-key-here

Python (using python-dotenv)

Python
from dotenv import load_dotenv import os load_dotenv() api_key = os.getenv("MUME_API_KEY")

JavaScript (using dotenv)

JavaScript
import "dotenv/config"; const apiKey = process.env.MUME_API_KEY;

Tip: Add .env to your .gitignore to prevent accidentally committing your API key.


Using the API Key

Python

Python
import os import openai client = openai.OpenAI( api_key=os.environ.get("MUME_API_KEY"), base_url="https://mume.ai/api/v1", )

JavaScript

JavaScript
import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.MUME_API_KEY, baseURL: "https://mume.ai/api/v1", });

cURL

Bash
curl https://mume.ai/api/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $MUME_API_KEY" \ -d '{ "model": "anthropic/claude-haiku-4.5", "messages": [{"role": "user", "content": "Hello!"}] }'

Credits & Pricing

A credit is one US dollar of model usage. Each API call deducts what it actually cost the provider — input plus output tokens, at that model's own rate — with no per-model markup.

Balances come from two pools, and requests spend them in this order:

  • Included — $0.50 of credit, refreshed daily on every account. Spent first, because it is the pool that expires soonest.
  • Purchased — credit you top up, from ₹100. Valid for 12 months, and it unlocks the Plus-exclusive models for as long as you hold a balance.

A Plus subscription grants credit monthly and is sold in the Mume AI mobile app. It is not required for API access, and it unlocks the same models a purchased balance does. Top up at Credits, or see pricing.

When a balance runs out the API responds 402 insufficient_credits; a Plus-exclusive model requested without access responds 403 plan_required.