> ## Documentation Index
> Fetch the complete documentation index at: https://docs.iyzpdf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Authentication, limits, headers, and shared response models for the IyzPdf client API.

Use this section when you need the shared contract before looking at an individual endpoint page.

## Base URL

`https://api.iyzpdf.com/v1`

## Authentication

All examples in this reference use API-key authentication:

```http theme={null}
X-API-Key: iyz_live_your_key_here
```

Call the API from your backend or other trusted server environment.

## Rate Limits

Current authenticated limits from the backend configuration:

* **60 requests per minute** when the account has available credits
* **10 requests per minute** when the account has zero credits
* **10 requests per second burst** with credits
* **2 requests per second burst** with zero credits

## Default Success Behavior

* Binary endpoints return a file attachment by default
* `POST /convert/xml-to-html` returns HTML by default
* `Accept: application/json` switches the response to metadata

Metadata shape:

```json theme={null}
{
  "fileName": "output.pdf",
  "size": 245812,
  "creditsUsed": 1,
  "creditsRemaining": 49,
  "contentType": "application/pdf"
}
```

## Shared Success Headers

| Header                  | Meaning                                      |
| ----------------------- | -------------------------------------------- |
| `X-Request-Id`          | Request identifier for support and debugging |
| `X-Processing-Time-Ms`  | End-to-end processing time                   |
| `X-Credits-Used`        | Credits consumed by the request              |
| `X-Credits-Remaining`   | Remaining balance after the request          |
| `X-RateLimit-Limit`     | Current minute-level limit                   |
| `X-RateLimit-Remaining` | Remaining requests in the current window     |
| `X-RateLimit-Reset`     | Unix timestamp for the next reset            |
| `X-Pdf-Engine`          | Returned by PDF editing operations           |
| `X-Original-Size`       | Returned by PDF compression                  |
| `X-Compressed-Size`     | Returned by PDF compression                  |
| `X-Compression-Ratio`   | Returned by PDF compression                  |

## Error Model

```json theme={null}
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "A PDF file and pages array are required."
  }
}
```

Credit-related errors can also include:

* `creditsRequired`
* `creditsBalance`
* `purchaseUrl`

## Endpoint Catalog

| Endpoint                        | Request type      | Output | Credits |
| ------------------------------- | ----------------- | ------ | ------- |
| `POST /convert/html-to-pdf`     | JSON or multipart | PDF    | 1 or 2  |
| `POST /convert/markdown-to-pdf` | JSON or multipart | PDF    | 1       |
| `POST /convert/word-to-pdf`     | Multipart         | PDF    | 2       |
| `POST /convert/excel-to-pdf`    | Multipart         | PDF    | 2       |
| `POST /convert/csv-to-pdf`      | Multipart         | PDF    | 1       |
| `POST /convert/xml-to-html`     | JSON or multipart | HTML   | 1       |
| `POST /pdf/merge`               | Multipart         | PDF    | 1       |
| `POST /pdf/pages/remove`        | Multipart         | PDF    | 1       |
| `POST /pdf/compress`            | Multipart         | PDF    | 2       |

## OpenAPI

This Mintlify bundle also includes a static OpenAPI file at [openapi.json](/openapi.json).
