Skip to main content
API v1

API Documentation

Convert files programmatically using our powerful REST API. Support for video, audio, image, and document conversions.

https://api.convertintomp4.com/v1

Introduction

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/v1
text

Request Format

  • All requests must include Content-Type: application/json header
  • 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"
  }
}
json

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"
bash

You can also use Authorization: Bearer YOUR_API_KEY as an alternative.

API Scopes

ScopeDescription
CONVERT_READView conversion jobs, formats, and download completed files
CONVERT_WRITECreate conversions, upload files, and manage jobs
WEBHOOKS_MANAGECreate, update, and delete webhook subscriptions
ACCOUNT_READView 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"
      }
    }
  }'
bash

Step 3: Check Job Status

curl https://api.convertintomp4.com/v1/jobs/job_abc123def456 \
  -H "X-Api-Key: ck_your_api_key"
bash

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"
      }
    }
  }
}
json

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

TypeOperationDescription
Importimport/urlImport file from URL
Importimport/uploadDirect file upload
Importimport/base64Import from base64 string
ProcessconvertConvert file format
ProcesscompressOptimize/compress file
ProcessmergeMerge multiple files
Exportexport/urlGenerate download URL

Task Status

  • pending - Task is waiting to be processed
  • processing - Task is currently being processed
  • completed - Task finished successfully
  • failed - Task encountered an error
  • cancelled - 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"
    }
  }
}
json

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

OptionTypeDescription
qualitystringlow, medium, high, highest
resolutionstring480p, 720p, 1080p, 4k
codecstringh264, h265, vp9
fpsintegerFrame rate (1-60)
bitratestringVideo 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"
}
json

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"
}
json

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 created
  • job.queued - Job queued for processing
  • job.started - Processing started
  • job.progress - Progress update
  • job.completed - Completed successfully
  • job.failed - Processing failed
  • job.cancelled - Cancelled by user
  • job.expired - Expired (TTL reached)

File & Account Events

  • file.uploaded - File uploaded
  • file.downloaded - File downloaded
  • file.deleted - File deleted
  • subscription.created - New subscription
  • subscription.updated - Plan changed
  • subscription.cancelled - Cancelled
  • quota.warning - Quota near limit
  • quota.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"
        }
      }
    }
  }
}
json

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)
  );
}
javascript

Zapier & Make Integration

Connect ConvertIntoMP4 webhooks to Zapier or Make (Integromat) for automated workflows — no coding required.

Zapier Setup

  1. In Zapier, create a new Zap with Webhooks by Zapier as the trigger
  2. Select Catch Hook as the trigger event
  3. Copy the webhook URL Zapier gives you
  4. In your ConvertIntoMP4 dashboard, go to API Keys → Webhooks → Create Webhook
  5. Paste the Zapier URL, select your events (e.g., job.completed)
  6. Click Test Webhook to send a sample payload to Zapier
  7. In Zapier, add your action (Google Sheets, Slack, email, etc.)

Make (Integromat) Setup

  1. In Make, create a new scenario with Webhooks → Custom webhook as the trigger
  2. Click Add to create a new webhook and copy the URL
  3. In your ConvertIntoMP4 dashboard, create a webhook with the Make URL
  4. Click Test Webhook to send a sample — Make will auto-detect the payload structure
  5. 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"
    }
  }
}
json
CodeStatusDescription
INVALID_API_KEY401The provided API key is invalid, expired, or has been revoked.
AUTHENTICATION_REQUIRED401This endpoint requires authentication. Provide an API key via X-Api-Key header or Bearer token.
INSUFFICIENT_PERMISSIONS403Your API key does not have the required permissions for this operation. Check the key's scopes in your dashboard.
RATE_LIMITED429You have exceeded the rate limit (60 requests/min per API key). Check X-RateLimit-Reset header for when to retry.
INVALID_INPUT400The request body contains invalid data. Check the errors field for Zod validation details.
INVALID_REQUEST400The request is malformed or missing required fields. Verify content type and body format.
FILE_TOO_LARGE413The uploaded file exceeds the maximum allowed size for your plan (Free: 100MB, Pro: 2GB, Enterprise: 2GB).
UNSUPPORTED_FORMAT422The specified format is not recognized. Use GET /v1/formats for the full list of 268 supported formats.
UNSUPPORTED_CONVERSION422The source-to-target format pair is not supported. Use GET /v1/formats/conversions to check available pairs.
FORMAT_NOT_FOUND404The specified format ID does not exist in the format registry.
JOB_NOT_FOUND404The specified job ID does not exist or has expired.
TASK_NOT_FOUND404The specified task within the job does not exist.
CONVERSION_FAILED500The conversion process encountered an internal error (FFmpeg, Sharp, LibreOffice, etc.). Check the job details for error messages.
CORRUPT_FILE400The uploaded file is corrupt or unreadable. Pre-queue validation (ffprobe/Sharp) detected an integrity issue.
TIMEOUT408The operation exceeded its timeout (video: 30min, image: 2min, document: 10min, archive: 15min, merge: 45min).
INSUFFICIENT_DISK_SPACE503The server has less than 10GB free disk space. Try again later or contact support.
STORAGE_NOT_CONFIGURED503R2 object storage is not configured on this instance. Contact the administrator.
NO_FILES400The request did not include any files. Attach a file via multipart form data.
FILE_GONE410The converted file has been deleted. Output files are cleaned up after the retention period.
EXPIRED401The 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

EndpointDescription
POST /v1/pdf/ocrExtract text from scanned PDFs using OCR
POST /v1/pdf/splitSplit a PDF into multiple files by page ranges
POST /v1/pdf/mergeMerge multiple PDFs into a single file
POST /v1/pdf/encryptAdd password protection to a PDF
POST /v1/pdf/decryptRemove password protection from a PDF
POST /v1/pdf/rotateRotate pages in a PDF
POST /v1/pdf/compressOptimize PDF file size
POST /v1/pdf/to-pdfaConvert to PDF/A archival format
POST /v1/pdf/extract-pagesExtract specific pages from a PDF
POST /v1/pdf/watermarkAdd 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"
  }'
bash

Example: Merge PDFs

{
  "files": [
    "https://example.com/part1.pdf",
    "https://example.com/part2.pdf",
    "https://example.com/part3.pdf"
  ],
  "output_filename": "merged.pdf"
}
json

Example: Encrypt PDF

{
  "file": "https://example.com/document.pdf",
  "password": "secure-password-123",
  "permissions": {
    "printing": true,
    "copying": false,
    "modifying": false
  }
}
json

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=..."
}
json

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": "..."
  }
}
json

SFTP

{
  "operation": "import/sftp",
  "host": "sftp.example.com",
  "port": 22,
  "username": "user",
  "private_key": "-----BEGIN RSA PRIVATE KEY-----...",
  "path": "/uploads/video.mp4"
}
json

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
  }
}
json

Crop Options

OptionTypeDescription
xintegerLeft offset in pixels
yintegerTop offset in pixels
widthintegerCrop width in pixels
heightintegerCrop 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"
  }
}
json

Trim Options

OptionTypeDescription
start_timestringStart time (HH:MM:SS or seconds)
end_timestringEnd time (HH:MM:SS or seconds)
durationstringDuration 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/merge
text

Response

{
  "success": true,
  "data": [
    {
      "name": "mp4",
      "category": "video",
      "targets": ["mov", "avi", "mkv", "webm", "gif"]
    },
    {
      "name": "jpg",
      "category": "image",
      "targets": ["png", "webp", "gif", "bmp", "tiff"]
    }
  ]
}
json

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

VariableDefaultDescription
baseUrlhttps://api.convertintomp4.com/v1API base URL
apiKeyYOUR_API_KEYYour 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 convertintomp4

PythonComing 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