§ Encode
Convert Image API
Converts between JPEG, PNG, WebP, AVIF, GIF, and TIFF. With `output.format` omitted it is a pure re-encode, which is the compress endpoint — and since metadata is stripped by default, it is the strip-metadata endpoint too. That is why there is no separate one of either.
- Endpoint
- POST /image/convert
- Inputs
- Exactly 1 image
- Returns
- The encoded image
- Limits
- 20 MB per file, 50 M pixels per image.
- Price
- $0.001
§ 01 The request
One POST, and the file comes back.
POST /image/convert
curl -sS --fail-with-body \
-o photo.webp \
-H "Authorization: Bearer $OHMYWRAP_KEY" \
-F "file=@photo.jpg" \
-F 'options={"output":{"format":"webp","quality":80}}' \
https://api.ohmywrap.com/image/convertOptions
| Option | Type | Default | What it does |
|---|---|---|---|
| output | object | — | The shared encode block: format, quality, lossless, effort, progressive, keepMetadata. |
| animated | bool | false | Process every frame of an animated GIF or WebP instead of flattening to the first. |
Worth knowing
An encoder option the target format cannot use is a 422, not a silent no-op: {"format":"png","quality":50} is refused, because quality does not apply to PNG.
Your first /image/convert call takes one line of curl.
Ten thousand calls cost ten dollars, the pack never expires, and nothing you send is kept.
10,000 calls for $10. No subscription, no expiry.