API Documentation

Integrate file conversion into your applications with our REST API.

Authentication

All API requests require authentication using your API key. Include it in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Or use the X-API-Key header:

X-API-Key: YOUR_API_KEY

Base URL

https://fileshift.org/api/v1

Endpoints

POST /convert

Upload and convert a file to the specified format.

Parameters

Name Type Required Description
filefileYesThe file to convert
target_formatstringYeswebp, png, jpg, gif, bmp
qualityintegerNo1-100 (default: 90)
webhook_urlstringNoURL for completion callback

Example Request

curl -X POST https://fileshift.org/api/v1/convert \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "[email protected]" \
  -F "target_format=png" \
  -F "quality=90"

Response

{
  "success": true,
  "job_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "pending",
  "status_url": "https://fileshift.org/api/v1/status/550e8400-e29b-41d4-a716-446655440000"
}
GET /status/{job_id}

Check the status of a conversion job.

Response (Completed)

{
  "job_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "completed",
  "original_filename": "image.webp",
  "converted_filename": "image.png",
  "file_size_original": 102400,
  "file_size_converted": 153600,
  "download_url": "https://...",
  "expires_at": "2024-01-01T12:00:00Z"
}
GET /download/{job_id}

Get a temporary download URL for the converted file.

GET /usage

Get your current API usage and limits.

GET /formats

List all supported file format conversions (no authentication required).

Rate Limits

Plan Requests/Month Max File Size
Pro1,000100MB
Enterprise50,000500MB