Explore our API documentation and examples to integrate Png2Webp into your application or workflow.
Our API is a simple HTTP interface with various options:
Direct uploads or URL reference
Image file or JSON-encoded data
up to 25 megapixels
Not a developer? There are plenty ready to use tools & Apps by png2webp and our community.
Our API is a simple HTTP interface with various options:
You’re going to receive 100 API calls for free.
After that your first 5 API calls per day are on us (see pricing)
Use the following code samples to get started quickly
Review the reference docs to adjust any parameters
Want to know more about subscription? see pricing
$ curl -H 'X-API-Key: INSERT_YOUR_API_KEY_HERE' \
-F 'image_file=@/path/to/file.jpg' \
-F 'size=auto' \
-f https://api.png2webp.com/v1.0/convert -o webp-file.webp
Get up and running faster with official and third-party libraries.
Not a developer?
There are plenty ready to use tools & Apps by png2webp and our community.
by Png2Webp
by Png2Webp
by Manuel Njiakim
by Manuel Njiakim
There are plenty ready to use tools & Apps by png2webp and our community.
We only accept images with the format bellow :
Formats | Limited size | Example |
---|---|---|
PNG | Up to 25 Megapixels | |
JPG | Up to 25 Megapixels | |
ZIP | Up to 50 Megapixels |
This feature is not yet available in stable version. If you need this feature, get in touch
If you want to authenticate users with the click of a button instead of having them enter an API Key, get in touch to try our OAuth 2.0 login.
Input image | Megapixels | Effective Rate Limit |
---|---|---|
625 x 400 | 1 MP | 500 images per minute |
1200 x 800 | 1 MP | 500 images per minute |
1600 x 1200 | 2 MP | 500 / 2 = 250 images per minute |
2500 x 1600 | 4 MP | 500 / 4 = 125 images per minute |
4000 x 2500 | 10 MP | 500 / 10 = 50 images per minute |
6250 x 4000 | 25 MP | 500 / 25 = 20 images per minute |
Exceedance of rate limits leads to a HTTP status 429 response (no credits charged). Clients can use the following response headers to gracefully handle rate limits:
Response header | Sample value | Description |
---|---|---|
X-RateLimit-Limit | 500 MP | Total rate limit in megapixel images |
X-RateLimit-Remaining | 499 MP | Remaining rate limit for this minute |
X-RateLimit-Reset | 1662309450 MP | Unix timestamp when rate limit will reset |
Retry-After | 59 MP | Seconds until rate limit will reset (only present if rate limit exceeded) |
Higher Rate Limits are available upon request
Exponential backoff is an error handling strategy in which a client periodically retries a failed request.
Most recent API updates:
We use cookies to improve your experience and for analysis. You can deactivate them anytime.