Developer Tools
Add-ons
Add-ons are server-side utilities you call from your own app through the MUDBASE API — generate a PDF, a QR code, a CSV/ICS/vCard, look up an IP, or fetch FX and crypto prices, without adding a library or a third-party account. They run on MUDBASE and are billed per successful call.
How they work
Every add-on is invoked via POST /api/projects/{projectId}/addons/{addon}/invoke with a JSON body { "input": { ... } }. Authenticate with a project API key (Authorization: Bearer ak_...) — the same key you use for the rest of the API. List the catalog any time with GET /api/addons.
{ "job": { ... } }, HTTP 200 if it completed immediately or 202 if it's still processing. Check job.status (queued → processing → completed/failed) and poll GET /api/projects/{projectId}/addons/jobs/{job._id} until it settles. File add-ons (qrcode, pdf, csv, ics, vcard) resolve to a downloadable job.result.url (or job.result.inline, base64, for small results). Data add-ons (geoip, currency-convert, crypto-price, and the pure-compute ones below) resolve to job.result.data.Invoke an add-on
curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/qrcode/invoke \
-H "Authorization: Bearer ak_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "input": { "text": "https://example.com", "size": 256 } }'
# => 200 { "job": { "_id": "...", "status": "completed", "result": { "mode": "file", "url": "https://..." } } }
# or => 202 { "job": { "_id": "...", "status": "queued" } } — poll the job below until it settlescurl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/qrcode/invoke \
-H "Authorization: Bearer ak_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "input": { "text": "https://example.com", "size": 256 } }'
# => 200 { "job": { "_id": "...", "status": "completed", "result": { "mode": "file", "url": "https://..." } } }
# or => 202 { "job": { "_id": "...", "status": "queued" } } — poll the job below until it settlesconst res = await fetch(
`https://cloud.mudbase.dev/api/projects/${projectId}/addons/qrcode/invoke`,
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.MUDBASE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ input: { text: "https://example.com", size: 256 } }),
},
);
let { job } = await res.json();
// Every invocation returns a job — poll until it settles if it wasn't already "completed".
while (job.status !== "completed" && job.status !== "failed") {
await new Promise((r) => setTimeout(r, 500));
const poll = await fetch(
`https://cloud.mudbase.dev/api/projects/${projectId}/addons/jobs/${job._id}`,
{ headers: { Authorization: `Bearer ${process.env.MUDBASE_API_KEY}` } },
);
job = (await poll.json()).job;
}
// File add-ons (qrcode, pdf, csv, ics, vcard) resolve to job.result.url (or .inline, base64,
// for small results). Data add-ons (geoip, currency-convert, crypto-price, and the pure-compute
// ones below) resolve to job.result.data.
if (job.status === "completed") console.log(job.result.url ?? job.result.data);const res = await fetch(
`https://cloud.mudbase.dev/api/projects/${projectId}/addons/qrcode/invoke`,
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.MUDBASE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ input: { text: "https://example.com", size: 256 } }),
},
);
let { job } = await res.json();
// Every invocation returns a job — poll until it settles if it wasn't already "completed".
while (job.status !== "completed" && job.status !== "failed") {
await new Promise((r) => setTimeout(r, 500));
const poll = await fetch(
`https://cloud.mudbase.dev/api/projects/${projectId}/addons/jobs/${job._id}`,
{ headers: { Authorization: `Bearer ${process.env.MUDBASE_API_KEY}` } },
);
job = (await poll.json()).job;
}
// File add-ons (qrcode, pdf, csv, ics, vcard) resolve to job.result.url (or .inline, base64,
// for small results). Data add-ons (geoip, currency-convert, crypto-price, and the pure-compute
// ones below) resolve to job.result.data.
if (job.status === "completed") console.log(job.result.url ?? job.result.data);addon.{key}) and appears under Usage in the console. Failed/validation errors are not billed. Heavy jobs run async on a queue; you receive the result when ready.Catalog
qrcode — QR code PNG
| Name | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Content to encode (URL, text, etc.). |
size | number | No | PNG width/height in px. Default 256. |
curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/qrcode/invoke \
-H "Authorization: Bearer ak_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "input": { "text": "https://example.com", "size": 256 } }'
# => 200 { "job": { "_id": "...", "status": "completed", "result": { "mode": "file", "url": "https://..." } } }
# or => 202 { "job": { "_id": "...", "status": "queued" } } — poll the job below until it settlescurl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/qrcode/invoke \
-H "Authorization: Bearer ak_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "input": { "text": "https://example.com", "size": 256 } }'
# => 200 { "job": { "_id": "...", "status": "completed", "result": { "mode": "file", "url": "https://..." } } }
# or => 202 { "job": { "_id": "...", "status": "queued" } } — poll the job below until it settlespdf — PDF document
| Name | Type | Required | Description |
|---|---|---|---|
title | string | No | Document title / first heading. |
content | Array<string | { text, heading }> | Yes | Ordered lines; objects with heading:true render as headings. |
curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/pdf/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "title": "Invoice #1024", "content": [
{ "text": "Receipt", "heading": true }, "Thanks for your purchase." ] } }'curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/pdf/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "title": "Invoice #1024", "content": [
{ "text": "Receipt", "heading": true }, "Thanks for your purchase." ] } }'csv — CSV export
| Name | Type | Required | Description |
|---|---|---|---|
headers | string[] | No | Optional header row. |
rows | string[][] | Yes | Row values. Commas/quotes/newlines are escaped (RFC 4180). |
curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/csv/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "headers": ["name","email"], "rows": [["Ada","ada@ex.com"]] } }'curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/csv/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "headers": ["name","email"], "rows": [["Ada","ada@ex.com"]] } }'ics — Calendar event
| Name | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Event summary. |
start | string (ISO 8601) | Yes | Start time. |
end | string (ISO 8601) | No | End time. |
description | string | No | Optional event body. |
location | string | No | Optional location. |
curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/ics/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "title": "Launch", "start": "2026-07-01T10:00:00Z", "end": "2026-07-01T11:00:00Z" } }'curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/ics/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "title": "Launch", "start": "2026-07-01T10:00:00Z", "end": "2026-07-01T11:00:00Z" } }'vcard — Contact card
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Full name (FN). |
email | string | No | Email address. |
phone | string | No | Phone number. |
org | string | No | Organization. |
curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/vcard/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "name": "Ada Lovelace", "email": "ada@ex.com", "phone": "+15551234" } }'curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/vcard/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "name": "Ada Lovelace", "email": "ada@ex.com", "phone": "+15551234" } }'geoip — IP geolocation
Offline lookup — no external call, no rate limit.
| Name | Type | Required | Description |
|---|---|---|---|
ip | string | Yes | IPv4/IPv6 address to resolve. |
curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/geoip/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "ip": "8.8.8.8" } }'
# => job.result.data: { "ip": "8.8.8.8", "found": true, "country": "US", "city": "...", "ll": [37.4,-122.0] }curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/geoip/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "ip": "8.8.8.8" } }'
# => job.result.data: { "ip": "8.8.8.8", "found": true, "country": "US", "city": "...", "ll": [37.4,-122.0] }currency-convert — FX conversion
| Name | Type | Required | Description |
|---|---|---|---|
from | string (ISO 4217) | Yes | Source currency, e.g. USD. |
to | string (ISO 4217) | Yes | Target currency, e.g. EUR. |
amount | number | No | Amount to convert. Default 1. |
curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/currency-convert/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "from": "USD", "to": "EUR", "amount": 100 } }'
# => job.result.data: { "from": "USD", "to": "EUR", "amount": 100, "rate": 0.92, "result": 92 }curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/currency-convert/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "from": "USD", "to": "EUR", "amount": 100 } }'
# => job.result.data: { "from": "USD", "to": "EUR", "amount": 100, "rate": 0.92, "result": 92 }crypto-price — Crypto spot prices
| Name | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | Coin ids (CoinGecko ids), e.g. ["bitcoin","ethereum"]. |
vs | string | No | Quote currency. Default usd. |
curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/crypto-price/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "ids": ["bitcoin","ethereum"], "vs": "usd" } }'
# => job.result.data: { "bitcoin": { "usd": 65000 }, "ethereum": { "usd": 3200 } }curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/crypto-price/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "ids": ["bitcoin","ethereum"], "vs": "usd" } }'
# => job.result.data: { "bitcoin": { "usd": 65000 }, "ethereum": { "usd": 3200 } }Pure-compute add-ons (keyless)
These run entirely on MUDBASE with no third-party account — instant utilities for your app. All return JSON under data.
uuid — UUID generator
| Name | Type | Required | Description |
|---|---|---|---|
count | number | No | How many v4 UUIDs to generate, 1–100. Default 1. |
uppercase | boolean | No | Return uppercase UUIDs. Default false. |
curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/uuid/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "count": 5, "uppercase": false } }'
# => job.result.data: { "version": 4, "count": 5, "uuids": ["...", "...", ...] }curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/uuid/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "count": 5, "uppercase": false } }'
# => job.result.data: { "version": 4, "count": 5, "uuids": ["...", "...", ...] }hash — Hash & HMAC
| Name | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Text to hash. |
algo | sha256 | sha512 | sha1 | md5 | No | Hash algorithm. Default sha256. |
key | string | No | When supplied, computes an HMAC with this key instead of a plain hash. |
encoding | hex | base64 | No | Digest encoding. Default hex. |
curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/hash/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "text": "hello", "algo": "sha256" } }'
# => job.result.data: { "algo": "sha256", "encoding": "hex", "hmac": false,
# "digest": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824" }curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/hash/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "text": "hello", "algo": "sha256" } }'
# => job.result.data: { "algo": "sha256", "encoding": "hex", "hmac": false,
# "digest": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824" }slugify — URL-safe slug
| Name | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Text to slugify. |
lower | boolean | No | Lowercase the slug. Default true. |
strict | boolean | No | Strip characters outside [A-Za-z0-9] and the separator. Default true. |
separator | string | No | Word separator. Default "-". |
curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/slugify/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "text": "Hello, World! This is MUDBASE." } }'
# => job.result.data: { "input": "Hello, World! This is MUDBASE.", "slug": "hello-world-this-is-mudbase" }curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/slugify/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "text": "Hello, World! This is MUDBASE." } }'
# => job.result.data: { "input": "Hello, World! This is MUDBASE.", "slug": "hello-world-this-is-mudbase" }password — Password generator
| Name | Type | Required | Description |
|---|---|---|---|
length | number | No | Password length, 8–256. Default 16. |
lowercase | boolean | No | Include lowercase letters. Default true. |
uppercase | boolean | No | Include uppercase letters. Default true. |
digits | boolean | No | Include digits. Default true. |
symbols | boolean | No | Include symbols. Default false. |
curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/password/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "length": 20, "symbols": true } }'
# => job.result.data: { "length": 20, "password": "...", "classes": 4 }curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/password/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "length": 20, "symbols": true } }'
# => job.result.data: { "length": 20, "password": "...", "classes": 4 }markdown — Markdown to HTML
Supports headings, bold/italic, inline code, fenced code blocks, links, and unordered/ordered lists — rendered then run through an allowlist sanitizer, so the output is always safe to inject.
| Name | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Markdown source (also accepted as `markdown`). |
curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/markdown/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "text": "# Hello\n\nThis is **bold** and *italic* text with a [link](https://mudbase.dev)." } }'
# => job.result.data: { "html": "<h1>Hello</h1>\n<p>This is <strong>bold</strong> and <em>italic</em> text with a <a href=\"https://mudbase.dev\">link</a>.</p>" }curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/markdown/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "text": "# Hello\n\nThis is **bold** and *italic* text with a [link](https://mudbase.dev)." } }'
# => job.result.data: { "html": "<h1>Hello</h1>\n<p>This is <strong>bold</strong> and <em>italic</em> text with a <a href=\"https://mudbase.dev\">link</a>.</p>" }qrcode-svg — QR code as SVG
Same encoder as qrcode, but returns a scalable SVG string instead of a PNG file — sharper for print and large displays.
| Name | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Content to encode (also accepted as `data`). |
margin | number | No | Quiet-zone margin in modules. Default 2. |
ecc | L | M | Q | H | No | Error-correction level. Default M. |
curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/qrcode-svg/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "text": "https://mudbase.dev", "margin": 2, "ecc": "M" } }'
# => job.result.data: { "mimeType": "image/svg+xml", "svg": "<svg ...>...</svg>" }curl -X POST https://cloud.mudbase.dev/api/projects/<PROJECT_ID>/addons/qrcode-svg/invoke \
-H "Authorization: Bearer ak_your_api_key" -H "Content-Type: application/json" \
-d '{ "input": { "text": "https://mudbase.dev", "margin": 2, "ecc": "M" } }'
# => job.result.data: { "mimeType": "image/svg+xml", "svg": "<svg ...>...</svg>" }