This quickstart walks you through your first successful MARA Cloud API call in a few minutes.
New users get $5 in free credits on first signup. Credits are applied automatically.
What you'll do
- Create an API key in the MARA Cloud portal.
- Save the key as an environment variable.
- Send a test request using Python, JavaScript, or cURL.
- Verify the response and move to the next docs sections.
Before you begin
- A MARA Cloud account
- Internet access from your development machine
- One of:
- Python 3.9+
- Node.js 18+
- cURL
Step 1: Create your API key
Open API Keys and URLs and generate a key.
Save the key immediately. For security reasons, the full key value is only shown once.
Step 2: Set your API key as an environment variable
Use an environment variable so you don't hardcode secrets in source code.
bash
export MARA_API_KEY="your-mara-api-key"Then open a new terminal/session and verify:
bash
echo $MARA_API_KEYStep 3: Choose a model
Start with
You can compare alternatives in the Model Catalog.
MiniMax-M2.5 (used in the examples below).You can compare alternatives in the Model Catalog.
Step 4: Install the client (if needed)
bash
pip install openaiStep 5: Send your first request
Use this base URL:
https://bczfskny6zqw.poweredby.snova.ai/v1python
import os
from openai import OpenAI
client = OpenAI(
base_url="https://bczfskny6zqw.poweredby.snova.ai/v1",
api_key=os.environ.get("MARA_API_KEY"),
)
completion = client.chat.completions.create(
model="MiniMax-M2.5",
messages=[
{"role": "system", "content": "Answer in 2-3 short sentences."},
{"role": "user", "content": "Share a happy story with me"},
],
)
print(completion.choices[0].message.content)Step 6: Run your file (Python / JavaScript)
bash
python hello_world.pyCommon first-run issues
401 Unauthorized: Check thatMARA_API_KEYis set correctly and restart your terminal.429 Too Many Requests: You hit a limit. Wait briefly and retry.- Empty or missing output: Confirm you're using a valid model ID from the Model Catalog.
Next steps
- API Keys and URLs - Endpoint and auth setup details.
- OpenAI Compatibility - Drop-in OpenAI client usage patterns.
- Model Catalog - Compare models and capabilities.
- Function Calling & JSON Mode - Structured outputs and tool calls.