API
The same tools as on the site, from your own code. Three steps: upload a file, create a job, take the result.
Access key
Create a key in your account and pass it as a header. The key is shown once at creation — save it right away.
Authorization: Bearer sk_ваш_ключIn a minute
1. Upload the file. The request body is the file itself, no multipart. The type is detected from content, not from the extension.
curl -X POST "https://formatika.app/api/v1/uploads?toolId=image.convert&filename=photo.png" \
-H "Authorization: Bearer $FORMATIKA_KEY" \
-H "Content-Type: application/octet-stream" \
--data-binary @photo.png
# {"id":"up_…","filename":"photo.png","mime":"image/png","bytes":820428}2. Create a job. Parameters are validated against the schema of the tool you named.
curl -X POST "https://formatika.app/api/v1/jobs" \
-H "Authorization: Bearer $FORMATIKA_KEY" \
-H "Content-Type: application/json" \
-d '{
"toolId": "image.convert",
"uploadIds": ["up_…"],
"params": { "format": "webp", "quality": 82 }
}'
# {"id":"job_…","status":"QUEUED","toolId":"image.convert","credits":0}3. Poll the status once a second. When it turns DONE, files carries the result links — signed and valid for 15 minutes.
curl "https://formatika.app/api/v1/jobs/job_…" -H "Authorization: Bearer $FORMATIKA_KEY"
# {"status":"DONE","progress":100,
# "files":[{"filename":"photo.webp","bytes":9352,"url":"/api/v1/files/…?exp=…&sig=…"}]}
curl -O -J "https://formatika.app/api/v1/files/…?exp=…&sig=…"The same from JavaScript
The @formatika/sdk package does all three steps in one call: uploads the file, queues the job, follows it and hands you the result. It runs anywhere fetch does — Node, Bun, Deno, edge. A key is optional: without one the same free allowance applies.
npm install @formatika/sdk
import { readFile, writeFile } from 'node:fs/promises'
import { Formatika } from '@formatika/sdk'
const formatika = new Formatika({ apiKey: process.env.FORMATIKA_API_KEY })
const result = await formatika.run({
tool: 'image.convert',
files: { filename: 'photo.heic', data: await readFile('photo.heic') },
params: { format: 'webp', quality: 82 },
onProgress: (percent) => console.log(percent),
})
for (const file of result.files) {
await writeFile(file.filename, await file.download())
}Allowances and credits
Free: 10 jobs a day without an account, 50 with one. Beyond that a job costs credits; signing up grants 50. The credits field of the response says what was charged.
Tools
image.convertImage converter- Accepts:
- image/*, .heic, .heif, .avif
- Limit:
- 30 × 50 MB
Parameters
format· enum (jpeg | png | webp | avif | tiff)quality· number · default 82resize· group · optionalstripMetadata· boolean · default true
image.resizeResize image- Accepts:
- image/*, .heic, .heif, .avif
- Limit:
- 30 × 50 MB
Parameters
width· number · optionalheight· number · optionalfit· enum (inside | cover | contain) · default "inside"format· enum (same | jpeg | png | webp) · default "same"quality· number · default 85
image.compressCompress image- Accepts:
- image/*, .heic, .heif, .avif
- Limit:
- 30 × 50 MB
Parameters
targetKb· number · optionalquality· number · default 75format· enum (same | jpeg | webp) · default "same"maxWidth· number · optional
image.cropCrop image- Accepts:
- image/*, .heic, .heif, .avif
- Limit:
- 30 × 50 MB
Parameters
aspect· enum (1:1 | 4:3 | 3:4 | 16:9 | 9:16 | 3:2 | 2:3) · default "1:1"position· enum (center | top | bottom | left | right) · default "center"format· enum (same | jpeg | png | webp) · default "same"quality· number · default 88
image.rotateRotate image- Accepts:
- image/*, .heic, .heif, .avif
- Limit:
- 30 × 50 MB
Parameters
angle· enum (0 | 90 | 180 | 270) · default "90"flipHorizontal· boolean · default falseflipVertical· boolean · default falseformat· enum (same | jpeg | png | webp) · default "same"
image.metadataRemove EXIF and location- Accepts:
- image/*, .heic, .heif, .avif
- Limit:
- 30 × 50 MB
Parameters
keepIcc· boolean · default true
image.paletteColour palette from an image- Accepts:
- image/*, .heic, .heif, .avif
- Limit:
- 10 × 50 MB
Parameters
colors· number · default 6
audio.convertAudio converter- Accepts:
- audio/*, .m4a, .opus, .aac, .wma
- Limit:
- 10 × 200 MB
Parameters
format· enum (mp3 | aac | opus | flac | wav | ogg)bitrateKbps· number · default 192mono· boolean · default falsesampleRate· enum (22050 | 44100 | 48000 | same) · default "same"
audio.extractExtract audio from video- Accepts:
- video/*, .mkv, .webm, .mov, .avi, .m4v
- Limit:
- 5 × 500 MB
Parameters
format· enum (same | mp3 | aac | opus | wav) · default "same"bitrateKbps· number · default 192
audio.trimTrim audio- Accepts:
- audio/*, .m4a, .opus, .aac
- Limit:
- 10 × 200 MB
Parameters
start· string · default "0"end· string · optionalreencode· boolean · default falsefade· boolean · default false
audio.normalizeNormalize loudness- Accepts:
- audio/*, .m4a, .opus, .aac
- Limit:
- 10 × 200 MB
Parameters
target· enum (-23 | -16 | -14) · default "-16"truePeak· number · default -1.5
audio.mergeMerge audio- Accepts:
- audio/*, .m4a, .opus, .aac
- Limit:
- 20 × 200 MB
Parameters
format· enum (same | mp3 | m4a | wav) · default "same"bitrateKbps· number · default 192
audio.silence-trimTrim silence- Accepts:
- audio/*, .m4a, .opus, .aac
- Limit:
- 10 × 200 MB
Parameters
thresholdDb· number · default -45keepMs· number · default 200
audio.tagsEdit audio tags- Accepts:
- audio/*, .m4a, .opus, .aac
- Limit:
- 20 × 200 MB
Parameters
title· string · optionalartist· string · optionalalbum· string · optionalyear· number · optionalclear· boolean · default false
video.convertConvert video- Accepts:
- video/*, .mp4, .mov, .mkv, .webm, .avi, .m4v
- Limit:
- 3 × 500 MB
Parameters
format· enum (mp4 | webm | mkv) · default "mp4"quality· number · default 24speed· enum (fast | balanced | small) · default "fast"
video.cropCrop video frame- Accepts:
- video/*, .mp4, .mov, .mkv, .webm, .avi, .m4v
- Limit:
- 3 × 500 MB
Parameters
aspect· enum (9:16 | 1:1 | 4:5 | 16:9 | 4:3) · default "9:16"position· enum (center | top | bottom | left | right) · default "center"quality· number · default 23
video.compressCompress video- Accepts:
- video/*, .mp4, .mov, .mkv, .webm, .avi, .m4v
- Limit:
- 2 × 500 MB
Parameters
targetMb· number · default 25audioKbps· number · default 96
video.resizeResize video- Accepts:
- video/*, .mp4, .mov, .mkv, .webm, .avi, .m4v
- Limit:
- 3 × 500 MB
Parameters
height· enum (1080p | 720p | 480p | 360p) · default "720p"quality· number · default 24
video.trimTrim video- Accepts:
- video/*, .mp4, .mov, .mkv, .webm, .avi, .m4v
- Limit:
- 3 × 500 MB
Parameters
from· string · default "0"to· string · default ""precise· boolean · default false
video.muteRemove audio from video- Accepts:
- video/*, .mp4, .mov, .mkv, .webm, .avi, .m4v
- Limit:
- 5 × 500 MB
Parameters
video.to-gifVideo to GIF- Accepts:
- video/*, .mp4, .mov, .mkv, .webm, .avi, .m4v
- Limit:
- 3 × 500 MB
Parameters
from· string · default "0"seconds· number · default 5width· number · default 480fps· number · default 12
video.subtitlesAdd subtitles to video- Accepts:
- video/*, .mp4, .mov, .mkv, .webm, .srt, .vtt, .ass, .ssa
- Limit:
- 2 × 500 MB
Parameters
mode· enum (burn | attach) · default "burn"fontSize· number · default 24
video.thumbnailVideo thumbnail- Accepts:
- video/*, .mp4, .mov, .mkv, .webm, .avi, .m4v
- Limit:
- 5 × 500 MB
Parameters
at· string · default ""format· enum (jpg | png | webp) · default "jpg"width· number · default 0
pdf.mergeMerge PDF- Accepts:
- application/pdf, .pdf
- Limit:
- 30 × 100 MB
Parameters
keepMetadata· boolean · default false
pdf.splitSplit PDF- Accepts:
- application/pdf, .pdf
- Limit:
- 5 × 100 MB
Parameters
mode· enum (ranges | each) · default "ranges"pages· string · default "1"
pdf.pagesRotate and delete PDF pages- Accepts:
- application/pdf, .pdf
- Limit:
- 10 × 100 MB
Parameters
rotate· enum (0 | 90 | 180 | 270) · default "0"remove· string · default ""rotatePages· string · default ""
pdf.from-imageImages to PDF- Accepts:
- image/*, .heic, .heif, .avif
- Limit:
- 50 × 50 MB
Parameters
pageSize· enum (fit | a4 | letter) · default "fit"marginMm· number · default 0quality· number · default 85
pdf.compressCompress PDF- Accepts:
- application/pdf, .pdf
- Limit:
- 10 × 100 MB
Parameters
preset· enum (screen | ebook | printer) · default "ebook"grayscale· boolean · default false
pdf.to-imagePDF to images- Accepts:
- application/pdf, .pdf
- Limit:
- 5 × 100 MB
Parameters
format· enum (jpeg | png) · default "jpeg"dpi· enum (72 | 150 | 300) · default "150"pages· string · default ""
pdf.to-textPDF to text- Accepts:
- application/pdf, .pdf
- Limit:
- 10 × 100 MB
Parameters
pages· string · default ""joinLines· boolean · default true
pdf.unlockUnlock PDF- Accepts:
- application/pdf, .pdf
- Limit:
- 10 × 100 MB
Parameters
password· string
pdf.protectPassword-protect PDF- Accepts:
- application/pdf, .pdf
- Limit:
- 10 × 100 MB
Parameters
password· stringallowPrinting· boolean · default true
text.subtitlesConvert subtitles- Accepts:
- .srt, .vtt, text/vtt, text/plain, application/x-subrip
- Limit:
- 20 × 5 MB
Parameters
format· enum (vtt | srt) · default "vtt"shiftMs· number · default 0
archive.zipCreate a ZIP- Accepts:
- */*
- Limit:
- 100 × 100 MB
Parameters
level· enum (fast | normal | max) · default "normal"
archive.unzipUnzip files- Accepts:
- application/zip, application/x-zip-compressed, .zip
- Limit:
- 5 × 100 MB
Parameters
data.convertCSV, JSON and YAML- Accepts:
- text/csv, text/tab-separated-values, application/json, application/yaml, text/yaml, .csv, .tsv, .json, .yaml, .yml
- Limit:
- 20 × 20 MB
Parameters
format· enum (csv | json | yaml) · default "json"
document.convertDocuments to PDF- Accepts:
- application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/vnd.oasis.opendocument.text, application/vnd.oasis.opendocument.spreadsheet, application/vnd.oasis.opendocument.presentation, application/rtf, .docx, .xlsx, .pptx, .doc, .xls, .ppt, .odt, .ods, .odp, .rtf, .txt
- Limit:
- 5 × 50 MB
Parameters
archival· boolean · default false
utility.hashFile checksum- Accepts:
- */*
- Limit:
- 20 × 500 MB
Parameters
algorithm· enum (md5 | sha1 | sha256 | sha512) · default "sha256"
utility.base64File to base64 and back- Accepts:
- */*
- Limit:
- 20 × 20 MB
Parameters
dataUri· boolean · default falselineBreaks· boolean · default false
image.for-webPhoto for a website- Accepts:
- image/*, .heic, .heif, .avif
- Limit:
- 30 × 50 MB
Parameters
document.for-emailDocument for sending- Accepts:
- application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/vnd.oasis.opendocument.text, application/vnd.oasis.opendocument.spreadsheet, application/vnd.oasis.opendocument.presentation, application/rtf, .docx, .xlsx, .pptx, .doc, .xls, .ppt, .odt, .ods, .odp, .rtf, .txt
- Limit:
- 5 × 50 MB
Parameters
video.for-messengerVideo for a messenger- Accepts:
- video/*, .mp4, .mov, .mkv, .webm, .avi, .m4v
- Limit:
- 2 × 500 MB
Parameters
video.for-shortsVideo for shorts- Accepts:
- video/*, .mp4, .mov, .mkv, .webm, .avi, .m4v
- Limit:
- 3 × 500 MB
Parameters
Errors
You get a code, not a message: you compose the text yourself, in your own language. The HTTP status matches the code.
Full OpenAPI specificationJavaScript library — the same round trip in one call