> For AI agents: the complete documentation index is available at https://anyformat.swc.rs/llms.txt, the full documentation bundle is available at https://anyformat.swc.rs/llms-full.txt.

# API reference

Each format family is one package for Node.js and one package for Python. The
two packages of a family have the same API.

| Family                                           | Node.js functions            | Python functions              |
| ------------------------------------------------ | ---------------------------- | ----------------------------- |
| [Image](https://anyformat.swc.rs/api/image.md)   | `detect`, `supportedFormats` | `detect`, `supported_formats` |
| [Audio](https://anyformat.swc.rs/api/audio.md)   | `detect`, `supportedFormats` | `detect`, `supported_formats` |
| [Video](https://anyformat.swc.rs/api/video.md)   | `detect`, `supportedFormats` | `detect`, `supported_formats` |
| [Font](https://anyformat.swc.rs/api/font.md)     | `detect`, `supportedFormats` | `detect`, `supported_formats` |
| [PDF](https://anyformat.swc.rs/api/pdf.md)       | `isPdf`, `detectVersion`     | `is_pdf`, `detect_version`    |
| [Office](https://anyformat.swc.rs/api/office.md) | `detect`, `supportedFormats` | `detect`, `supported_formats` |

## Input

Each function takes the bytes of a file: a `Uint8Array` in Node.js, for example
a `Buffer`, and `bytes` in Python. The functions read only the leading bytes, so
you can give them the start of a file and not the whole file. The page of each
family tells how many bytes it needs.

## Names in each language

The Node.js API uses camel case, and the Python API uses snake case. A `null`
result in Node.js is `None` in Python.
