Flip Image
Image → Flip Image
The Flip Image API flips an image horizontally, vertically, or both. You send the image as Base64 (docContent), docName, orientationType (Horizontal, Vertical, or HorizontalAndVertical), and optionally async. The API returns the flipped image. Use the tester below to try the endpoint; more details are in the sections following it.
Try the Flip Image API
:::note Quick reference
Endpoint: POST /api/v2/FlipImage · Required: api-key, docContent, docName, orientationType
:::
:::info Try it live Use the form below to send your API key, image (Base64), docName, orientationType, and optional async. The response is the flipped image (binary or polling URL when async). No code required—just fill the fields and click Send request. :::
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Flip Image?
Flipping changes the orientation of an image: Horizontal mirrors left–right, Vertical mirrors top–bottom, and HorizontalAndVertical rotates 180°. The Flip Image endpoint accepts a single image (e.g. JPG, PNG, GIF, BMP, TIFF in the tester) and returns a new image with the chosen flip applied. Pixel dimensions stay the same; only the layout is mirrored. Use async for larger images to avoid timeouts.
Key features
- Three flip options – Horizontal, Vertical, or HorizontalAndVertical (180°).
- Single request – Send docContent (Base64), docName, and orientationType; no extra configuration.
- Formats – Tester accepts JPG, PNG, GIF, BMP, TIFF.
- Async – async returns a URL to poll for the result when processing is asynchronous.
:::tip Best for Use Horizontal or Vertical to correct scanned/captured orientation; use HorizontalAndVertical when the image is upside down. Combine with Resize Image or Compress Image in a pipeline. :::
API parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api-key | string | Yes | Your PDF4me API key, Base64 encoded. Get it from the dashboard. |
| docContent | base64 | Yes | Image file content (Base64). Tester: JPG, PNG, GIF, BMP, TIFF. |
| docName | string | Yes | Output image file name (e.g. output.jpg). |
| orientationType | string | Yes | Horizontal, Vertical, or HorizontalAndVertical. |
| async | boolean | No | Enable asynchronous processing. |
When to use Flip Image
- Correct orientation – Fix images that were scanned or captured upside down or mirrored (e.g. from cameras or scanners).
- Design and layout – Create mirror or reflection effects for graphics, logos, or UI assets.
- Batch normalization – Align mixed orientations in a set of images (e.g. before Create Image from PDF or Resize Image).
- Pipelines – Use after Rotate Image by EXIF Data or before Compress Image when you need a specific flip for downstream steps.
:::info Need the full API? For request/response schemas and code samples, see Flip Image in the PDF4me API docs. :::
Prerequisites
Before using this endpoint, make sure you have:
- A valid PDF4me API key (Get your API Key)
- An image file (JPG, PNG, GIF, BMP, TIFF) in Base64 format
Response Format
The API returns an image file with the specified flip orientation applied.