Starter API keys and the playground sign with a test certificate that is not publicly trusted.

LENS PROOF SIGN API

Media types

The API signs and validates the image, video, and document types below, and the Content-Type header must name one of them exactly.

View as Markdown

Images

  • JPEG, image/jpeg
  • PNG, image/png
  • WebP, image/webp
  • GIF, image/gif
  • TIFF, image/tiff
  • HEIC and HEIF, image/heic
  • AVIF, image/avif

Video

  • MP4, video/mp4
  • MOV (QuickTime), video/quicktime

Documents

  • PDF, application/pdf

How the type is checked

Set Content-Type to the type of the file you send. The API also reads the start of the file to find its real type, and it accepts the file only when the two agree. A file whose bytes are another supported type gets 415 with the code type_mismatch, and a file that the API can't identify gets 400 with the code unrecognized_file. Nothing is signed or validated in either case.

The API accepts no other names for these types, such as image/heif, image/x-tiff, or video/x-m4v. Send the type listed here, even for a file with another extension such as .heif or .m4v. A missing or unlisted Content-Type gets 415 with the code unsupported_media_type.

The size cap is 10 MB for an image or a PDF and 30 MB for a video, as described in Limits.