---
title: PDF to Image APIs - Convert PDF to JPG, PNG, TIFF, BMP & GIF
version: 1.0.0
description: Convert PDF pages to image format. Supports PNG, JPEG, and WebP output formats. Returns a task ID for tracking the conversion progress.
openapi: 3.1.1
servers:
  - https://api.apifreaks.com/v1.0
paths: 5
operations: 5
schemas: 3
---

## Table of Contents

- [PDF to Image APIs - Convert PDF to JPG, PNG, TIFF, BMP & GIF v1.0.0](#pdf-to-image-apis-convert-pdf-to-jpg-png-tiff-bmp-gif-v100)
  - [Authentication](#authentication)
  - [PDF To Image APIs](#pdf-to-image-apis)
    - [pdfToImage](#pdftoimage)
      - [Parameters](#parameters)
      - [Responses](#responses)
    - [postpdfjpg](#postpdfjpg)
    - [postpdftif](#postpdftif)
    - [postpdfbmp](#postpdfbmp)
    - [postpdfgif](#postpdfgif)
  - [Schemas](#schemas)
    - [PDFResponse](#pdfresponse)
    - [PdfFileUploadRequest](#pdffileuploadrequest)
    - [ErrorResponse](#errorresponse)



# PDF to Image APIs - Convert PDF to JPG, PNG, TIFF, BMP & GIF v1.0.0

Convert PDF pages to image format. Supports PNG, JPEG, and WebP output formats. Returns a task ID for tracking the conversion progress.

Base URLs:

* [https://api.apifreaks.com/v1.0](https://api.apifreaks.com/v1.0)

## Authentication

* API Key (ApiKeyAuthHeader)
    - Parameter Name: **X-apiKey**, in: header. Pass your API key via the X-apiKey request header.

* API Key (ApiKeyAuthQuery)
    - Parameter Name: **apiKey**, in: query. Pass your API key via the apiKey query parameter.

## PDF To Image APIs

### pdfToImage

`POST /pdf/png`

*Convert PDF to PNG*

This API converts a given PDF file into a sequence of PNG images.

> Body parameter

```yaml
file: string

```

#### Parameters

|Name|In|Type|Required|Description|
|---|---|---|---|---|
|format|query|string|false|Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.|
|file_id|query|string|false|The unique ID of a PDF file already uploaded to the API Freaks server. Use this as an alternative to uploading a new file directly.|
|destroy|query|boolean|false|If set to `true`, the input file(s) will be permanently deleted from the server immediately after the output PDF is generated.|
|output|query|string|false|The desired name for the output unrestricted PDF file. If not provided, a default name will be assigned.|
|pages|query|string|false|Specifies the pages or ranges at which to split the PDF. Accepts individual page numbers (e.g., '1') and/or page ranges (e.g., '4-2', 'last'). Ranges can be ascending or descending. Use commas to separate entries and hyphens for ranges. Alternatively, provide only one of the following keywords: 'even' (split at every even-numbered page), 'odd' (split at every odd-numbered page), 'last' (split at the last page only), or 'all' (split into single pages). Examples: '1,4-2,last', 'odd', 'all'. Mixing special keywords with specific pages/ranges is not allowed.|
|resolution|query|integer|false|Specifies the resolution (in DPI) for the output images. Acceptable Range is from 20 to 1200.|
|image_smoothing|query|string|false|Determines the smoothing options to apply during image conversion. Valid values are 'none', 'all' or a combination of 'text', 'line', and 'image' (comma-separated).If not provided, no smoothing will be applied.|
|profile|query|string|false|Specifies the color profile for the output PNG images. Acceptable values: bw (1-bit black & white, smallest size, no grayscale or color), gray (8-bit grayscale), rgb (24-bit RGB color, default), rgba (32-bit RGB color with alpha channel for transparency), 4-bit (4-bit indexed color, up to 16 colors, smaller size), or 8-bit (8-bit indexed color, up to 256 colors).|
|webhook_url|query|string|false|The URL to which the webhook notification will be sent after the task is completed.|
|webhook_failure_notification|query|boolean|false|If true, a notification will also be sent by email in case the webhook request fails all the retries.  The email notification will be sent to the requesting user or their organization’s admin if part of one.|
|X-Webhook-Authorization|header|string|false|Optional custom header for webhook requests. Format: `Key:Value` (e.g., `Authorization:Bearer token123`). This will be sent as an HTTP header in the webhook call.|
|body|body|[PdfFileUploadRequest](#pdffileuploadrequest)|false|Multipart form-data body carrying the PDF file to convert. Alternatively, reference an already-uploaded file via the file_id query parameter instead of uploading here.|

##### Enumerated Values

|Parameter|Value|
|---|---|
|format|json|
|format|xml|
|profile|bw|
|profile|gray|
|profile|rgb|
|profile|rgba|
|profile|4-bit|
|profile|8-bit|

> Example responses

> PDF converted to PNG successfully

```json
{
  "taskId": "b48e5ed0-e5ce-41bd-953c-6c590ded4b20",
  "inputIds": [
    "6d994947-3909-46cf-91fe-24316c457e2a"
  ]
}
```

> Bad Request — Missing/invalid parameters or file ID

```json
{
  "timestamp": "2026-07-27T10:51:09.542Z",
  "path": "/v1.0/pdf/png",
  "status": 400,
  "error": "Missing File or ID",
  "message": "Please provide either a file or a file ID."
}
```

```json
{
  "error": "Invalid File ID Provided",
  "message": "Please provide a valid file ID",
  "path": "/pdf/png",
  "status": 400,
  "timestamp": "2026-07-27T10:51:11.802Z"
}
```

```json
{
  "timestamp": "2026-07-27T10:51:10.081Z",
  "path": "/v1.0/pdf/png",
  "status": 400,
  "error": "Invalid Image Profile",
  "message": "Please provide a valid image profile. Refer to the documentation for valid profiles."
}
```

```json
{
  "timestamp": "2026-07-27T10:51:11.203Z",
  "path": "/v1.0/pdf/png",
  "status": 400,
  "error": "Invalid Image Smoothing",
  "message": "Please provide a valid smoothing option or combination. Refer to the documentation for valid options."
}
```

```json
{
  "timestamp": "2026-07-27T10:51:10.648Z",
  "path": "/v1.0/pdf/png",
  "status": 400,
  "error": "Invalid Image Resolution",
  "message": "Please provide a valid image resolution(dpi). Refer to the documentation for valid resolution values."
}
```

#### Responses

|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|PDF converted to PNG successfully|[PDFResponse](#pdfresponse)|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Bad Request — Missing/invalid parameters or file ID|[ErrorResponse](#errorresponse)|

#### Response Headers

|Status|Header|Type|Format|Description|
|---|---|---|---|---|
|200|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|
|400|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|

To perform this operation, you must be authenticated by means of one of the following methods:
ApiKeyAuthHeader, ApiKeyAuthQuery

### post__pdf_jpg

`POST /pdf/jpg`

*Convert PDF to JPG*

This API converts a given PDF file into a sequence of JPG images.

> Body parameter

```yaml
file: string

```

#### Parameters

|Name|In|Type|Required|Description|
|---|---|---|---|---|
|format|query|string|false|Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.|
|file_id|query|string|false|The unique ID of a PDF file already uploaded to the API Freaks server. Use this as an alternative to uploading a new file directly.|
|destroy|query|boolean|false|If set to `true`, the input file(s) will be permanently deleted from the server immediately after the output PDF is generated.|
|output|query|string|false|The desired name for the output unrestricted PDF file. If not provided, a default name will be assigned.|
|quality|query|integer|false|Controls JPG compression quality. Higher values yield sharper images with larger file sizes.|
|pages|query|string|false|Specifies the pages or ranges at which to split the PDF. Accepts individual page numbers (e.g., '1') and/or page ranges (e.g., '4-2', 'last'). Ranges can be ascending or descending. Use commas to separate entries and hyphens for ranges. Alternatively, provide only one of the following keywords: 'even' (split at every even-numbered page), 'odd' (split at every odd-numbered page), 'last' (split at the last page only), or 'all' (split into single pages). Examples: '1,4-2,last', 'odd', 'all'. Mixing special keywords with specific pages/ranges is not allowed.|
|resolution|query|integer|false|Specifies the resolution (in DPI) for the output images. Acceptable Range is from 20 to 1200.|
|image_smoothing|query|string|false|Determines the smoothing options to apply during image conversion. Valid values are 'none', 'all' or a combination of 'text', 'line', and 'image' (comma-separated).If not provided, no smoothing will be applied.|
|profile|query|string|false|Specifies the color profile for the output JPG images. Acceptable values: bw (1-bit black & white, smallest size, no grayscale or color), gray (8-bit grayscale), rgb (24-bit RGB color, default), rgba (32-bit RGB color with alpha channel for transparency), 4-bit (4-bit indexed color, up to 16 colors, smaller size), or 8-bit (8-bit indexed color, up to 256 colors).|
|webhook_url|query|string|false|The URL to which the webhook notification will be sent after the task is completed.|
|webhook_failure_notification|query|boolean|false|If true, a notification will also be sent by email in case the webhook request fails all the retries.  The email notification will be sent to the requesting user or their organization’s admin if part of one.|
|X-Webhook-Authorization|header|string|false|Optional custom header for webhook requests. Format: `Key:Value` (e.g., `Authorization:Bearer token123`). This will be sent as an HTTP header in the webhook call.|
|body|body|[PdfFileUploadRequest](#pdffileuploadrequest)|false|Multipart form-data body carrying the PDF file to convert. Alternatively, reference an already-uploaded file via the file_id query parameter instead of uploading here.|

##### Enumerated Values

|Parameter|Value|
|---|---|
|format|json|
|format|xml|
|profile|gray|
|profile|rgb|
|profile|cmyk|

> Example responses

> PDF converted to JPG successfully

```json
{
  "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d",
  "inputIds": [
    "7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f"
  ]
}
```

> Bad Request — Missing/invalid parameters or file ID

```json
{
  "timestamp": "2026-07-27T10:51:09.542Z",
  "path": "/v1.0/pdf/jpg",
  "status": 400,
  "error": "Missing File or ID",
  "message": "Please provide either a file or a file ID."
}
```

```json
{
  "error": "Invalid File ID Provided",
  "message": "Please provide a valid file ID",
  "path": "/pdf/jpg",
  "status": 400,
  "timestamp": "2026-07-27T10:51:11.802Z"
}
```

```json
{
  "timestamp": "2026-07-27T10:51:10.081Z",
  "path": "/v1.0/pdf/jpg",
  "status": 400,
  "error": "Invalid Image Profile",
  "message": "Please provide a valid image profile. Refer to the documentation for valid profiles."
}
```

```json
{
  "timestamp": "2026-07-27T10:51:11.203Z",
  "path": "/v1.0/pdf/jpg",
  "status": 400,
  "error": "Invalid Image Smoothing",
  "message": "Please provide a valid smoothing option or combination. Refer to the documentation for valid options."
}
```

```json
{
  "timestamp": "2025-08-18T10:22:25.866Z",
  "path": "/v1.0/pdf/jpg",
  "status": 400,
  "error": "Invalid Image Quality",
  "message": "Please provide a valid image quality value from 1 to 100."
}
```

```json
{
  "timestamp": "2026-07-27T10:51:10.648Z",
  "path": "/v1.0/pdf/jpg",
  "status": 400,
  "error": "Invalid Image Resolution",
  "message": "Please provide a valid image resolution(dpi). Refer to the documentation for valid resolution values."
}
```

#### Responses

|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|PDF converted to JPG successfully|[PDFResponse](#pdfresponse)|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Bad Request — Missing/invalid parameters or file ID|[ErrorResponse](#errorresponse)|

#### Response Headers

|Status|Header|Type|Format|Description|
|---|---|---|---|---|
|200|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|
|400|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|

To perform this operation, you must be authenticated by means of one of the following methods:
ApiKeyAuthHeader, ApiKeyAuthQuery

### post__pdf_tif

`POST /pdf/tif`

*Convert a PDF file into a sequence of TIFF images.*

This API converts a given PDF file into a sequence of TIFF images. The output images can be saved as a single TIFF file, or as a sequence of TIFF files.

> Body parameter

```yaml
file: string

```

#### Parameters

|Name|In|Type|Required|Description|
|---|---|---|---|---|
|format|query|string|false|Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.|
|file_id|query|string|false|The unique ID of a PDF file already uploaded to the API Freaks server. Use this as an alternative to uploading a new file directly.|
|destroy|query|boolean|false|If set to `true`, the input file(s) will be permanently deleted from the server immediately after the output PDF is generated.|
|output|query|string|false|The desired name for the output unrestricted PDF file. If not provided, a default name will be assigned.|
|pages|query|string|false|Specifies the pages or ranges at which to split the PDF. Accepts individual page numbers (e.g., '1') and/or page ranges (e.g., '4-2', 'last'). Ranges can be ascending or descending. Use commas to separate entries and hyphens for ranges. Alternatively, provide only one of the following keywords: 'even' (split at every even-numbered page), 'odd' (split at every odd-numbered page), 'last' (split at the last page only), or 'all' (split into single pages). Examples: '1,4-2,last', 'odd', 'all'. Mixing special keywords with specific pages/ranges is not allowed.|
|resolution|query|integer|false|Specifies the resolution (in DPI) for the output images. Acceptable Range is from 20 to 1200.|
|image_smoothing|query|string|false|Determines the smoothing options to apply during image conversion. Valid values are 'none', 'all' or a combination of 'text', 'line', and 'image' (comma-separated).If not provided, no smoothing will be applied.|
|profile|query|string|false|Specifies the color profile for the output TIF images. Acceptable values: bw (1-bit black & white, smallest size, no grayscale or color), gray (8-bit grayscale), rgb (24-bit RGB color, default), rgba (32-bit RGB color with alpha channel for transparency), 4-bit (4-bit indexed color, up to 16 colors, smaller size), or 8-bit (8-bit indexed color, up to 256 colors).|
|webhook_url|query|string|false|The URL to which the webhook notification will be sent after the task is completed.|
|webhook_failure_notification|query|boolean|false|If true, a notification will also be sent by email in case the webhook request fails all the retries.  The email notification will be sent to the requesting user or their organization’s admin if part of one.|
|X-Webhook-Authorization|header|string|false|Optional custom header for webhook requests. Format: `Key:Value` (e.g., `Authorization:Bearer token123`). This will be sent as an HTTP header in the webhook call.|
|body|body|[PdfFileUploadRequest](#pdffileuploadrequest)|false|Multipart form-data body carrying the PDF file to convert. Alternatively, reference an already-uploaded file via the file_id query parameter instead of uploading here.|

##### Enumerated Values

|Parameter|Value|
|---|---|
|format|json|
|format|xml|
|profile|bw|
|profile|gray|
|profile|rgb|
|profile|rgba|
|profile|cmyk|

> Example responses

> PDF converted to TIF successfully

```json
{
  "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d",
  "inputIds": [
    "7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f"
  ]
}
```

> Bad Request — Missing/invalid parameters or file ID

```json
{
  "timestamp": "2026-07-27T10:51:09.542Z",
  "path": "/v1.0/pdf/tif",
  "status": 400,
  "error": "Missing File or ID",
  "message": "Please provide either a file or a file ID."
}
```

```json
{
  "error": "Invalid File ID Provided",
  "message": "Please provide a valid file ID",
  "path": "/pdf/tif",
  "status": 400,
  "timestamp": "2026-07-27T10:51:11.802Z"
}
```

```json
{
  "timestamp": "2026-07-27T10:51:10.081Z",
  "path": "/v1.0/pdf/tif",
  "status": 400,
  "error": "Invalid Image Profile",
  "message": "Please provide a valid image profile. Refer to the documentation for valid profiles."
}
```

```json
{
  "timestamp": "2026-07-27T10:51:11.203Z",
  "path": "/v1.0/pdf/tif",
  "status": 400,
  "error": "Invalid Image Smoothing",
  "message": "Please provide a valid smoothing option or combination. Refer to the documentation for valid options."
}
```

```json
{
  "timestamp": "2026-07-27T10:51:10.648Z",
  "path": "/v1.0/pdf/tif",
  "status": 400,
  "error": "Invalid Image Resolution",
  "message": "Please provide a valid image resolution(dpi). Refer to the documentation for valid resolution values."
}
```

#### Responses

|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|PDF converted to TIF successfully|[PDFResponse](#pdfresponse)|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Bad Request — Missing/invalid parameters or file ID|[ErrorResponse](#errorresponse)|

#### Response Headers

|Status|Header|Type|Format|Description|
|---|---|---|---|---|
|200|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|
|400|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|

To perform this operation, you must be authenticated by means of one of the following methods:
ApiKeyAuthHeader, ApiKeyAuthQuery

### post__pdf_bmp

`POST /pdf/bmp`

*Convert PDF to BMP*

Converts a PDF file to a BMP image.

> Body parameter

```yaml
file: string

```

#### Parameters

|Name|In|Type|Required|Description|
|---|---|---|---|---|
|format|query|string|false|Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.|
|file_id|query|string|false|The unique ID of a PDF file already uploaded to the API Freaks server. Use this as an alternative to uploading a new file directly.|
|destroy|query|boolean|false|If set to `true`, the input file(s) will be permanently deleted from the server immediately after the output PDF is generated.|
|output|query|string|false|The desired name for the output unrestricted PDF file. If not provided, a default name will be assigned.|
|pages|query|string|false|Specifies the pages or ranges at which to split the PDF. Accepts individual page numbers (e.g., '1') and/or page ranges (e.g., '4-2', 'last'). Ranges can be ascending or descending. Use commas to separate entries and hyphens for ranges. Alternatively, provide only one of the following keywords: 'even' (split at every even-numbered page), 'odd' (split at every odd-numbered page), 'last' (split at the last page only), or 'all' (split into single pages). Examples: '1,4-2,last', 'odd', 'all'. Mixing special keywords with specific pages/ranges is not allowed.|
|resolution|query|integer|false|Specifies the resolution (in DPI) for the output images. Acceptable Range is from 20 to 1200.|
|image_smoothing|query|string|false|Determines the smoothing options to apply during image conversion. Valid values are 'none', 'all' or a combination of 'text', 'line', and 'image' (comma-separated).If not provided, no smoothing will be applied.|
|profile|query|string|false|Specifies the color profile for the output BMP images. Acceptable values: bw (1-bit black & white, smallest size, no grayscale or color), gray (8-bit grayscale), rgb (24-bit RGB color, default), rgba (32-bit RGB color with alpha channel for transparency), 4-bit (4-bit indexed color, up to 16 colors, smaller size), or 8-bit (8-bit indexed color, up to 256 colors).|
|webhook_url|query|string|false|The URL to which the webhook notification will be sent after the task is completed.|
|webhook_failure_notification|query|boolean|false|If true, a notification will also be sent by email in case the webhook request fails all the retries.  The email notification will be sent to the requesting user or their organization’s admin if part of one.|
|X-Webhook-Authorization|header|string|false|Optional custom header for webhook requests. Format: `Key:Value` (e.g., `Authorization:Bearer token123`). This will be sent as an HTTP header in the webhook call.|
|body|body|[PdfFileUploadRequest](#pdffileuploadrequest)|false|Multipart form-data body carrying the PDF file to convert. Alternatively, reference an already-uploaded file via the file_id query parameter instead of uploading here.|

##### Enumerated Values

|Parameter|Value|
|---|---|
|format|json|
|format|xml|
|profile|bw|
|profile|gray|
|profile|rgb|
|profile|4-bit|
|profile|8-bit|

> Example responses

> PDF converted to BMP successfully

```json
{
  "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d",
  "inputIds": [
    "7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f"
  ]
}
```

> Bad Request — Missing/invalid parameters or file ID

```json
{
  "timestamp": "2026-07-27T10:51:09.542Z",
  "path": "/v1.0/pdf/bmp",
  "status": 400,
  "error": "Missing File or ID",
  "message": "Please provide either a file or a file ID."
}
```

```json
{
  "error": "Invalid File ID Provided",
  "message": "Please provide a valid file ID",
  "path": "/pdf/bmp",
  "status": 400,
  "timestamp": "2026-07-27T10:51:11.802Z"
}
```

```json
{
  "timestamp": "2026-07-27T10:51:10.081Z",
  "path": "/v1.0/pdf/bmp",
  "status": 400,
  "error": "Invalid Image Profile",
  "message": "Please provide a valid image profile. Refer to the documentation for valid profiles."
}
```

```json
{
  "timestamp": "2026-07-27T10:51:11.203Z",
  "path": "/v1.0/pdf/bmp",
  "status": 400,
  "error": "Invalid Image Smoothing",
  "message": "Please provide a valid smoothing option or combination. Refer to the documentation for valid options."
}
```

```json
{
  "timestamp": "2026-07-27T10:51:10.648Z",
  "path": "/v1.0/pdf/bmp",
  "status": 400,
  "error": "Invalid Image Resolution",
  "message": "Please provide a valid image resolution(dpi). Refer to the documentation for valid resolution values."
}
```

#### Responses

|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|PDF converted to BMP successfully|[PDFResponse](#pdfresponse)|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Bad Request — Missing/invalid parameters or file ID|[ErrorResponse](#errorresponse)|

#### Response Headers

|Status|Header|Type|Format|Description|
|---|---|---|---|---|
|200|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|
|400|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|

To perform this operation, you must be authenticated by means of one of the following methods:
ApiKeyAuthHeader, ApiKeyAuthQuery

### post__pdf_gif

`POST /pdf/gif`

*Convert PDF to GIF*

This API converts a given PDF file into a sequence of GIF images.

> Body parameter

```yaml
file: string

```

#### Parameters

|Name|In|Type|Required|Description|
|---|---|---|---|---|
|format|query|string|false|Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.|
|file_id|query|string|false|The unique ID of a PDF file already uploaded to the API Freaks server. Use this as an alternative to uploading a new file directly.|
|destroy|query|boolean|false|If set to `true`, the input file(s) will be permanently deleted from the server immediately after the output PDF is generated.|
|output|query|string|false|The desired name for the output unrestricted PDF file. If not provided, a default name will be assigned.|
|pages|query|string|false|Specifies the pages or ranges at which to split the PDF. Accepts individual page numbers (e.g., '1') and/or page ranges (e.g., '4-2', 'last'). Ranges can be ascending or descending. Use commas to separate entries and hyphens for ranges. Alternatively, provide only one of the following keywords: 'even' (split at every even-numbered page), 'odd' (split at every odd-numbered page), 'last' (split at the last page only), or 'all' (split into single pages). Examples: '1,4-2,last', 'odd', 'all'. Mixing special keywords with specific pages/ranges is not allowed.|
|resolution|query|integer|false|Specifies the resolution (in DPI) for the output images. Acceptable Range is from 20 to 1200.|
|image_smoothing|query|string|false|Determines the smoothing options to apply during image conversion. Valid values are 'none', 'all' or a combination of 'text', 'line', and 'image' (comma-separated).If not provided, no smoothing will be applied.|
|profile|query|string|false|Specifies the color profile for the output GIF images. Acceptable values: bw (1-bit black & white, smallest size, no grayscale or color), gray (8-bit grayscale), rgb (24-bit RGB color, default), rgba (32-bit RGB color with alpha channel for transparency), 4-bit (4-bit indexed color, up to 16 colors, smaller size), or 8-bit (8-bit indexed color, up to 256 colors).|
|webhook_url|query|string|false|The URL to which the webhook notification will be sent after the task is completed.|
|webhook_failure_notification|query|boolean|false|If true, a notification will also be sent by email in case the webhook request fails all the retries.  The email notification will be sent to the requesting user or their organization’s admin if part of one.|
|X-Webhook-Authorization|header|string|false|Optional custom header for webhook requests. Format: `Key:Value` (e.g., `Authorization:Bearer token123`). This will be sent as an HTTP header in the webhook call.|
|body|body|[PdfFileUploadRequest](#pdffileuploadrequest)|false|Multipart form-data body carrying the PDF file to convert. Alternatively, reference an already-uploaded file via the file_id query parameter instead of uploading here.|

##### Enumerated Values

|Parameter|Value|
|---|---|
|format|json|
|format|xml|
|profile|bw|
|profile|gray|
|profile|rgb|
|profile|rgba|
|profile|4-bit|
|profile|8-bit|

> Example responses

> PDF converted to GIF successfully

```json
{
  "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d",
  "inputIds": [
    "7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f"
  ]
}
```

> Bad Request — Missing/invalid parameters or file ID

```json
{
  "timestamp": "2026-07-27T10:51:09.542Z",
  "path": "/v1.0/pdf/gif",
  "status": 400,
  "error": "Missing File or ID",
  "message": "Please provide either a file or a file ID."
}
```

```json
{
  "error": "Invalid File ID Provided",
  "message": "Please provide a valid file ID",
  "path": "/pdf/gif",
  "status": 400,
  "timestamp": "2026-07-27T10:51:11.802Z"
}
```

```json
{
  "timestamp": "2026-07-27T10:51:10.081Z",
  "path": "/v1.0/pdf/gif",
  "status": 400,
  "error": "Invalid Image Profile",
  "message": "Please provide a valid image profile. Refer to the documentation for valid profiles."
}
```

```json
{
  "timestamp": "2026-07-27T10:51:11.203Z",
  "path": "/v1.0/pdf/gif",
  "status": 400,
  "error": "Invalid Image Smoothing",
  "message": "Please provide a valid smoothing option or combination. Refer to the documentation for valid options."
}
```

```json
{
  "timestamp": "2026-07-27T10:51:10.648Z",
  "path": "/v1.0/pdf/gif",
  "status": 400,
  "error": "Invalid Image Resolution",
  "message": "Please provide a valid image resolution(dpi). Refer to the documentation for valid resolution values."
}
```

#### Responses

|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|PDF converted to GIF successfully|[PDFResponse](#pdfresponse)|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Bad Request — Missing/invalid parameters or file ID|[ErrorResponse](#errorresponse)|

#### Response Headers

|Status|Header|Type|Format|Description|
|---|---|---|---|---|
|200|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|
|400|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|

To perform this operation, you must be authenticated by means of one of the following methods:
ApiKeyAuthHeader, ApiKeyAuthQuery

## Schemas

### PDFResponse

Response containing the task ID and input file IDs for a PDF processing task.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|taskId|string|true|none|Task ID of the requested task, used to check the task status.|
|inputIds|[string]|false|none|File IDs for the input files provided for the task. Not returned when destroy parameter is true.|

### PdfFileUploadRequest

Multipart form-data request body containing the PDF file to process.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|file|string(binary)|false|none|Raw PDF file bytes sent as a multipart/form-data field named 'file'. Omit this field entirely and pass file_id in the query string instead to use an already-uploaded file.|

### ErrorResponse

Standard error envelope returned by the API on failed requests.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|error|string|false|none|Short error category or exception type.|
|message|string|true|none|Human-readable error message describing the failure.|
|path|string|false|none|API endpoint path that produced the error.|
|status|integer|false|none|HTTP status code returned with the error.|
|timestamp|string(date-time)|false|none|Timestamp when the error occurred (ISO 8601).|
