Mume AIMume AI
DocsModelsPricingChat
OverviewChat CompletionsResponses APIStreamingFunction CallingWeb SearchMCP ServersModelsError HandlingAuthentication

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": "openai/gpt-4.1-mini", "messages": [{"role": "user", "content": "Hello!"}] }'

Credits & Pricing

Every Mume account comes with $0.50 of free daily credits that refresh each day. For higher usage, subscribe to a Plus plan:

  • Free — $0.50/day in credits
  • Plus 500 — $4.99/month ($5.00 in credits/month)
  • Plus 1000 — $9.99/month ($10.00 in credits/month)
  • Plus 2000 — $19.99/month ($20.00 in credits/month)

Credits are consumed based on the actual provider cost of each API call (input + output tokens).


← Error HandlingBack to Overview →