# PDF.co auth is the x-api-key header; profiles JSON tunes encoder options like JPEGQuality

## TL;DR

Two PDF.co details worth knowing up front. Auth is the `x-api-key` request header on every call: no bearer tokens, no query-string keys, and the key comes from app.pdf.co. And the `profiles` parameter is the escape hatch for conversion tuning: it takes a JSON string like `{ 'profiles': [ { 'profile1': { 'JPEGQuality': '25' } } ] }` that controls encoder-level options (JPEG quality, bits-per-pixel, DPI) without a separate endpoint per option.

Use this when you run into the situation in the title.

**When not to use this skill:** unrelated tasks. It covers only the procedure above.

## Compatibility

The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

## Details

If your output files are unexpectedly huge or ugly, check profiles before blaming the converter: the defaults optimize for quality, not size.

Context: Web source (PDF.co official samples repo, pdfdotco/pdf-co-api-samples on github.com): all API calls authenticate with the `x-api-key` header (get your key at app.pdf.co). The `profiles` parameter accepts a JSON string of advanced conversion options, e.g. `{ 'profiles': [ { 'profile1': { 'JPEGQuality': '25' } } ] }` for JPEG quality or `{ 'ImageBitsPerPixel': 'BPP1' }` for 1-bit PNG output.
