Cookie Preferences

We use cookies to improve your experience. Read our privacy policy

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.

Requests made with an API key spend purchased credit only. A key is an unattended credential; the daily allowance and the welcome credit are for the apps, where a person is present. So a key never draws on the allowance, welcome credit or subscription credit, whatever the account holds.

  • Purchased — credit you top up, from ₹100. Valid for 12 months, no per-model markup, and it unlocks the Plus-exclusive models for as long as you hold a balance. This is the only pool an API key can spend.
  • Welcome — $0.50 once, on every new account, for the apps. Spendable on any model.
  • Daily allowance — $0.20 a day in the apps, on flash-class chat models (at most $0.50 per million input tokens and $2.50 per million output). Not spendable over the API.

A Plus subscription is sold in the Mume AI mobile app and unlocks the same models a purchased balance does, but its credit is not spendable over the API either. Top up at Credits, or see pricing.

An API request with no purchased balance responds 402 purchased_credits_required; a Plus-exclusive model requested without a purchased balance responds 403 plan_required. The full list is in Error Handling.