API Documentation
Convert files programmatically using our powerful REST API. Support for video, audio, image, and document conversions.
https://api.convertintomp4.com/v1Introduction
Welcome to the ConvertIntoMP4 API! Our REST API allows you to convert files between formats programmatically. The API uses a task-based architecture where each operation (import, convert, export) is a task that can be combined into jobs for complex workflows.
Base URL
https://api.convertintomp4.com/v1Request Format
- All requests must include
Content-Type: application/jsonheader - All requests must include authentication via Bearer token
- Request bodies should be valid JSON
Response Format
{
"success": true,
"data": { ... },
"meta": {
"requestId": "req_abc123",
"timestamp": "2026-02-15T10:30:00Z"
}
}Authentication
Most conversion endpoints work without authentication (anonymous users get 5 conversions/day). Authenticated users get higher quotas based on their plan. API keys can be created in your dashboard at https://convertintomp4.com/account/api.
API Key Header
Include your API key in the X-Api-Key header:
curl https://api.convertintomp4.com/v1/jobs \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"You can also use Authorization: Bearer YOUR_API_KEY as an alternative.
API Scopes
| Scope | Description |
|---|---|
| CONVERT_READ | View conversion jobs, formats, and download completed files |
| CONVERT_WRITE | Create conversions, upload files, and manage jobs |
| WEBHOOKS_MANAGE | Create, update, and delete webhook subscriptions |
| ACCOUNT_READ | View account information, usage statistics, and quotas |
Quick Start
Step 1: Get Your API Key
Sign up at convertintomp4.com/register and create an API key in your dashboard.
Step 2: Make Your First Conversion
Create a job that imports a file from URL, converts it, and exports a download link:
# Simple file conversion (recommended for most use cases)
curl -X POST https://api.convertintomp4.com/v1/convert \
-H "X-Api-Key: ck_your_api_key" \
-F "[email protected]" \
-F "targetFormat=mp4" \
-F "quality=high" \
-F "codec=h264"
# Advanced: Multi-step job pipeline (import -> convert -> export)
curl -X POST https://api.convertintomp4.com/v1/jobs \
-H "X-Api-Key: ck_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"tasks": {
"import-file": {
"operation": "import/url",
"url": "https://example.com/video.mov"
},
"convert-file": {
"operation": "convert",
"input": "import-file",
"output_format": "mp4",
"options": { "quality": "high" }
},
"export-file": {
"operation": "export/url",
"input": "convert-file"
}
}
}'Step 3: Check Job Status
curl https://api.convertintomp4.com/v1/jobs/job_abc123def456 \
-H "X-Api-Key: ck_your_api_key"Step 4: Download the Result
Once complete, the export task contains a download URL:
{
"tasks": {
"export-file": {
"status": "completed",
"result": {
"url": "https://files.convertintomp4.com/abc123/output.mp4",
"expires_at": "2026-02-16T10:30:00Z"
}
}
}
}Tasks
Tasks are the building blocks of file processing within jobs. Each task performs a single operation. Task data is returned as part of GET /v1/jobs/:jobId — there are no standalone task endpoints.
Task Types
| Type | Operation | Description |
|---|---|---|
| Import | import/url | Import file from URL |
| Import | import/upload | Direct file upload |
| Import | import/base64 | Import from base64 string |
| Process | convert | Convert file format |
| Process | compress | Optimize/compress file |
| Process | merge | Merge multiple files |
| Export | export/url | Generate download URL |
Task Status
pending- Task is waiting to be processedprocessing- Task is currently being processedcompleted- Task finished successfullyfailed- Task encountered an errorcancelled- Task was cancelled
Jobs
Jobs allow you to combine multiple tasks into a single workflow. This is the recommended way to perform conversions as it allows you to chain operations and handle the entire workflow with a single API call.
Job Structure
A job contains named tasks that reference each other:
{
"tasks": {
"import-1": {
"operation": "import/url",
"url": "https://example.com/file.mov"
},
"convert-1": {
"operation": "convert",
"input": "import-1",
"output_format": "mp4"
},
"export-1": {
"operation": "export/url",
"input": "convert-1"
}
}
}Convert
The convert operation transforms files from one format to another.
Supported Formats
video
Input:
mp4, mov, avi, mkv, webm, wmv, flv, m4v, 3gp, mpeg, mts, ogv, vob, ts, m2ts, f4v, divx, xvid, swf, asf
Output:
mp4, mov, avi, mkv, webm, wmv, flv, m4v, 3gp, mpeg, ogv, gif, ts, mpg, vob, mts, m2ts, f4v, swf, asf
audio
Input:
mp3, wav, flac, aac, ogg, m4a, wma, aiff, opus, alac, amr, ac3, dts, caf, au, midi, mid, m4b, spx, wv
Output:
mp3, wav, flac, aac, ogg, m4a, wma, aiff, opus, alac, amr, ac3, caf, au, m4b, spx, wv, dts, 3ga, oga
image
Input:
jpg, png, gif, webp, bmp, tiff, svg, heic, ico, psd, eps, avif, raw, cr2, cr3, nef, arw, dng, tga, hdr
Output:
jpg, png, gif, webp, bmp, tiff, svg, ico, avif, pdf, eps, psd, tga, hdr, exr, dds, pcx, apng, svgz, heic
document
Input:
pdf, docx, doc, xlsx, xls, pptx, ppt, odt, ods, odp, txt, rtf, html, csv, md, epub, mobi, tex, rst, xml
Output:
pdf, docx, doc, xlsx, xls, pptx, ppt, odt, ods, odp, txt, rtf, html, csv, epub, mobi, azw3, fb2, md, tex
archive
Input:
zip, rar, 7z, tar, gz, bz2, xz
Output:
zip, 7z, tar, gz, bz2, xz, tgz
Video Options
| Option | Type | Description |
|---|---|---|
| quality | string | low, medium, high, highest |
| resolution | string | 480p, 720p, 1080p, 4k |
| codec | string | h264, h265, vp9 |
| fps | integer | Frame rate (1-60) |
| bitrate | string | Video bitrate (e.g., 2M, 5M) |
Import Files
Import operations are task types within jobs. You can also use the standalone POST /v1/import/url endpoint for simple URL imports.
Import from URL (as job task)
{
"operation": "import/url",
"url": "https://example.com/file.mp4",
"filename": "my-video.mp4"
}Export Files
Export operations are task types within jobs. After conversion, use an export task to generate a download URL.
Export to URL (as job task)
{
"operation": "export/url",
"input": "convert-task-name"
}The result includes a download URL that expires after 24 hours.
Webhooks
Webhooks allow you to receive real-time notifications when jobs complete or fail.
Events
Job Events
job.created- Job createdjob.queued- Job queued for processingjob.started- Processing startedjob.progress- Progress updatejob.completed- Completed successfullyjob.failed- Processing failedjob.cancelled- Cancelled by userjob.expired- Expired (TTL reached)
File & Account Events
file.uploaded- File uploadedfile.downloaded- File downloadedfile.deleted- File deletedsubscription.created- New subscriptionsubscription.updated- Plan changedsubscription.cancelled- Cancelledquota.warning- Quota near limitquota.exceeded- Quota exceeded
Webhook Payload
{
"event": "job.completed",
"timestamp": "2026-02-15T10:31:23Z",
"job": {
"id": "job_abc123",
"status": "completed",
"tasks": {
"export-file": {
"status": "completed",
"result": {
"url": "https://files.convertintomp4.com/abc123/output.mp4"
}
}
}
}
}Signature Verification
Verify webhooks using HMAC-SHA256:
const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
const expected = 'sha256=' + crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}Zapier & Make Integration
Connect ConvertIntoMP4 webhooks to Zapier or Make (Integromat) for automated workflows — no coding required.
Zapier Setup
- In Zapier, create a new Zap with Webhooks by Zapier as the trigger
- Select Catch Hook as the trigger event
- Copy the webhook URL Zapier gives you
- In your ConvertIntoMP4 dashboard, go to API Keys → Webhooks → Create Webhook
- Paste the Zapier URL, select your events (e.g.,
job.completed) - Click Test Webhook to send a sample payload to Zapier
- In Zapier, add your action (Google Sheets, Slack, email, etc.)
Make (Integromat) Setup
- In Make, create a new scenario with Webhooks → Custom webhook as the trigger
- Click Add to create a new webhook and copy the URL
- In your ConvertIntoMP4 dashboard, create a webhook with the Make URL
- Click Test Webhook to send a sample — Make will auto-detect the payload structure
- Add your modules (Google Drive, Dropbox, Notion, etc.)
Popular automations: save converted files to cloud storage, notify teams on Slack when conversions complete, log conversion history to spreadsheets, trigger follow-up processing pipelines.
Errors
The API uses standard HTTP status codes and returns detailed error information.
Error Response
{
"success": false,
"error": {
"code": "INVALID_INPUT",
"message": "The request contains invalid data",
"details": {
"field": "output_format",
"error": "Unsupported format"
}
}
}| Code | Status | Description |
|---|---|---|
| INVALID_API_KEY | 401 | The provided API key is invalid, expired, or has been revoked. |
| AUTHENTICATION_REQUIRED | 401 | This endpoint requires authentication. Provide an API key via X-Api-Key header or Bearer token. |
| INSUFFICIENT_PERMISSIONS | 403 | Your API key does not have the required permissions for this operation. Check the key's scopes in your dashboard. |
| RATE_LIMITED | 429 | You have exceeded the rate limit (60 requests/min per API key). Check X-RateLimit-Reset header for when to retry. |
| INVALID_INPUT | 400 | The request body contains invalid data. Check the errors field for Zod validation details. |
| INVALID_REQUEST | 400 | The request is malformed or missing required fields. Verify content type and body format. |
| FILE_TOO_LARGE | 413 | The uploaded file exceeds the maximum allowed size for your plan (Free: 100MB, Pro: 2GB, Enterprise: 2GB). |
| UNSUPPORTED_FORMAT | 422 | The specified format is not recognized. Use GET /v1/formats for the full list of 268 supported formats. |
| UNSUPPORTED_CONVERSION | 422 | The source-to-target format pair is not supported. Use GET /v1/formats/conversions to check available pairs. |
| FORMAT_NOT_FOUND | 404 | The specified format ID does not exist in the format registry. |
| JOB_NOT_FOUND | 404 | The specified job ID does not exist or has expired. |
| TASK_NOT_FOUND | 404 | The specified task within the job does not exist. |
| CONVERSION_FAILED | 500 | The conversion process encountered an internal error (FFmpeg, Sharp, LibreOffice, etc.). Check the job details for error messages. |
| CORRUPT_FILE | 400 | The uploaded file is corrupt or unreadable. Pre-queue validation (ffprobe/Sharp) detected an integrity issue. |
| TIMEOUT | 408 | The operation exceeded its timeout (video: 30min, image: 2min, document: 10min, archive: 15min, merge: 45min). |
| INSUFFICIENT_DISK_SPACE | 503 | The server has less than 10GB free disk space. Try again later or contact support. |
| STORAGE_NOT_CONFIGURED | 503 | R2 object storage is not configured on this instance. Contact the administrator. |
| NO_FILES | 400 | The request did not include any files. Attach a file via multipart form data. |
| FILE_GONE | 410 | The converted file has been deleted. Output files are cleaned up after the retention period. |
| EXPIRED | 401 | The HMAC-signed download URL has expired. Generate a new signed URL via POST /v1/download/signed. |
Rate Limits
Rate limits vary by plan. When you exceed the rate limit, you'll receive a 429 status code with a Retry-After header.
anonymous
- Requests
- 5/day
- Max file size
- 100MB
- Files per job
- 1
- Concurrent jobs
- 1
free
- Requests
- 5/day
- Max file size
- 100MB
- Files per job
- 5
- Concurrent jobs
- 1
pro
- Requests
- 100/day
- Max file size
- 2GB
- Files per job
- 20
- Concurrent jobs
- 5
enterprise
- Requests
- 1000/day
- Max file size
- 2GB
- Files per job
- 50
- Concurrent jobs
- 20
Sandbox EnvironmentComing Soon
A dedicated sandbox environment for risk-free testing is planned but not yet available. In the meantime, you can test with the production API using the free tier (5 conversions/day, no API key required).
Production base URL: https://api.convertintomp4.com/v1
PDF Operations
Dedicated endpoints for advanced PDF processing. All PDF operations are also available as task types within jobs.
Available Operations
| Endpoint | Description |
|---|---|
| POST /v1/pdf/ocr | Extract text from scanned PDFs using OCR |
| POST /v1/pdf/split | Split a PDF into multiple files by page ranges |
| POST /v1/pdf/merge | Merge multiple PDFs into a single file |
| POST /v1/pdf/encrypt | Add password protection to a PDF |
| POST /v1/pdf/decrypt | Remove password protection from a PDF |
| POST /v1/pdf/rotate | Rotate pages in a PDF |
| POST /v1/pdf/compress | Optimize PDF file size |
| POST /v1/pdf/to-pdfa | Convert to PDF/A archival format |
| POST /v1/pdf/extract-pages | Extract specific pages from a PDF |
| POST /v1/pdf/watermark | Add text or image watermark |
Example: OCR a PDF
curl -X POST https://api.convertintomp4.com/v1/pdf/ocr \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file": "https://example.com/scanned-doc.pdf",
"language": "eng",
"output_format": "pdf-searchable"
}'Example: Merge PDFs
{
"files": [
"https://example.com/part1.pdf",
"https://example.com/part2.pdf",
"https://example.com/part3.pdf"
],
"output_filename": "merged.pdf"
}Example: Encrypt PDF
{
"file": "https://example.com/document.pdf",
"password": "secure-password-123",
"permissions": {
"printing": true,
"copying": false,
"modifying": false
}
}Cloud Storage
Import and export files directly from your cloud storage providers. We support Amazon S3, Azure Blob Storage, Google Cloud Storage, and SFTP.
Supported Providers
Amazon S3
import/s3, export/s3
Azure Blob Storage
import/azure, export/azure
Google Cloud Storage
import/gcs, export/gcs
SFTP
import/sftp, export/sftp
Azure Blob Storage
{
"operation": "import/azure",
"storage_account": "myaccount",
"container": "my-container",
"blob": "path/to/file.mp4",
"sas_token": "sv=2023-01-03&st=...&sig=..."
}Google Cloud Storage
{
"operation": "import/gcs",
"bucket": "my-bucket",
"project_id": "my-project-id",
"key": "path/to/file.mp4",
"credentials": {
"type": "service_account",
"project_id": "my-project-id",
"private_key": "..."
}
}SFTP
{
"operation": "import/sftp",
"host": "sftp.example.com",
"port": 22,
"username": "user",
"private_key": "-----BEGIN RSA PRIVATE KEY-----...",
"path": "/uploads/video.mp4"
}Crop & Trim
Crop video frames or trim audio/video to specific time ranges. Available as task operations within jobs.
Video Crop
Crop the video frame to a specific region:
{
"operation": "crop",
"input": "import-task",
"options": {
"x": 100,
"y": 50,
"width": 1280,
"height": 720
}
}Crop Options
| Option | Type | Description |
|---|---|---|
| x | integer | Left offset in pixels |
| y | integer | Top offset in pixels |
| width | integer | Crop width in pixels |
| height | integer | Crop height in pixels |
Audio/Video Trim
Trim media to a specific time range:
{
"operation": "trim",
"input": "import-task",
"options": {
"start_time": "00:01:30",
"end_time": "00:05:00"
}
}Trim Options
| Option | Type | Description |
|---|---|---|
| start_time | string | Start time (HH:MM:SS or seconds) |
| end_time | string | End time (HH:MM:SS or seconds) |
| duration | string | Duration from start (alternative to end_time) |
Format Queries
Query which formats are supported for each operation. Useful for building dynamic UIs that show available conversions.
Query by Operation
GET /v1/formats/query/convert
GET /v1/formats/query/compress
GET /v1/formats/query/crop
GET /v1/formats/query/trim
GET /v1/formats/query/mergeResponse
{
"success": true,
"data": [
{
"name": "mp4",
"category": "video",
"targets": ["mov", "avi", "mkv", "webm", "gif"]
},
{
"name": "jpg",
"category": "image",
"targets": ["png", "webp", "gif", "bmp", "tiff"]
}
]
}Postman Collection
Import our complete API collection into Postman for interactive testing. The collection includes all endpoints with pre-configured example requests and environment variables.
Collection Variables
| Variable | Default | Description |
|---|---|---|
| baseUrl | https://api.convertintomp4.com/v1 | API base URL |
| apiKey | YOUR_API_KEY | Your API key |
SDKs & Libraries
The official Node.js/TypeScript SDK is available on npm. Additional SDKs for other languages are in development. In the meantime, use the REST API directly with any HTTP client. See the cURL and language examples above.
JavaScriptAvailable
npm install convertintomp4PythonComing Soon
convertintomp4 (not yet published)
PHPComing Soon
convertintomp4/sdk (not yet published)
JavaComing Soon
com.convertintomp4:sdk (not yet published)
C#Coming Soon
ConvertIntoMP4.SDK (not yet published)
RubyComing Soon
convertintomp4 (not yet published)
GoComing Soon
github.com/convertintomp4/go-sdk (not yet published)
KotlinComing Soon
com.convertintomp4:sdk (not yet published)
SwiftComing Soon
convertintomp4/sdk-swift (not yet published)
Best Practices
- Always handle errors - Wrap API calls in try/catch blocks
- Use webhooks - Avoid polling when possible
- Implement retry logic - Handle rate limits with exponential backoff
- Store API keys securely - Never commit API keys to version control