---
title: "Compresses an uploaded image and returns the WebP result."
method: POST
path: "/asset/compress"
tags: ["Asset"]
---

# Compresses an uploaded image and returns the WebP result.

`POST /asset/compress`

Compression metrics are returned in response headers: X-Original-Size, X-Compressed-Size,
 X-Processing-Time-Ms, X-Original-Dimensions, X-Output-Dimensions.

## Query parameters

- `quality` integer
- `maxdim` integer

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `401` — Unauthenticated
- `403` — Forbidden

---

[API](https://skmtc.net/rapidata/apis/rapidata-api.md) · [All operations](https://skmtc.net/rapidata/apis/rapidata-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rapidata/rapidata-api/revisions/d779de93a5ee/schema)
