POST /api/v1/upload

Upload File

Creates a new image processing API job from a remote file_url or a direct multipart upload and returns the first asynchronous tracking payload.

https://api.removit.eu/api/v1/upload

Endpoint contract

Use this endpoint to create a new asynchronous processing job.

MethodPOST
Path/api/v1/upload
AuthRequired
Consumesapplication/json or multipart/form-data
Producesapplication/json

Available parameters

These fields define the upload input, the processing mode, and the delivery strategy for the result.

FieldTypeRequiredDefaultRules
file_urlstringYes if file is absent-Must be a valid http or https URL.
filebinaryYes if file_url is absent-Must be a supported image file.
modestringNoclippingbackground, clipping, params
paramsstring | object | nullYes if mode=params-A string parameter set is recommended.
delivery_modestringNourlurl or final_url
output_formatstringNopngpng, jpg, jpeg, psd, tiff, webp

Validation rules to keep in mind

Most upload errors come from incompatible input shapes or missing parameters.

  • file_url and file are mutually exclusive.
  • mode=params requires a params value.
  • Image URLs must use http or https.

Accepted MIME types

Direct uploads accept these MIME types in multipart/form-data requests.

  • image/png
  • image/jpeg
  • image/webp
  • image/gif
  • image/avif
  • image/tiff
  • image/x-tiff
  • application/tiff
  • image/vnd.adobe.photoshop
  • application/vnd.adobe.photoshop
  • image/svg+xml
JSON example

Upload payload example

This example creates a params job with final URL delivery and a webp output.

{
  "file_url": "https://example.com/image.jpg",
  "mode": "params",
  "params": "Test-Api",
  "delivery_mode": "url",
  "output_format": "webp"
}
Accepted response

Immediate upload response

A successful upload accepts the job and returns a tracking payload immediately.

{
  "job_id": "019cdc54-2673-dc32-b9e5-6e1d36cc9e8a",
  "status": "queued",
  "mode": "params"
}

Multi-language upload examples

These API image upload examples cover remote file_url requests, multipart uploads, and common backend integration patterns for a REST API image workflow.

cURL JSONcURL multipartJavaScriptPHPPython
curl -X POST "$BASE_URL/api/v1/upload" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -d '{
    "file_url": "https://example.com/image.jpg",
    "mode": "params",
    "params": "mon_set",
    "delivery_mode": "url",
    "output_format": "webp"
  }'
curl -X POST "$BASE_URL/api/v1/upload" \
  -H "X-API-Key: $API_KEY" \
  -F "file=@/path/to/image.jpg" \
  -F "mode=params" \
  -F "params=mon_set" \
  -F "delivery_mode=final_url"
const BASE_URL = "https://api.removit.eu";
const API_KEY = process.env.REMOVIT_API_KEY;

const response = await fetch(`${BASE_URL}/api/v1/upload`, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": API_KEY
  },
  body: JSON.stringify({
    file_url: "https://example.com/image.jpg",
    mode: "params",
    params: "mon_set",
    delivery_mode: "url",
    output_format: "webp"
  })
});

const data = await response.json();
$baseUrl = "https://api.removit.eu";
$apiKey = getenv("REMOVIT_API_KEY");

$payload = json_encode([
    "file_url" => "https://example.com/image.jpg",
    "mode" => "params",
    "params" => "mon_set",
    "delivery_mode" => "url",
    "output_format" => "webp"
]);

$ch = curl_init("{$baseUrl}/api/v1/upload");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Content-Type: application/json",
        "X-API-Key: {$apiKey}"
    ],
    CURLOPT_POSTFIELDS => $payload
]);

$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);
import os
import requests

base_url = "https://api.removit.eu"
api_key = os.environ["REMOVIT_API_KEY"]

response = requests.post(
    f"{base_url}/api/v1/upload",
    headers={
        "Content-Type": "application/json",
        "X-API-Key": api_key
    },
    json={
        "file_url": "https://example.com/image.jpg",
        "mode": "params",
        "params": "mon_set",
        "delivery_mode": "url",
        "output_format": "webp"
    },
)

data = response.json()

Main upload responses

These HTTP codes cover the most common upload outcomes.

202 Accepted

The job was accepted and queued for asynchronous processing.

400 Bad Request

The request body is malformed, incomplete, or not parseable as expected.

401 Unauthorized

The API key is missing or invalid.

402 Payment Required

The request cannot be processed because credits are insufficient.

422 Unprocessable Entity

The request shape is understood but fails business validation rules.

503 Service Unavailable

A temporary upstream or infrastructure issue prevents job creation.