Choose the returned file format in image creation requests
Image creation requests can now include format in the request body. This parameter selects the file extension included in the returned URL; it does not change the stored image definition.
- Set
formattopng,jpg,webp, orpdffor an HTML/CSS image, URL screenshot, saved-template image, or image batch. - Raster images are rendered and stored as PNGs. JPG and WebP URLs convert that stored PNG when requested.
- PDFs are rendered and saved separately when a PDF URL is requested.
- The same image ID can still be requested later with a different supported extension.
- Batch requests can set
formatindefault_optionsor override it in an individual variation. - When omitted, the API returns its default extensionless URL, which renders as PNG.
The official clients now expose the body parameter and apply it to generated signed URL paths:
- .NET client v0.12.0 with
RenderImageFormat.PDFsupport. - TypeScript client v0.9.0.
- Ruby client v0.3.0.
Read the format parameter documentation or compare output types in the file formats guide.