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
}| Status | Meaning |
|---|---|
400 | Bad request — invalid parameters |
401 | Unauthorized — missing or invalid API key |
402 | Insufficient credits |
404 | Not found |
429 | Rate limited — slow down |
500 | Internal server error |
Rate Limits
Rate limits are enforced per API key per minute. Exceeding returns 429 Too Many Requests.
| Plan | Limit |
|---|---|
| Free | 10 requests/min |
| Starter | 60 requests/min |
| Growth | 300 requests/min |
| Business | 1,000 requests/min |
| Enterprise | Custom |
Rate limit headers are returned in every response:
X-RateLimit-Limit: 60 X-RateLimit-Remaining: 54 X-RateLimit-Reset: 1712000060
Registration
Create a new account and receive your API key. No authentication required. The API key is shown only once.
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Account email address |
password | string | No | Account password (min 6 chars) |
name | string | No | Display 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
Authenticate with email and password to receive a JWT token. No API key required.
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Account email |
password | string | Yes | Account 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 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
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Label for the key (e.g. "Production") |
Rotate API Key
Invalidates the current key and returns a new one. The old key stops working immediately.
PDF Generation
Generate PDF from HTML
Convert HTML content or a Tera template to a high-quality PDF. Returns binary PDF data. Costs 1 credit.
| Parameter | Type | Required | Description |
|---|---|---|---|
html | string | Yes* | Raw HTML content to render |
template | string | Yes* | Tera template string (use with data) |
data | object | No | Template variables for Tera rendering |
options.page_size | string | No | A4 (default), Letter, Legal |
options.landscape | bool | No | Landscape orientation (default: false) |
options.margin | float | No | Page margin in mm (default: 20) |
options.header_html | string | No | HTML for page header |
options.footer_html | string | No | HTML for page footer |
font_id | string | No | Custom font ID (see Custom Fonts) |
* Provide either html or template + data
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.pdfconst 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)
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
Resize, compress, and convert images. Send images as base64-encoded data. Returns binary image data. Each call costs 1 credit.
Resize Image
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Yes | Base64-encoded image data |
width | integer | No | Target width in pixels |
height | integer | No | Target height in pixels |
output_format | string | No | png, jpeg, webp |
options.maintain_aspect | bool | No | Maintain 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.webpCompress Image
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Yes | Base64-encoded image data |
options.quality | integer | No | Quality 1–100 (default: 80) |
output_format | string | No | png, jpeg, webp |
Convert Image Format
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Yes | Base64-encoded image data |
output_format | string | Yes | png, jpeg, webp |
options.quality | integer | No | Quality 1–100 (for lossy formats) |
Data Transform
Convert between JSON, CSV, XML, and YAML in any direction. 1 credit per transformation.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Input data as a string |
input | string | Yes | json, csv, xml, yaml |
output | string | Yes | json, csv, xml, yaml |
options.headers | bool | No | CSV has headers (default: true) |
options.delimiter | string | No | CSV 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
Generate QR codes and barcodes. Returns binary image data (PNG or SVG). 1 credit each.
Generate QR Code
| Parameter | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Content to encode (URL, text, etc.) |
size | integer | No | Size in pixels (default: 256) |
format | string | No | png (default) or svg |
error_correction | string | No | L, M (default), Q, H |
foreground | string | No | Foreground hex color (e.g. #000000) |
background | string | No | Background 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.pngGenerate Barcode
| Parameter | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Content to encode |
barcode_type | string | No | code128 (default), ean13, upca |
height | integer | No | Bar height in pixels |
bar_width | integer | No | Bar width in pixels |
Video Thumbnails
Extract frames from videos or generate thumbnail grids. Send video as base64. Returns binary image. 1 credit each.
Extract Thumbnail
| Parameter | Type | Required | Description |
|---|---|---|---|
video | string | Yes | Base64-encoded video data |
timestamp | float | No | Timestamp in seconds (default: 0) |
width | integer | No | Output width |
height | integer | No | Output height |
format | string | No | png (default), jpeg |
Generate Thumbnail Grid
| Parameter | Type | Required | Description |
|---|---|---|---|
video | string | Yes | Base64-encoded video data |
grid_cols | integer | No | Columns in grid (default: 3) |
grid_rows | integer | No | Rows in grid (default: 3) |
width | integer | No | Output width |
format | string | No | png (default), jpeg |
Markdown Conversion
Convert GFM-compatible Markdown to PDF or HTML. Supports syntax highlighting, tables, and theming. 1 credit each.
Markdown to PDF
| Parameter | Type | Required | Description |
|---|---|---|---|
markdown | string | Yes | Markdown content |
theme | string | No | Theme name (e.g. github, dark) |
page_size | string | No | A4 (default), Letter |
margin | float | No | Margin in mm |
landscape | bool | No | Landscape 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.pdfMarkdown to 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
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | HTTPS endpoint URL |
events | array | Yes | Events 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
Delete Webhook
Test Webhook
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
| Parameter | Type | Required | Description |
|---|---|---|---|
product | string | Yes | Product name (e.g. pdf, image, qr) |
action | string | Yes | Action (e.g. generate, resize, compress) |
items | array | Yes | Array of request bodies (1–1,000) |
webhook_url | string | No | URL 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 Batch Job
File Storage
Upload and retrieve files. Files expire after 30 days by default.
Upload File
| Parameter | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Base64-encoded file data |
filename | string | Yes | File name with extension |
content_type | string | Yes | MIME type (e.g. application/pdf) |
List Files
Download File
Custom Fonts
Upload custom fonts to use in PDF generation. Fonts are stored per-account.
Upload Font
| Parameter | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Base64-encoded font file (TTF/OTF) |
name | string | Yes | Font display name |
family | string | Yes | CSS font-family name |
weight | string | No | Font weight (e.g. 400, 700) |
style | string | No | normal or italic |
List Fonts
Delete Font
Usage Analytics
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
Public endpoint — no authentication required. Returns all available plans with pricing.
Subscribe to Plan
| Parameter | Type | Required | Description |
|---|---|---|---|
plan | string | Yes | Plan name: starter, growth, business |
Get Subscription
Cancel Subscription
Health Check
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" }
]
}