For developers · REST API

The WebP conversion API for your backend, CMS and CI

Send an image, or its URL, with a quality and a maximum width; get an optimised WebP back, as bytes or as JSON with a download link. libwebp on our servers, animated GIFs stay animated, and the key is yours in a minute: create a free account and copy it from your account page.

Free: 50 conversions a monthSelf-serve keysOpenAPI 3.1
Quick start — bash
# Your key, from https://www.fastwebpconverter.com/account
export FASTWEBP_API_KEY=fwk_...
​
curl -X POST https://www.fastwebpconverter.com/api/v1/convert \
-H "Authorization: Bearer $FASTWEBP_API_KEY" \
-F "file=@photo.jpg" -F "quality=80" \
-o photo.webp
Quick start

Your first WebP in three steps

Step 1

Create a free account

Sign in with a code sent to your e-mail or with Google. Every account, free included, comes with an API key and 50 conversions a month.

Step 2

Copy your key

On your account page, press Create key. It starts with fwk_ and is shown once: keep it in an environment variable such as FASTWEBP_API_KEY.

Step 3

Send an image

One POST with the file (or its URL) and the key as a Bearer token. The answer is the WebP itself, or JSON with a download link.

Reference

Endpoints and authentication

Two endpoints under one base URL. Authenticate every request with your key as a Bearer token; the same key also works for the MCP server.

Base URLhttps://www.fastwebpconverter.com/api/v1
HeaderAuthorization: Bearer fwk_...
POST/convertConvert one image to WebP
GET/usageYour plan and what is left this month
Spechttps://www.fastwebpconverter.com/openapi.json

CORS is open so you can test from a browser console, but keep keys on servers: anyone who sees a key can spend its allowance. Revoke a leaked key on your account page and create a new one.

POST /convert

Convert an image

JPG, PNG, GIF, WebP, AVIF, TIFF and SVG in, WebP out. Animated GIFs come out as animated WebP. HEIC photos and BMP files are not read on the server: the browser converter handles them (HEIC in Safari).

Three ways to send the image

Send the image asContent-TypeOptions inLimit
An upload, field filemultipart/form-dataForm fields or query string4 MB
A URL the server fetchesapplication/jsonThe JSON body or query string10 MB on Free, 25 MB on Pro
The raw bytes as the bodyimage/* or application/octet-streamQuery string (?quality=80&filename=hero.png)4 MB

Parameters

ParameterTypeDefaultDescription
filefile (multipart)—The image. JPG, PNG, GIF, WebP, AVIF, TIFF and SVG.
urlstring (http or https URL)—A public image URL. The server downloads it, checks it is an image and refuses private or local network addresses. Use it for images over the upload limit.
qualityinteger 1–10080WebP quality. Ignored when lossless is true.
max_widthinteger 16–10000 (px)noneDownscale to this width, keeping the aspect ratio. Smaller images are never upscaled.
losslessbooleanfalseLossless WebP: pixel-identical, best for logos, icons and flat graphics.
responsebinary | jsonbinaryjson returns a JSON result with a download link instead of the bytes. Accept: application/json does the same.
filenamestring (query)imageRaw-body uploads only: the name the output is based on (hero.png gives hero.webp).

Upload a file, get the WebP back

convert.sh — bash
curl -X POST https://www.fastwebpconverter.com/api/v1/convert \
-H "Authorization: Bearer $FASTWEBP_API_KEY" \
-F "file=@./hero.png" \
-F "quality=80" \
-F "max_width=1600" \
-D headers.txt \
-o hero.webp

Response headers

On success the body is the WebP and the numbers travel in headers, so you can log savings without parsing anything. They are exposed to browsers too.

HeaderExampleMeaning
Content-Typeimage/webpThe body is the converted image.
Content-Dispositionattachment; filename="hero.webp"Output file name, from the source name.
X-Original-Bytes2493112Size of the source image.
X-Webp-Bytes287401Size of the WebP result.
X-Output-Width / X-Output-Height1600 / 1067Dimensions after resizing.
X-Quota-Remaining1874Conversions left in this month's allowance.
X-Extra-Remaining0Extra conversions credited to the account on top of the monthly allowance (usually 0).
X-RateLimit-Remaining58Requests left in the current minute for this key.
JSON mode

Send a URL, get a download link

Add ?response=json (or Accept: application/json) and the API answers with JSON: a download link, the sizes and what is left of your allowance. The right mode for images already online, images over the upload limit, automations and AI assistants.

convert-url.sh — bash
curl -X POST "https://www.fastwebpconverter.com/api/v1/convert?response=json" \
-H "Authorization: Bearer $FASTWEBP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/images/hero.png", "quality": 80, "max_width": 1600}'
200 OK — json
{
"filename": "hero.webp",
"download_url": "https://www.fastwebpconverter.com/dl/Qm8x2kV4nT0pLr7a",
"expires_at": "2026-10-10T09:14:03.000Z",
"original_bytes": 2493112,
"webp_bytes": 287401,
"saved_percent": 88,
"width": 1600,
"height": 1067,
"animated": false,
"quota_remaining": 9874,
"extra_remaining": 0
}
FieldTypeMeaning
filenamestringOutput file name.
download_urlstringLink to the WebP file. It expires; download or copy the file to your storage.
expires_atISO 8601 dateWhen the link stops working: 24 h on Free, 72 h on Pro.
original_bytes / webp_bytesintegerSizes before and after.
saved_percentintegerPercentage saved.
width / heightintegerOutput dimensions.
animatedbooleanTrue when an animated GIF or WebP stayed animated.
quota_remaining / extra_remainingintegerMonthly and extra conversions left.
GET /usage

Check your allowance

GET https://www.fastwebpconverter.com/api/v1/usage with the same header. It costs nothing and is handy for dashboards and pre-flight checks in batch jobs.

200 OK — json
{
"plan": "pro",
"monthly_limit": 10000,
"used_this_month": 126,
"remaining_this_month": 9874,
"extra_conversions": 0,
"resets_at": "2026-11-01T00:00:00.000Z",
"requests_per_minute": 120,
"max_url_mb": 25
}
FieldMeaning
planfree or pro.
monthly_limit / used_this_month / remaining_this_monthThis month's allowance and where you stand.
extra_conversionsExtra conversions credited on top of the monthly allowance (usually 0).
resets_atWhen the monthly allowance resets (the 1st, UTC).
requests_per_minute / max_url_mbYour plan's rate limit and URL size limit.
Errors

Errors you can branch on

Every error is JSON, {"error": {"code", "message"}}, with a stable code. Messages are written for people, so you can show them as they are.

StatusCodeWhen
400invalid_parameterA parameter is out of range, the JSON is not valid, or there is nothing to convert.
400invalid_urlurl is not a valid http or https address.
400blocked_addressurl points to a private, local or reserved network address.
401unauthorizedThe key is missing, revoked or wrong.
402quota_exceededThis month's allowance is used up. The message says how to continue.
413file_too_largeThe upload is over 4 MB, or the image behind url is over your plan's limit.
415unsupported_formatThe file is not a format the server reads (HEIC and BMP among them).
415not_an_imageThe url answered with something other than an image.
422fetch_failedThe url could not be downloaded (timeout, 404, empty answer).
422decode_failedThe image is damaged or could not be decoded.
429rate_limitedToo many requests this minute for your plan. Retry after the Retry-After header (60 s).
500internal_errorSomething failed on our side. Retry; the conversion is not counted.
400 Bad Request — json
{
"error": {
"code": "invalid_parameter",
"message": "quality must be an integer from 1 to 100."
}
}
Limits and plans

Free to try, Pro for full access

The allowance is per account, shared by the API, Claude, ChatGPT and MCP clients, and resets on the 1st of each month (UTC). Pro is one plan with everything, paid the way you prefer: $4.99/month, $29/year or $59 once.

Server-side limits per plan

PlanPriceServer conversionsImages per batch callImage by URL up toAPI requests a minuteDownload links kept
FreeFree50 a month510 MB1024 hours
Pro$4.99/month, $29/year or $59 once10,000 a month5025 MB1203 days

Choosing a quality

  • Photos: quality 75 to 85. 80 is the default and is visually identical to the original for most images.
  • Screenshots, UI and images with text: 90 or more, so letters and thin lines stay sharp.
  • Logos, icons and flat graphics: lossless, often smaller than the PNG and pixel-identical.
  • Oversized photos: set max_width (1600 for full-width images, 800 to 1200 for content images). Resizing saves more than any quality setting; images are never upscaled.

Every account starts on Free with 50 conversions a month, enough to wire up and test an integration. Pro includes 10,000 server conversions a month (fair use), far above what a site's uploads, a catalogue or a CI pipeline usually need. For more, the API plan ($0.50 per 1,000 conversions, no cap) opens soon: join its waitlist below.

Pro

Full access
$4.99/ month
$29 / year ($2.42/month) · $59 once

Full access: every file, every device, your AI assistant and the API. The API and the AI assistants include 10,000 server conversions a month (fair use).

  • Download every file of every batch, as one ZIP
  • No daily limit, up to 100 images per batch
  • Pro on all your devices: sign in anywhere
  • Convert in Claude, ChatGPT and any MCP client
  • REST API with your own keys
  • Images by URL up to 25 MB, animated GIF to animated WebP
  • Priority support

Cancel anytime from your account. 14-day money-back guarantee. Prices include tax where it applies.

API

Opening soon
$0.50/ 1,000 conversions
Billed monthly on what you convert. No minimum.

Pay for what you convert, at any volume: apps, CMSs and build pipelines.

  • Pay per conversion, billed monthly, no cap
  • Everything in Pro
  • 600 requests a minute, batches of 100
  • Usage per key and invoices
  • Volume pricing above 1,000,000 conversions a month

Until it opens, Pro includes the API with a fair-use allowance.

No-code

Zapier, Make and n8n

Use JSON mode: the automation sends the image URL, receives a download link, and the next step stores or uploads the WebP.

Zapier

Webhooks by Zapier, Custom Request: POST, the convert URL with ?response=json, the Authorization header, and a JSON body with url and quality. Map download_url into the next step.

Make

HTTP, Make a request: method POST, body type Raw, content type JSON, the same body. Parse the response and pass download_url to your storage or CMS module.

n8n

HTTP Request node: POST, Header Auth with Authorization: Bearer, JSON body. Use the response's download_url, or ask for the binary and set the response format to File.

Prefer to ask an assistant?

The same conversions work from Claude, ChatGPT, Cursor or Claude Code through the MCP server at https://www.fastwebpconverter.com/api/mcp, signed in with the same account.

Use cases

Where a WebP API pays for itself

Anywhere images are uploaded by people who will not open a converter.

CMS upload hooks

Convert on upload in WordPress, Strapi, Sanity or a custom admin so editors never think about formats.

E-commerce catalogues

Normalise supplier photos to a fixed width and quality as they enter your product database.

Build pipelines

Run it in CI to convert assets committed as PNG so the deployed site only ships WebP.

User-generated content

Shrink avatars and post images before they hit your storage bucket and CDN bill.

API questions

Create a free account (an e-mail code or Google), open your account page and press Create key. The key is shown once: store it in an environment variable such as FASTWEBP_API_KEY. You can create several keys, one per server or project, and revoke any of them.

Yes. Every account, free included, gets an API key and 50 conversions a month at 10 requests a minute, enough to wire up and test an integration. Pro is full access ($4.99/month, $29/year or $59 once): 10,000 server conversions a month (fair use) at 120 requests a minute.

The API answers 402 quota_exceeded with a message saying how to continue. The allowance resets on the 1st of each month (UTC). On Free, Pro lifts it to 10,000 server conversions a month (fair use); above that, write to us through the contact page. GET /usage tells you where you stand.

Originals are processed in memory and never stored. In binary mode the WebP is streamed back and nothing is kept. In JSON mode the WebP is stored behind an unguessable download link for 24 hours on Free and 3 days on Pro, then deleted.

JPG, PNG, GIF, WebP, AVIF, TIFF and SVG. Animated GIFs come out as animated WebP. HEIC photos and BMP files are not read on the server: the browser converter handles them (HEIC in Safari). Output is always WebP, lossy or lossless.

Uploads in the request body are limited to 4 MB. Larger images go by URL: up to 10 MB on Free and 25 MB on Pro. Images up to 100 megapixels are accepted.

Yes, with JSON mode: send a JSON body with the image url and ?response=json, and the answer carries a download_url, the sizes and the percentage saved, which the next step of the automation can use.

Monthly and yearly Pro: Cancel anytime from your account. 14-day money-back guarantee. Lifetime is paid once and never renews. After a cancellation your key keeps working on the free allowance.

Ready to automate your image pipeline?

Create a free account, copy your key and convert 50 conversions a month. Go Pro for full access when you need it.