Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl --request POST \
--url https://api.markdown2pdf.ai/markdown \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"text_body": "<string>",
"meta": {
"author": "<string>",
"title": "<string>",
"subtitle": "<string>",
"disclaimer": "<string>",
"date": "<string>"
}
},
"options": {
"document_name": "<string>"
}
}
'import requests
url = "https://api.markdown2pdf.ai/markdown"
payload = {
"data": {
"text_body": "<string>",
"meta": {
"author": "<string>",
"title": "<string>",
"subtitle": "<string>",
"disclaimer": "<string>",
"date": "<string>"
}
},
"options": { "document_name": "<string>" }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
text_body: '<string>',
meta: {
author: '<string>',
title: '<string>',
subtitle: '<string>',
disclaimer: '<string>',
date: '<string>'
}
},
options: {document_name: '<string>'}
})
};
fetch('https://api.markdown2pdf.ai/markdown', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.markdown2pdf.ai/markdown",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'text_body' => '<string>',
'meta' => [
'author' => '<string>',
'title' => '<string>',
'subtitle' => '<string>',
'disclaimer' => '<string>',
'date' => '<string>'
]
],
'options' => [
'document_name' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.markdown2pdf.ai/markdown"
payload := strings.NewReader("{\n \"data\": {\n \"text_body\": \"<string>\",\n \"meta\": {\n \"author\": \"<string>\",\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"disclaimer\": \"<string>\",\n \"date\": \"<string>\"\n }\n },\n \"options\": {\n \"document_name\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.markdown2pdf.ai/markdown")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"text_body\": \"<string>\",\n \"meta\": {\n \"author\": \"<string>\",\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"disclaimer\": \"<string>\",\n \"date\": \"<string>\"\n }\n },\n \"options\": {\n \"document_name\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.markdown2pdf.ai/markdown")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"text_body\": \"<string>\",\n \"meta\": {\n \"author\": \"<string>\",\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"disclaimer\": \"<string>\",\n \"date\": \"<string>\"\n }\n },\n \"options\": {\n \"document_name\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"status_meta": "<string>",
"progress": 0.5,
"path": "<string>"
}{
"version": "<string>",
"payment_request_url": "<string>",
"payment_context_token": "<string>",
"offers": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>",
"amount": 123,
"currency": "<string>",
"payment_methods": [
"<string>"
],
"type": "<string>"
}
],
"terms_url": "<string>",
"metadata": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}This endpoint allows you to generate a PDF document from Markdown input. It requires payment before processing the request. The request body should include the Markdown content and metadata.
curl --request POST \
--url https://api.markdown2pdf.ai/markdown \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"text_body": "<string>",
"meta": {
"author": "<string>",
"title": "<string>",
"subtitle": "<string>",
"disclaimer": "<string>",
"date": "<string>"
}
},
"options": {
"document_name": "<string>"
}
}
'import requests
url = "https://api.markdown2pdf.ai/markdown"
payload = {
"data": {
"text_body": "<string>",
"meta": {
"author": "<string>",
"title": "<string>",
"subtitle": "<string>",
"disclaimer": "<string>",
"date": "<string>"
}
},
"options": { "document_name": "<string>" }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
text_body: '<string>',
meta: {
author: '<string>',
title: '<string>',
subtitle: '<string>',
disclaimer: '<string>',
date: '<string>'
}
},
options: {document_name: '<string>'}
})
};
fetch('https://api.markdown2pdf.ai/markdown', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.markdown2pdf.ai/markdown",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'text_body' => '<string>',
'meta' => [
'author' => '<string>',
'title' => '<string>',
'subtitle' => '<string>',
'disclaimer' => '<string>',
'date' => '<string>'
]
],
'options' => [
'document_name' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.markdown2pdf.ai/markdown"
payload := strings.NewReader("{\n \"data\": {\n \"text_body\": \"<string>\",\n \"meta\": {\n \"author\": \"<string>\",\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"disclaimer\": \"<string>\",\n \"date\": \"<string>\"\n }\n },\n \"options\": {\n \"document_name\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.markdown2pdf.ai/markdown")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"text_body\": \"<string>\",\n \"meta\": {\n \"author\": \"<string>\",\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"disclaimer\": \"<string>\",\n \"date\": \"<string>\"\n }\n },\n \"options\": {\n \"document_name\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.markdown2pdf.ai/markdown")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"text_body\": \"<string>\",\n \"meta\": {\n \"author\": \"<string>\",\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"disclaimer\": \"<string>\",\n \"date\": \"<string>\"\n }\n },\n \"options\": {\n \"document_name\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"status_meta": "<string>",
"progress": 0.5,
"path": "<string>"
}{
"version": "<string>",
"payment_request_url": "<string>",
"payment_context_token": "<string>",
"offers": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>",
"amount": 123,
"currency": "<string>",
"payment_methods": [
"<string>"
],
"type": "<string>"
}
],
"terms_url": "<string>",
"metadata": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Once paid, a 200 OK response will be returned with the job status, and details on how to poll for updates.
