×
HomePricingDocsLog in

API Reference

Base URL: https://cloud.mdmsolutions.biz

All responses are JSON unless the endpoint returns a binary file. Every authenticated response includes a meta object with request_id, credits_used, and credits_remaining.

Authentication

Authenticate every request with your API key or JWT token in the Authorization header:

Authorization: Bearer YOUR_API_KEY_OR_TOKEN

API keys are created when you register. JWT tokens are returned from the login endpoint. Both methods are accepted on all authenticated endpoints.

Error Handling

All errors return a JSON body with success: false and an error message:

{
  "success": false,
  "error": "Insufficient credits",
  "data": null
}
StatusMeaning
400Bad request — invalid parameters
401Unauthorized — missing or invalid API key
402Insufficient credits
404Not found
429Rate limited — slow down
500Internal server error

Rate Limits

Rate limits are enforced per API key per minute. Exceeding returns 429 Too Many Requests.

PlanLimit
Free10 requests/min
Starter60 requests/min
Growth300 requests/min
Business1,000 requests/min
EnterpriseCustom

Rate limit headers are returned in every response:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 54
X-RateLimit-Reset: 1712000060

Registration

POST /v1/register

Create a new account and receive your API key. No authentication required. The API key is shown only once.

ParameterTypeRequiredDescription
emailstringYesAccount email address
passwordstringNoAccount password (min 6 chars)
namestringNoDisplay name
curl -X POST https://cloud.mdmsolutions.biz/v1/register \
  -H "Content-Type: application/json" \
  -d '{"email": "dev@example.com", "password": "secure123", "name": "Jane Dev"}'
# Response
{
  "success": true,
  "data": {
    "user_id": "550e8400-e29b-41d4-a716-446655440000",
    "api_key": "pk_live_abc123...",
    "tier": "free",
    "credits_limit": 500
  }
}

Login

POST /v1/login

Authenticate with email and password to receive a JWT token. No API key required.

ParameterTypeRequiredDescription
emailstringYesAccount email
passwordstringYesAccount password
curl -X POST https://cloud.mdmsolutions.biz/v1/login \
  -H "Content-Type: application/json" \
  -d '{"email": "dev@example.com", "password": "secure123"}'
{
  "success": true,
  "data": {
    "token": "eyJhbG...",
    "user_id": "550e8400...",
    "email": "dev@example.com",
    "tier": "free",
    "credits_used": 42,
    "credits_limit": 500,
    "expires_at": "2026-02-01T00:00:00Z"
  }
}

Account Info

GET /v1/account

Get your account details, plan info, credit usage, and API keys.

{
  "success": true,
  "data": {
    "user_id": "550e8400...",
    "email": "dev@example.com",
    "tier": "growth",
    "plan_name": "Growth",
    "credits_used": 1234,
    "credits_limit": 25000,
    "api_keys": [
      { "id": "key-1", "name": "Production", "is_active": true, "created_at": "2026-01-01T00:00:00Z" }
    ],
    "created_at": "2026-01-01T00:00:00Z"
  }
}

API Key Management

Create API Key

POST /v1/account/keys
ParameterTypeRequiredDescription
namestringNoLabel for the key (e.g. "Production")

Rotate API Key

POST /v1/account/keys/:id/rotate

Invalidates the current key and returns a new one. The old key stops working immediately.

PDF Generation

Generate PDF from HTML

POST /v1/pdf/generate

Convert HTML content or a Tera template to a high-quality PDF. Returns binary PDF data. Costs 1 credit.

ParameterTypeRequiredDescription
htmlstringYes*Raw HTML content to render
templatestringYes*Tera template string (use with data)
dataobjectNoTemplate variables for Tera rendering
options.page_sizestringNoA4 (default), Letter, Legal
options.landscapeboolNoLandscape orientation (default: false)
options.marginfloatNoPage margin in mm (default: 20)
options.header_htmlstringNoHTML for page header
options.footer_htmlstringNoHTML for page footer
font_idstringNoCustom font ID (see Custom Fonts)

* Provide either html or template + data

cURL
Node.js
Python
curl -X POST https://cloud.mdmsolutions.biz/v1/pdf/generate \
  -H "Authorization: Bearer pk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "html": "<h1>Invoice #1042</h1><p>Total: $299.00</p>",
    "options": { "page_size": "A4", "margin": 25 }
  }' --output invoice.pdf
const res = await fetch('https://cloud.mdmsolutions.biz/v1/pdf/generate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer pk_live_your_key',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    html: '<h1>Invoice #1042</h1>',
    options: { page_size: 'A4', margin: 25 }
  })
});
const pdf = await res.arrayBuffer();
import requests

res = requests.post(
    "https://cloud.mdmsolutions.biz/v1/pdf/generate",
    headers={"Authorization": "Bearer pk_live_your_key"},
    json={"html": "<h1>Invoice</h1>", "options": {"page_size": "A4"}}
)
with open("invoice.pdf", "wb") as f:
    f.write(res.content)

Generate PDF (JSON response)

POST /v1/pdf/generate/json

Same parameters as above but returns JSON metadata instead of binary data.

{
  "success": true,
  "data": { "file_size_bytes": 24576, "pages": 1, "download_url": "..." },
  "meta": { "request_id": "...", "render_time_ms": 12, "credits_used": 1 }
}

Image Processing

Live

Resize, compress, and convert images. Send images as base64-encoded data. Returns binary image data. Each call costs 1 credit.

Resize Image

POST /v1/image/resize
ParameterTypeRequiredDescription
imagestringYesBase64-encoded image data
widthintegerNoTarget width in pixels
heightintegerNoTarget height in pixels
output_formatstringNopng, jpeg, webp
options.maintain_aspectboolNoMaintain aspect ratio (default: true)
curl -X POST https://cloud.mdmsolutions.biz/v1/image/resize \
  -H "Authorization: Bearer pk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"image": "iVBORw0KGg...", "width": 800, "output_format": "webp"}' \
  --output resized.webp

Compress Image

POST /v1/image/compress
ParameterTypeRequiredDescription
imagestringYesBase64-encoded image data
options.qualityintegerNoQuality 1–100 (default: 80)
output_formatstringNopng, jpeg, webp

Convert Image Format

POST /v1/image/convert
ParameterTypeRequiredDescription
imagestringYesBase64-encoded image data
output_formatstringYespng, jpeg, webp
options.qualityintegerNoQuality 1–100 (for lossy formats)

Data Transform

Live

Convert between JSON, CSV, XML, and YAML in any direction. 1 credit per transformation.

POST /v1/data/transform
ParameterTypeRequiredDescription
datastringYesInput data as a string
inputstringYesjson, csv, xml, yaml
outputstringYesjson, csv, xml, yaml
options.headersboolNoCSV has headers (default: true)
options.delimiterstringNoCSV delimiter (default: ,)
curl -X POST https://cloud.mdmsolutions.biz/v1/data/transform \
  -H "Authorization: Bearer pk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "data": "name,age\nAlice,30\nBob,25",
    "input": "csv",
    "output": "json"
  }'
{
  "success": true,
  "data": {
    "input_format": "csv",
    "output_format": "json",
    "rows_processed": 2,
    "result": [{"name": "Alice", "age": "30"}, {"name": "Bob", "age": "25"}]
  }
}

QR & Barcode

Live

Generate QR codes and barcodes. Returns binary image data (PNG or SVG). 1 credit each.

Generate QR Code

POST /v1/qr/generate
ParameterTypeRequiredDescription
datastringYesContent to encode (URL, text, etc.)
sizeintegerNoSize in pixels (default: 256)
formatstringNopng (default) or svg
error_correctionstringNoL, M (default), Q, H
foregroundstringNoForeground hex color (e.g. #000000)
backgroundstringNoBackground hex color (e.g. #FFFFFF)
curl -X POST https://cloud.mdmsolutions.biz/v1/qr/generate \
  -H "Authorization: Bearer pk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"data": "https://mdmsolutions.biz", "size": 512, "format": "png"}' \
  --output qrcode.png

Generate Barcode

POST /v1/barcode/generate
ParameterTypeRequiredDescription
datastringYesContent to encode
barcode_typestringNocode128 (default), ean13, upca
heightintegerNoBar height in pixels
bar_widthintegerNoBar width in pixels

Video Thumbnails

Live

Extract frames from videos or generate thumbnail grids. Send video as base64. Returns binary image. 1 credit each.

Extract Thumbnail

POST /v1/video/thumbnail
ParameterTypeRequiredDescription
videostringYesBase64-encoded video data
timestampfloatNoTimestamp in seconds (default: 0)
widthintegerNoOutput width
heightintegerNoOutput height
formatstringNopng (default), jpeg

Generate Thumbnail Grid

POST /v1/video/grid
ParameterTypeRequiredDescription
videostringYesBase64-encoded video data
grid_colsintegerNoColumns in grid (default: 3)
grid_rowsintegerNoRows in grid (default: 3)
widthintegerNoOutput width
formatstringNopng (default), jpeg

Markdown Conversion

Live

Convert GFM-compatible Markdown to PDF or HTML. Supports syntax highlighting, tables, and theming. 1 credit each.

Markdown to PDF

POST /v1/markdown/pdf
ParameterTypeRequiredDescription
markdownstringYesMarkdown content
themestringNoTheme name (e.g. github, dark)
page_sizestringNoA4 (default), Letter
marginfloatNoMargin in mm
landscapeboolNoLandscape orientation
curl -X POST https://cloud.mdmsolutions.biz/v1/markdown/pdf \
  -H "Authorization: Bearer pk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"markdown": "# Hello World\n\nThis is **bold** and `code`."}' \
  --output readme.pdf

Markdown to HTML

POST /v1/markdown/html

Same parameters as above. Returns JSON with rendered HTML string instead of binary PDF.

Webhooks

Receive real-time notifications when events occur. Webhook URLs must use HTTPS.

Create Webhook

POST /v1/webhooks
ParameterTypeRequiredDescription
urlstringYesHTTPS endpoint URL
eventsarrayYesEvents to subscribe to

Available events: batch.completed, credits.low, subscription.updated, api.error

curl -X POST https://cloud.mdmsolutions.biz/v1/webhooks \
  -H "Authorization: Bearer pk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/hook", "events": ["batch.completed"]}'

List Webhooks

GET /v1/webhooks

Delete Webhook

POST /v1/webhooks/:id (DELETE method)

Test Webhook

POST /v1/webhooks/:id/test

Sends a test payload to verify your webhook endpoint is receiving events correctly.

Batch Processing

Process multiple items in a single job. Deducts 1 credit per item upfront. Max 1,000 items per batch.

Create Batch Job

POST /v1/batch
ParameterTypeRequiredDescription
productstringYesProduct name (e.g. pdf, image, qr)
actionstringYesAction (e.g. generate, resize, compress)
itemsarrayYesArray of request bodies (1–1,000)
webhook_urlstringNoURL to notify when complete
curl -X POST https://cloud.mdmsolutions.biz/v1/batch \
  -H "Authorization: Bearer pk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "product": "qr",
    "action": "generate",
    "items": [
      {"data": "https://example.com/1"},
      {"data": "https://example.com/2"}
    ],
    "webhook_url": "https://example.com/hook"
  }'
{
  "success": true,
  "data": {
    "job_id": "batch-550e8400...",
    "status": "processing",
    "items_total": 2,
    "items_completed": 0
  }
}

List Batch Jobs

GET /v1/batch

Get Batch Job

GET /v1/batch/:id

File Storage

Upload and retrieve files. Files expire after 30 days by default.

Upload File

POST /v1/files/upload
ParameterTypeRequiredDescription
datastringYesBase64-encoded file data
filenamestringYesFile name with extension
content_typestringYesMIME type (e.g. application/pdf)

List Files

GET /v1/files

Download File

GET /v1/files/:id

Custom Fonts

Upload custom fonts to use in PDF generation. Fonts are stored per-account.

Upload Font

POST /v1/fonts
ParameterTypeRequiredDescription
datastringYesBase64-encoded font file (TTF/OTF)
namestringYesFont display name
familystringYesCSS font-family name
weightstringNoFont weight (e.g. 400, 700)
stylestringNonormal or italic

List Fonts

GET /v1/fonts

Delete Font

POST /v1/fonts/:id (DELETE method)

Usage Analytics

GET /v1/usage

Get your current credit usage, per-product breakdown, and daily usage history.

{
  "success": true,
  "data": {
    "credits_used": 1234,
    "credits_limit": 25000,
    "credits_remaining": 23766,
    "by_product": [
      { "product": "pdf", "requests": 500, "credits_used": 500, "avg_render_time_ms": 38 },
      { "product": "image", "requests": 300, "credits_used": 300, "avg_render_time_ms": 22 },
      { "product": "qr", "requests": 200, "credits_used": 200, "avg_render_time_ms": 1 }
    ],
    "daily_usage": [
      { "date": "2026-01-15", "requests": 150, "credits_used": 150 }
    ]
  }
}

Billing & Subscriptions

List Plans

GET /v1/billing/plans

Public endpoint — no authentication required. Returns all available plans with pricing.

Subscribe to Plan

POST /v1/billing/subscribe
ParameterTypeRequiredDescription
planstringYesPlan name: starter, growth, business

Get Subscription

GET /v1/billing/subscription

Cancel Subscription

POST /v1/billing/subscription (DELETE method)

Health Check

GET /health

Public endpoint — no authentication required. Returns platform status and product availability.

curl https://cloud.mdmsolutions.biz/health
{
  "status": "operational",
  "version": "0.1.0",
  "uptime_seconds": 86400,
  "products": [
    { "name": "pdf", "status": "active" },
    { "name": "image", "status": "active" },
    { "name": "data_transform", "status": "active" },
    { "name": "qr_barcode", "status": "active" },
    { "name": "video_thumbnails", "status": "active" },
    { "name": "markdown", "status": "active" }
  ]
}