Skip to content
For developers

File conversion API

Convert files from your own code. Keep your CloudConvert integration, or send one request and get the file back.

Already on CloudConvert? Change one URL.

The same jobs and webhooks. Swap the address and the key, keep the rest of your code.

- https://api.cloudconvert.com/v2/jobs+ https://api.switchfile.io/v2/jobs
# Same request body, same response,
# same signed webhooks.
  • Tasks: import/url, import/upload, import/base64, convert and export/url
  • Wait for a job in the same request, or get a signed webhook when it finishes
  • Sandbox mode for tests that do not use credits

The simple API

Preview

One request in, the converted file out. No jobs, no polling.

curl "https://api.switchfile.io/v1/convert?wait=30" \
  -H "Authorization: Bearer $SWITCHFILE_API_KEY" \
  -H "Accept: application/octet-stream" \
  -F [email protected] -F to=mp4 -o talk.mp4

The simple API is a preview and may still change before it is released.

Quickstart for the simple API

MCP and agents

Coding agents can convert files on your computer through our MCP server. The agent names a file and a format, and the result is saved next to the input. Set SWITCHFILE_API_KEY to a key from your dashboard. Needs Node.js 18 or newer. Setup for more clients and the command line: MCP guide.

Claude Code

claude mcp add switchfile \
  -e SWITCHFILE_API_KEY=$SWITCHFILE_API_KEY \
  -- npx -y switchfile-mcp

Or as a plugin with a skill for file conversion:

claude plugin marketplace add floraiNx/switchfile-plugins
claude plugin install switchfile@switchfile

Codex

~/.codex/config.toml
[mcp_servers.switchfile]
command = "npx"
args = ["-y", "switchfile-mcp"]
env_vars = ["SWITCHFILE_API_KEY"]
tool_timeout_sec = 900

tool_timeout_sec gives long video conversions time to finish.

Cursor

~/.cursor/mcp.json
{
  "mcpServers": {
    "switchfile": {
      "command": "npx",
      "args": ["-y", "switchfile-mcp"],
      "env": { "SWITCHFILE_API_KEY": "${env:SWITCHFILE_API_KEY}" }
    }
  }
}

Tools

  • convert_file: converts local files and saves each result next to its input or in a folder you name
  • convert_url: converts a file from a public URL and saves the result locally
  • list_formats: supported targets, credits and options for a pair of formats
  • get_conversion and account: status of long conversions, credits and today's free quota

Existing files are only replaced when the agent asks for it.

Command line

The same package includes a command line tool.

npx -y -p switchfile-mcp switchfile convert talk.mkv --to mp4
npx -y -p switchfile-mcp switchfile formats --from heic

Reference

Authentication

Send your API key as a bearer token in the Authorization header. Every account can create keys in the dashboard, free accounts included.

Authorization: Bearer YOUR_API_KEY
Authentication

Webhooks

We call your URL when work finishes or fails: job.finished and job.failed for jobs, conversion.finished and conversion.failed for the simple API. Every call is signed, so you can check that it came from us.

Check the signature

Limits

Free accounts convert 50 files a day, each up to 1 GB. GET /v1/account returns max_file_size, the largest file your key can send. Results are deleted after 24 hours.

Limits and quotas

Also in the docs: API reference, errors, formats and options and openapi.json.