Send one or more JPG, PNG, or TIFF images as repeated file parts, in page order; get a single PDF delivered to your webhook.
See the JPG to PDF tool page, or the docs index for authentication, the shared request/webhook contract, and the generic error table.
POST /webhooks/trigger, same endpoint and fields as every tool, with tool="jpg-to-pdf" set explicitly (it's not the default).
curl -X POST https://api.anyconvert.app/webhooks/trigger \ -H "x-api-key: your_api_key_here" \ -F "file=@photo.jpg" \ -F "fileId=image-001" \ -F "referenceId=reference-001" \ -F "tool=jpg-to-pdf"
An optional options multipart field carrying a JSON object, validated synchronously before a credit is charged; a bad value is rejected with 400, not charged and not queued.
| pageSize | string | object, optional | "image" (default, each page sized from the image's own DPI), a named size (a4, a3, letter, legal), or { widthMm, heightMm }. |
| orientation | string, optional | "auto" (default), "portrait", or "landscape": only meaningful with a fixed pageSize. |
| fit | string, optional | "into" (default), "shrink", or "fill": how the image fits a fixed page size. |
| marginMm | number, optional | 0 to 50, default 0. |
| dpi | number, optional | 72 to 1200. Overrides each image's own DPI metadata, only used with pageSize: "image". |
| autoOrient | boolean, optional | Default true: rotate pages per each image’s EXIF orientation. |
| onBadInput | string, optional | "fail" (default) or "skip": skip an unreadable image instead of failing the whole job. |
| title | string, optional | Up to 200 characters, set as the PDF’s title. |
Send the file field multiple times in the same request (up to 200 files), one per output page, in order. A multi-frame TIFF expands into one page per frame automatically. A single file still works as before.
Billed per conversion, charged in full every time (not accumulated like DWG to PDF): $1 (1 credit) buys 5 conversions, at 0.2 credits each, however many images go into a single output PDF.
Delivered via the webhook as outcome=failure with a reason below; see the docs index for the full delivery shape.
| invalid_file | The file could not be read, or was not the format this tool expects. |
| render_failed | Something failed during conversion that wasn’t a problem with the input itself. |
| timeout | The job did not finish within its time budget. |
| internal_error | An unexpected error on our side. |