---
title: "Image to PDF API: Convert JPG, PNG, and More"
slug: convert-image-to-pdf
url: https://apyhub.com/apyhub/service/convert-image-to-pdf
provider: ApyHub
categories: [Output Kit]
tags: [image-to-pdf, jpg-to-pdf, png-to-pdf, pdf-generation, document-conversion]
auth: api_key
version: 1.0.0
service_type: sync
endpoints: 6
atoms: 100
mcp: true
alias: converter-image-pdf
---

# Image to PDF API: Convert JPG, PNG, and More

Convert JPG, PNG, GIF, TIFF, BMP and SVG images to PDF with one API call. Send a file, URL or base64, choose landscape if needed. Free tier, no card.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/base64/link` | What it does Converts a base64-encoded image into a PDF and returns a signed link to the generated… | 100 |
| POST | `https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/file/download` | What it does Converts an uploaded image file into a PDF and returns the resulting PDF as a binary d… | 100 |
| POST | `https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/file/link` | What it does Converts an uploaded image file into a PDF and returns a signed PDF link in the respon… | 100 |
| POST | `https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/url/download` | What it does Converts a remote image referenced by a URL into a PDF and returns the PDF as a binary… | 100 |
| POST | `https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/url/link` | What it does Converts a remote image accessible by URL into a PDF and returns a signed PDF link. Yo… | 100 |
| POST | `https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/base64/download` | What it does Converts a base64-encoded image into a PDF and returns the PDF as a binary download. T… | 100 |

## Endpoint reference

### Convert base64-encoded image to PDF signed link

`POST https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/base64/link` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `base64` | body | string | yes | Base64-encoded file bytes. |

#### Quickstart

Convert a base64-encoded image into a PDF link with one JSON request.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/base64/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"base64":"iVBORw0KGgoAAAANSUhEUgAA..."}'
```

#### What you'll get back

Returns a JSON object with a `data` string field containing a URI to the generated PDF.

```json
{
  "data": "https://example.com/output.pdf"
}
```

### Convert image upload to PDF download

`POST https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/file/download` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `file` | body | string (binary) | yes | .png, .jpeg, .jpg, .gif, .svg, .tif, or .bmp |
| `output` | query | string | no | Example: `output.pdf`. |
| `landscape` | query | boolean | no | Default: `false`. |

#### Quickstart

Upload an image and download the generated PDF. The `output` and `landscape` options are sent as query parameters.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/file/download?output=output.pdf" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/image.png"
```

#### What you'll get back

Returns the PDF file itself as a binary response.

```bash
<binary PDF data>
```

### Convert image upload to PDF signed link

`POST https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/file/link` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `file` | body | string (binary) | yes |  |
| `landscape` | query | boolean | no | Default: `false`. |

#### Quickstart

Upload an image file to convert it to a PDF; this example also sets the optional `landscape` query parameter to `false` by omitting it.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/file/link" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/image.png"
```

#### What you'll get back

Returns a JSON object with a `data` string field containing the generated PDF URI.

```json
{
  "data": "https://example.com/output.pdf"
}
```

### Convert remote image URL to PDF download

`POST https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/url/download` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `url` | body | string (uri) | yes | Example: `https://assets.apyhub.com/samples/sample.png`. |
| `landscape` | query | boolean | no | Default: `false`. |

#### Quickstart

Convert an image from a public URL into a PDF. The `url` goes in the JSON body, and `landscape` is an optional query parameter.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/url/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.png"}'
```

#### What you'll get back

Returns a binary file stream containing the generated PDF. There is no JSON wrapper in the response.

### Convert remote image URL to PDF signed link

`POST https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/url/link` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `url` | body | string (uri) | yes | Example: `https://assets.apyhub.com/samples/sample.png`. |

#### Quickstart

Convert an image from a URL into a PDF by sending the image link in the request body.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/url/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.png"}'
```

#### What you'll get back

Returns a JSON object with a `data` string field containing the generated PDF URI.

```json
{
  "data": "https://..."
}
```

### Convert base64-encoded image to PDF download

`POST https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/base64/download` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `base64` | body | string | yes | Base64-encoded file bytes. |
| `landscape` | query | boolean | no | Default: `false`. |

#### Quickstart

Convert a Base64-encoded file into a PDF. This example sends the required `base64` value and uses the default download flow.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/convert-image-to-pdf/base64/download?landscape=false" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"base64":"JVBERi0xLjQKJ..." }'
```

#### What you'll get back

Returns a binary file response (`string` with `format: binary`), so the successful response is the generated PDF file itself.

```binary
%PDF-...
```

## About

## What it does
The Image to PDF API turns images into PDF documents. Send a JPG, PNG, GIF, SVG, TIFF, or BMP file as an upload (up to 100 MB), as a URL, or as a base64 string, and get the PDF back either as the file itself or as a signed link you can store or share. Set `landscape` to `true` for wide images such as screenshots or charts.

Use it to save receipts and scanned pages as PDFs, turn screenshots and product photos into shareable documents, or add image-based pages to reports without building your own rendering setup. Need the opposite? The [PDF to Image API](https://apyhub.com/apyhub/service/convert-pdf-pages-to-images) turns PDF pages back into images. For web pages and documents, use the [HTML to PDF](https://apyhub.com/apyhub/service/convert-html-to-pdf) or [Word to PDF](https://apyhub.com/apyhub/service/convert-word-to-pdf) APIs.

Pick the endpoint that fits where your image is: upload endpoints when the file is in your app, URL endpoints when it's hosted elsewhere, and base64 endpoints when the image is already encoded in your data. You can start on ApyHub's free tier with no card required.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/apyhub/service/convert-image-to-pdf
