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.

Every invocation returns a job — poll if it isn't done yet
The response is always { "job": { ... } }, HTTP 200 if it completed immediately or 202 if it's still processing. Check job.status (queuedprocessingcompleted/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
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 settles
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 settles
Node.js
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);
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);
Billing & limits
Each successful invocation meters one unit against your plan (resource 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

NameTypeRequiredDescription
textstringYesContent to encode (URL, text, etc.).
sizenumberNoPNG width/height in px. Default 256.
cURL
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 settles
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 settles

pdf — PDF document

NameTypeRequiredDescription
titlestringNoDocument title / first heading.
contentArray<string | { text, heading }>YesOrdered lines; objects with heading:true render as headings.
cURL
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

NameTypeRequiredDescription
headersstring[]NoOptional header row.
rowsstring[][]YesRow values. Commas/quotes/newlines are escaped (RFC 4180).
cURL
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

NameTypeRequiredDescription
titlestringYesEvent summary.
startstring (ISO 8601)YesStart time.
endstring (ISO 8601)NoEnd time.
descriptionstringNoOptional event body.
locationstringNoOptional location.
cURL
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

NameTypeRequiredDescription
namestringYesFull name (FN).
emailstringNoEmail address.
phonestringNoPhone number.
orgstringNoOrganization.
cURL
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.

NameTypeRequiredDescription
ipstringYesIPv4/IPv6 address to resolve.
cURL
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

NameTypeRequiredDescription
fromstring (ISO 4217)YesSource currency, e.g. USD.
tostring (ISO 4217)YesTarget currency, e.g. EUR.
amountnumberNoAmount to convert. Default 1.
cURL
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

NameTypeRequiredDescription
idsstring[]YesCoin ids (CoinGecko ids), e.g. ["bitcoin","ethereum"].
vsstringNoQuote currency. Default usd.
cURL
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

NameTypeRequiredDescription
countnumberNoHow many v4 UUIDs to generate, 1–100. Default 1.
uppercasebooleanNoReturn uppercase UUIDs. Default false.
cURL
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

NameTypeRequiredDescription
textstringYesText to hash.
algosha256 | sha512 | sha1 | md5NoHash algorithm. Default sha256.
keystringNoWhen supplied, computes an HMAC with this key instead of a plain hash.
encodinghex | base64NoDigest encoding. Default hex.
cURL
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

NameTypeRequiredDescription
textstringYesText to slugify.
lowerbooleanNoLowercase the slug. Default true.
strictbooleanNoStrip characters outside [A-Za-z0-9] and the separator. Default true.
separatorstringNoWord separator. Default "-".
cURL
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

NameTypeRequiredDescription
lengthnumberNoPassword length, 8–256. Default 16.
lowercasebooleanNoInclude lowercase letters. Default true.
uppercasebooleanNoInclude uppercase letters. Default true.
digitsbooleanNoInclude digits. Default true.
symbolsbooleanNoInclude symbols. Default false.
cURL
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.

NameTypeRequiredDescription
textstringYesMarkdown source (also accepted as `markdown`).
cURL
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.

NameTypeRequiredDescription
textstringYesContent to encode (also accepted as `data`).
marginnumberNoQuiet-zone margin in modules. Default 2.
eccL | M | Q | HNoError-correction level. Default M.
cURL
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>" }
Manage add-ons in the console
The Add-ons page in the console is for discovering what's available, enabling add-ons for a project, and tracking usage & spend. The integration itself always happens in your code via the endpoints above.