File processing API.
Files must be available to our processing servers through direct HTTP/HTTPS URLs for the duration of the job. For sensitive files, prefer short-lived signed URLs instead of broadly accessible links.
Submitted files or file URLs are processed only to provide the requested conversion. Files are temporary and automatically deleted on a short retention schedule. Systems are designed to enforce deletion within approximately 60 minutes under normal operation. Do not submit sensitive or confidential data.
Authenticate
Pass API key via Authorization: Bearer ... or X-API-Key.
Send URLs
Use direct HTTP/HTTPS URLs that are available to our processing servers for the duration of the job. Submitted files or file URLs are processed only for the requested conversion. For sensitive files, prefer short-lived signed URLs.
Get Download URL
Response includes download_url and token usage details.
API Base Path
https://filemazing.com/api/v1
Endpoints
/api/v1/pdf-to-image/api/v1/pdf-to-image/estimate/api/v1/merge-pdf/api/v1/merge-pdf/estimate/api/v1/compress-image/api/v1/compress-image/estimate/api/v1/archive-extractor/api/v1/archive-extractor/estimate/api/v1/audio-converter/api/v1/audio-converter/estimate/api/v1/metadata-scrubber/api/v1/metadata-scrubber/estimate/api/v1/format-converter/api/v1/format-converter/estimate/api/v1/encrypt-file/api/v1/encrypt-file/estimateToken Estimate (Before Processing)
Call estimate endpoints first to preview token cost and check if user balance is enough before starting processing.
{
"inputs": ["https://example.com/file.pdf"],
"promo_code": "SPRING25",
"response_type": "json"
}
{
"ok": true,
"tool": "pdf-to-image",
"mode": "estimate",
"estimated_tokens": 3,
"available_tokens": 42,
"enough_tokens": true,
"shortfall_tokens": 0
}
Request/Response Basics
{
"inputs": ["https://example.com/file.pdf"],
"output_format": "jpg",
"response_type": "json",
"promo_code": ""
}
{
"ok": true,
"tool": "pdf-to-image",
"mode": "sync",
"status": "completed",
"download_url": "https://filemazing.com/tool/pdf-to-image/jobs/.../download",
"estimated_tokens": 1,
"final_tokens": 1
}
Code Samples (PDF to Image)
curl -X POST "https://filemazing.com/api/v1/pdf-to-image" \
-H "Authorization: Bearer fm_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"inputs": ["https://example.com/file.pdf"],
"output_format": "jpg",
"response_type": "json"
}'
const endpoint = "https://filemazing.com/api/v1/pdf-to-image";
const payload = {
inputs: ["https://example.com/file.pdf"],
output_format: "jpg",
response_type: "json"
};
const response = await fetch(endpoint, {
method: "POST",
headers: {
"Authorization": "Bearer fm_live_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
});
const data = await response.json();
console.log(data.download_url);
const endpoint = "https://filemazing.com/api/v1/pdf-to-image";
const payload = {
inputs: ["https://example.com/file.pdf"],
output_format: "png",
response_type: "json"
};
const res = await fetch(endpoint, {
method: "POST",
headers: {
Authorization: "Bearer fm_live_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
});
const json = await res.json();
console.log(json.download_url);
$payload = [
"inputs" => ["https://example.com/file.pdf"],
"output_format" => "webp",
"response_type" => "json",
];
$ch = curl_init("https://filemazing.com/api/v1/pdf-to-image");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer fm_live_your_api_key",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_RETURNTRANSFER => true,
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
echo $data["download_url"] ?? "";
import json
from urllib.request import Request, urlopen
url = "https://filemazing.com/api/v1/pdf-to-image"
payload = json.dumps({
"inputs": ["https://example.com/file.pdf"],
"output_format": "jpg",
"response_type": "json"
}).encode("utf-8")
req = Request(url, data=payload, method="POST")
req.add_header("Authorization", "Bearer fm_live_your_api_key")
req.add_header("Content-Type", "application/json")
with urlopen(req) as res:
data = json.loads(res.read().decode("utf-8"))
print(data.get("download_url"))
String endpoint = "https://filemazing.com/api/v1/pdf-to-image";
String body = "{\"inputs\":[\"https://example.com/file.pdf\"],\"output_format\":\"jpg\",\"response_type\":\"json\"}";
HttpURLConnection con = (HttpURLConnection) new URL(endpoint).openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Authorization", "Bearer fm_live_your_api_key");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
con.getOutputStream().write(body.getBytes(StandardCharsets.UTF_8));
String response = new String(con.getInputStream().readAllBytes(), StandardCharsets.UTF_8);
System.out.println(response);
using System.Net.Http.Headers;
using System.Text;
var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "fm_live_your_api_key");
var json = """
{
"inputs": ["https://example.com/file.pdf"],
"output_format": "jpg",
"response_type": "json"
}
""";
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://filemazing.com/api/v1/pdf-to-image", content);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
Code Samples (Estimate - PDF to Image)
curl -X POST "https://filemazing.com/api/v1/pdf-to-image/estimate" \
-H "Authorization: Bearer fm_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"inputs": ["https://example.com/file.pdf"],
"promo_code": "",
"response_type": "json"
}'
const endpoint = "https://filemazing.com/api/v1/pdf-to-image/estimate";
const payload = {
inputs: ["https://example.com/file.pdf"],
promo_code: "",
response_type: "json"
};
const response = await fetch(endpoint, {
method: "POST",
headers: {
"Authorization": "Bearer fm_live_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
});
const data = await response.json();
console.log(data.estimated_tokens, data.enough_tokens);
const endpoint = "https://filemazing.com/api/v1/pdf-to-image/estimate";
const payload = {
inputs: ["https://example.com/file.pdf"],
promo_code: "",
response_type: "json"
};
const res = await fetch(endpoint, {
method: "POST",
headers: {
Authorization: "Bearer fm_live_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
});
const json = await res.json();
console.log(json.estimated_tokens, json.available_tokens);
$payload = [
"inputs" => ["https://example.com/file.pdf"],
"promo_code" => "",
"response_type" => "json",
];
$ch = curl_init("https://filemazing.com/api/v1/pdf-to-image/estimate");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer fm_live_your_api_key",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_RETURNTRANSFER => true,
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
echo $data["estimated_tokens"] ?? "";
import json
from urllib.request import Request, urlopen
url = "https://filemazing.com/api/v1/pdf-to-image/estimate"
payload = json.dumps({
"inputs": ["https://example.com/file.pdf"],
"promo_code": "",
"response_type": "json"
}).encode("utf-8")
req = Request(url, data=payload, method="POST")
req.add_header("Authorization", "Bearer fm_live_your_api_key")
req.add_header("Content-Type", "application/json")
with urlopen(req) as res:
data = json.loads(res.read().decode("utf-8"))
print(data.get("estimated_tokens"), data.get("enough_tokens"))
String endpoint = "https://filemazing.com/api/v1/pdf-to-image/estimate";
String body = "{\"inputs\":[\"https://example.com/file.pdf\"],\"promo_code\":\"\",\"response_type\":\"json\"}";
HttpURLConnection con = (HttpURLConnection) new URL(endpoint).openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Authorization", "Bearer fm_live_your_api_key");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
con.getOutputStream().write(body.getBytes(StandardCharsets.UTF_8));
String response = new String(con.getInputStream().readAllBytes(), StandardCharsets.UTF_8);
System.out.println(response);
using System.Net.Http.Headers;
using System.Text;
var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "fm_live_your_api_key");
var json = """
{
"inputs": ["https://example.com/file.pdf"],
"promo_code": "",
"response_type": "json"
}
""";
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://filemazing.com/api/v1/pdf-to-image/estimate", content);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);