Images API

Images API

Public REST API for image conversion and optimization. Accepts raster + SVG, outputs PNG, JPG, WebP, AVIF — Google-friendly modern formats.

A free, public REST API to convert and optimize raster + vector images. Single-file upload, fast turnaround, returns a download URL.

# Convert SVG to WebP
curl -X POST https://jinero.online/api/v1/images/convert \
  -F "[email protected]" \
  -F "format=webp" \
  -F "preset=balanced"
const form = new FormData();
form.append("image", file);
form.append("format", "webp");
form.append("preset", "balanced");

const r = await fetch("https://jinero.online/api/v1/images/convert", { method: "POST", body: form });
const { download_url, new_size } = await r.json();
console.log(download_url);

All endpoints are public — no key required. Conversion and optimization are CPU-heavy, so they are rate-limited tighter than the Fonts API. Limits below are per IP.

# Anonymous limits (per IP):
#   POST /convert     5  req/min
#   POST /optimize    5  req/min
#   GET  /download/*  10 req/min
#   GET  /formats     60 req/min

# All responses include:
#   X-RateLimit-Limit: 5
#   X-RateLimit-Remaining: N
#   Retry-After: seconds (on 429)

Upload an image, get it back in a different format. Best for switching to modern formats (WebP, AVIF) for the web.

POST https://jinero.online/api/v1/images/convert
ParameterTypeDescription
image file (multipart) Input file. Accepts jpg, jpeg, png, gif, bmp, webp, avif, heic, svg. Max 10 MB.
format string Output format: png, jpeg, webp, or avif.
preset string Quality preset: light, balanced (default), or strong.
curl -X POST https://jinero.online/api/v1/images/convert \
  -F "[email protected]" \
  -F "format=webp" \
  -F "preset=balanced"
// Browser FormData example
const fileInput = document.getElementById("file");
const form = new FormData();
form.append("image", fileInput.files[0]);
form.append("format", "webp");
form.append("preset", "balanced");

const res = await fetch("https://jinero.online/api/v1/images/convert", {
  method: "POST",
  body: form,
});
const data = await res.json();
window.location = data.download_url;
$response = Http::attach(
    "image",
    file_get_contents("photo.png"),
    "photo.png"
)->post("https://jinero.online/api/v1/images/convert", [
    "format" => "webp",
    "preset" => "balanced",
]);

$result = $response->json();
$webpUrl = $result["download_url"];
Example response
{
  "success": true,
  "session_id": "1d2e3f...",
  "original_name": "photo.png",
  "original_format": "png",
  "output_format": "webp",
  "original_size": 1024512,
  "new_size": 156320,
  "savings_percent": 84.7,
  "dimensions": "1920x1080",
  "preset": "balanced",
  "download_url": "https://jinero.online/api/v1/images/download/1d2e3f...",
  "expires_in_minutes": 60
}

Compress without changing format. Useful for shrinking PNG/JPG files that are already in the right format but oversized.

POST https://jinero.online/api/v1/images/optimize
ParameterTypeDescription
image file (multipart) Raster input (PNG, JPG, GIF, BMP, WebP, AVIF, HEIC). SVG is not accepted here — use /convert to rasterize first.
preset string light = near-lossless, balanced = recommended, strong = max compression.
curl -X POST https://jinero.online/api/v1/images/optimize \
  -F "[email protected]" \
  -F "preset=strong"
const form = new FormData();
form.append("image", file);
form.append("preset", "balanced");

const r = await fetch("https://jinero.online/api/v1/images/optimize", { method: "POST", body: form });
const { new_size, savings_percent } = await r.json();
console.log(`Saved ${savings_percent}%`);
$res = Http::attach("image", file_get_contents("big.jpg"), "big.jpg")
    ->post("https://jinero.online/api/v1/images/optimize", ["preset" => "strong"]);
$data = $res->json();
Example response
{
  "success": true,
  "session_id": "...",
  "original_format": "jpeg",
  "output_format": "jpeg",
  "original_size": 2354821,
  "new_size": 612491,
  "savings_percent": 74.0,
  "download_url": "https://jinero.online/api/v1/images/download/..."
}

Convert raster images to clean SVG via VTracer. Best for logos, icons, and flat illustrations. Returns both raw SVG markup and a packaged ZIP.

POST https://jinero.online/api/v1/images/vectorize
ParameterTypeDescription
image file (multipart) Raster input (jpg, jpeg, png, gif, bmp, webp). Max 10 MB.
preset string logo (default) · illustration · photo · sketch. Determines color quantization + path simplification.
curl -X POST https://jinero.online/api/v1/images/vectorize \
  -F "[email protected]" \
  -F "preset=logo"

# Then fetch the SVG:
curl https://jinero.online/api/v1/images/vectorize/svg/SESSION_ID > out.svg
const form = new FormData();
form.append("image", file);
form.append("preset", "logo");

const r = await fetch("https://jinero.online/api/v1/images/vectorize", { method: "POST", body: form });
const { svg_url } = await r.json();
const svg = await fetch(svg_url).then(x => x.text());
Example response
{
  "success": true,
  "session_id": "...",
  "output_format": "svg",
  "preset": "logo",
  "dimensions": "1024x1024",
  "svg_url": "https://jinero.online/api/v1/images/vectorize/svg/...",
  "download_url": "https://jinero.online/api/v1/images/vectorize/download/..."
}

AI-powered background removal (rembg / u2net family). Returns a transparent PNG. Max input 5 MB to keep latency reasonable.

POST https://jinero.online/api/v1/images/remove-background
ParameterTypeDescription
image file (multipart) Raster input. Max 5 MB.
preset string standard (default, fast) · portrait (better hair edges) · quality · ultra (slowest, best).
curl -X POST https://jinero.online/api/v1/images/remove-background \
  -F "[email protected]" \
  -F "preset=quality"
const form = new FormData();
form.append("image", file);
form.append("preset", "portrait");

const r = await fetch("https://jinero.online/api/v1/images/remove-background", { method: "POST", body: form });
const { download_url } = await r.json();
Example response
{
  "success": true,
  "session_id": "...",
  "output_format": "png",
  "preset": "quality",
  "dimensions": "1920x1080",
  "download_url": "https://jinero.online/api/v1/images/remove-background/download/..."
}

AI 2× upscale via Real-ESRGAN. Only 2× is exposed publicly — higher scales (4×) and other modes (face restore, denoise, auto) remain UI-only for now due to GPU cost.

POST https://jinero.online/api/v1/images/upscale
ParameterTypeDescription
image file (multipart) Raster input. Max 15 MB. Formats: jpg, jpeg, png, webp, bmp.
scale integer Only "2" is currently supported. Other modes (face, denoise, auto) are temporarily limited to the web UI.
curl -X POST https://jinero.online/api/v1/images/upscale \
  -F "[email protected]" \
  -F "scale=2"
const form = new FormData();
form.append("image", file);
form.append("scale", "2");

const r = await fetch("https://jinero.online/api/v1/images/upscale", { method: "POST", body: form });
const { download_url, dimensions } = await r.json();
Example response
{
  "success": true,
  "session_id": "...",
  "mode": "upscale",
  "scale": 2,
  "output_format": "png",
  "dimensions": "3840x2160",
  "download_url": "https://jinero.online/api/v1/images/upscale/download/..."
}

Retrieve the binary result. Sessions stay valid for 60 minutes after creation; after that the file is purged. Each AI endpoint has its own download path (see Response examples).

GET https://jinero.online/api/v1/images/download/{session_id}
curl -L -o output.webp https://jinero.online/api/v1/images/download/1d2e3f...
// Trigger browser download
window.location.href = data.download_url;

Discover available output formats, presets, and limits at runtime — useful for building dynamic UIs that pick up new formats automatically.

GET https://jinero.online/api/v1/images/formats
curl https://jinero.online/api/v1/images/formats
const r = await fetch("https://jinero.online/api/v1/images/formats");
const { output_formats, presets } = await r.json();
Example response
{
  "output_formats": [
    {"key": "png",  "name": "PNG",  "extension": ".png",  "supports_alpha": true},
    {"key": "jpeg", "name": "JPEG", "extension": ".jpg",  "supports_alpha": false},
    {"key": "webp", "name": "WebP", "extension": ".webp", "supports_alpha": true},
    {"key": "avif", "name": "AVIF", "extension": ".avif", "supports_alpha": true}
  ],
  "presets": [
    {"key": "light",    "name": "Light",    "description": "Near lossless, minimal compression"},
    {"key": "balanced", "name": "Balanced", "description": "Best quality/size ratio"},
    {"key": "strong",   "name": "Strong",   "description": "Maximum compression, smaller files"}
  ],
  "supported_inputs": ["jpg","jpeg","png","gif","bmp","webp","avif","heic","svg"],
  "max_file_size_bytes": 10485760,
  "max_file_size_mb": 10,
  "session_ttl_minutes": 60
}

Standard HTTP semantics. Errors return JSON with a "message" field.

// 422 — validation (invalid format / unsupported file)
{ "message": "The image field must be a file of type: jpg, jpeg, png..." }

// 404 — download session not found or expired
{ "message": "Conversion result not found or expired" }

// 429 — rate limit exceeded
{ "message": "Too Many Attempts." }

// 500 — conversion failed (rare; details in error)
{ "message": "Failed to rasterize SVG. Make sure the file is valid." }

About the jinero.online Images API

Public REST API for image conversion and optimization — convert SVG, JPG, PNG, HEIC into modern WebP or AVIF, compress without losing quality, free.

Modern formats

Output PNG, JPG, WebP, or AVIF. Convert legacy PNG/JPG hero images to WebP and watch LCP scores improve.

SVG → raster

Server-side SVG rasterization via rsvg-convert handles vector inputs cleanly — even SVGs with heavy filters.

No key required

Public endpoint, 5 req/min per IP for conversions. Generate an API token for higher limits when needed.

Simple JSON contract

Upload via multipart, receive a download URL valid for 60 minutes. No signing, no callbacks, no SDKs needed.

Frequently Asked Questions

No. The API is public and rate-limited per IP. /convert and /optimize are limited to 5 requests per minute; download and metadata endpoints have higher caps.

JPG, JPEG, PNG, GIF, BMP, WebP, AVIF, HEIC, and SVG. SVGs are rasterized server-side via rsvg-convert before encoding. Max file size: 10 MB.

PNG, JPEG, WebP, and AVIF. WebP gives the best size/quality ratio for the web; AVIF is even smaller but takes longer to decode. PNG keeps transparency; JPEG does not.

Originals are processed and immediately discarded. Converted results are kept in a temporary store for 60 minutes (long enough to follow the download_url), then deleted. We do not train any model on your uploads.

Those are specialized for one task (background removal or PNG compression). Our API focuses on format conversion + lossy/lossless compression with a single consistent interface, and is fully free without per-image fees or paywalls.