Quickstart
MartLLM is one API endpoint for every model in its catalog. It accepts the OpenAI and Anthropic wire formats, so most tools and SDKs work after you set the base URL and a MartLLM API key.
- OpenAI-compatible base URL:
https://api.martllm.com/v1 - Anthropic-compatible base URL:
https://api.martllm.com(endpoint/v1/messages)
1. Get your API key
- Sign up at martllm.com. Your first key is made for you and shown at the top of the dashboard, with a first call you can paste.
- Copy the key: it is shown until you press I've copied it, then never
again. Keys look like
ull_followed by 43 characters (ull_R7f2...). Store it in an environment variable, never in source control. - Need another key, or lost this one? Open Dashboard → API keys, click Create key, and (optionally) set a spend limit or per-minute rate limit.
export UBERLLM_API_KEY="ull_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
2. Add credits
Inference is prepaid and new accounts start at $0. Open Dashboard → Credits and top up by card or PayPal (minimum $5). Each call is sent to an available third-party provider and billed what that provider charged. MartLLM adds no fee to calls. A card fee of 5.5% + $0.50 is added when you pay; your credit is the exact amount you pick. See Pricing.
3. Make your first call
Point any OpenAI-compatible client at https://api.martllm.com/v1 with your
ull_ key as the API key.
curl (streaming)
curl -N https://api.martllm.com/v1/chat/completions \
-H "Authorization: Bearer $UBERLLM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek/deepseek-v4-flash",
"stream": true,
"messages": [{"role": "user", "content": "Say hello in one sentence."}]
}'
Python (official openai SDK)
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.martllm.com/v1",
api_key=os.environ["UBERLLM_API_KEY"],
)
stream = client.chat.completions.create(
model="deepseek/deepseek-v4-flash",
messages=[{"role": "user", "content": "Say hello in one sentence."}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="", flush=True)
TypeScript (official openai SDK)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.martllm.com/v1",
apiKey: process.env.UBERLLM_API_KEY,
});
const stream = await client.chat.completions.create({
model: "deepseek/deepseek-v4-flash",
messages: [{ role: "user", content: "Say hello in one sentence." }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
4. Confirm it worked
Open Dashboard → Activity. You will see the request logged with the model, the provider it was routed to, token counts, latency, and the exact cost deducted from your balance.
Next steps
- OpenAI SDK drop-in — full guide including non-streaming, tools.
- Anthropic SDK — use
client.messagesagainst/v1/messages. - Models & routing — model ids, automatic retries, and routing options.
- Editor integrations: Cursor, Cline, Roo Code, Aider, Continue.
- Frameworks: LangChain, Vercel AI SDK.