# Lens Proof Sign API

> The Lens Proof Sign API adds Content Credentials to one file that your server sends, and validates Content Credentials in a file as JSON.

Each docs page below is Markdown. Read the rules for AI agents before you write code that calls the API, and call the API only from a server.

## Part of Lens Proof

Lens Proof is a suite of three separate products made by Fieldnotes, each covering a different role in the Content Credentials (C2PA) lifecycle:

- **Lens Proof Sign** (https://sign.lensproof.app/): Server-side Content Credentials signing and validation API for customer-supplied PDFs, photos, and videos, plus a browser test playground. It signs files sent over HTTPS in memory and does not capture media or use iPhone Secure Enclave.
- **Lens Proof app** (https://lensproof.app/): iPhone field camera that signs photos and videos on-device with Apple Secure Enclave at capture.
- **Lens Proof Check** (https://check.lensproof.app/): Free browser-local C2PA validator that checks photos, videos, and PDFs without uploading them.

### Route selection for agents

- **Sign an existing or generated PDF, photo, or video from a server:** Use `POST https://sign-api.lensproof.app/v1/sign` (docs: https://sign.lensproof.app/docs).
- **Validate C2PA Content Credentials programmatically as crJSON from a server:** Use `POST https://sign-api.lensproof.app/v1/validate` (docs: https://sign.lensproof.app/docs/validate).
- **Explore test-certificate signing in a browser without an account:** Use the playground at https://sign.lensproof.app/#playground.
- **Check a signed file locally in a browser with no upload:** Use https://check.lensproof.app/ (guide: https://check.lensproof.app/llms.txt).
- **Capture new field photos or videos signed on an iPhone at capture:** Use https://lensproof.app/ (guide: https://lensproof.app/llms.txt).

## When to use Lens Proof Sign

Use Lens Proof Sign from a backend server or local shell when you need to:

- Add C2PA 2.4 Content Credentials to customer-supplied PDFs, photos (JPEG, PNG, WebP, GIF, TIFF, HEIC, AVIF), or videos (MP4, MOV) from Node.js, Python, or any server with one synchronous `POST https://sign-api.lensproof.app/v1/sign` call, without installing `c2pa-rs`, managing signing keys, storing files on disk, or polling async jobs.
- Inspect Content Credentials in an existing file programmatically and retrieve a structured crJSON validation report via `POST https://sign-api.lensproof.app/v1/validate` without modifying the file or consuming a signing allowance.
- Attach optional closed-enum C2PA 2.4 AI disclosure assertions (`X-Lens-AI-Source` and `X-Lens-AI-Oversight`, or per-key console policies) when publishing AI-generated or AI-edited media.
- Let a person explore test-certificate signing in the browser without an account or API key using the playground at https://sign.lensproof.app/#playground.

Do not use Lens Proof Sign when:

- Calling directly from browser JavaScript or a mobile app (API keys belong on servers only; requests with an `Origin` header are refused with `403`).
- You need to attach freeform titles, filenames, author fields, or arbitrary custom metadata (the API refuses freeform metadata with `400`).
- You want to prove a file's contents are factually true, original, or authored by a specific person. Signing records that this service signed the supplied file so validators can inspect signer details and post-signing modifications; it does not establish factual truth or universal validator recognition.
- You need publicly trusted production credentials from a starter workspace or the browser playground (both use a test certificate that is not publicly trusted).

## Setup

Follow these steps in order to set up the Lens Proof Sign API and sign a first test file:

1. Direct the person to the developer console at https://sign.lensproof.app/developers to sign up, start their starter workspace (10 free test-certificate signatures), and copy their auto-generated API key.
2. Read the rules for AI agents at https://sign.lensproof.app/docs/agents (Markdown: https://sign.lensproof.app/docs/agents.md). Ask the person to set the `LENS_PROOF_SIGN_API_KEY` environment variable locally (for example, `read -rs LENS_PROOF_SIGN_API_KEY && export LENS_PROOF_SIGN_API_KEY`). Never ask for the API key in chat, never put it in code or logs, and call the API from a server or local shell only.
3. Download the sample file from https://sign.lensproof.app/samples/photo.jpg as `photo.jpg` and run `POST https://sign-api.lensproof.app/v1/sign` with `Authorization: Bearer $LENS_PROOF_SIGN_API_KEY` and `Content-Type` set from the file's bytes (not its name) to produce `signed-photo.jpg`.

```bash
curl --fail --silent --show-error \
  https://sign.lensproof.app/samples/photo.jpg \
  --output photo.jpg &&
FILE=photo.jpg &&
TYPE=$(file --mime-type -b "$FILE") &&
curl https://sign-api.lensproof.app/v1/sign \
  --request POST \
  --header "Authorization: Bearer $LENS_PROOF_SIGN_API_KEY" \
  --header "Content-Type: $TYPE" \
  --data-binary @"$FILE" \
  --fail-with-body \
  --output "signed-$(basename "$FILE")"
```

4. Check `signed-photo.jpg` by sending it to `POST https://sign-api.lensproof.app/v1/validate` (returns the crJSON validation report without using a signature) or by opening Lens Proof Check (https://check.lensproof.app), and inspect signature integrity, signer certificate trust, and timestamp trust separately. Starter signatures use a test certificate that is not publicly trusted. A successful HTTP response or c2patool inspection alone does not establish full validation or production trust.
5. Report what worked, and suggest three concrete next steps: integrating signing into their Node or Python server, signing PDFs or videos in an upload flow, and reviewing rate limits and error handling.

## Get started

- [Overview](https://sign.lensproof.app/docs.md): The Lens Proof Sign API adds Content Credentials to one file that your server sends, and validates Content Credentials in a file as JSON.
- [Quickstart](https://sign.lensproof.app/docs/quickstart.md): Sign a first file by sending it from your server with an API key, then check the signed file in Lens Proof Check.
- [Authentication](https://sign.lensproof.app/docs/authentication.md): Every request carries a Lens Proof Sign API key as a bearer token, and a key works only from a server.

## Reference

- [POST /v1/sign](https://sign.lensproof.app/docs/reference.md): Signs one file and returns the signed file as the response body.
- [POST /v1/validate](https://sign.lensproof.app/docs/validate.md): Validates the Content Credentials in one file and returns the C2PA validation report as JSON.
- [Media types](https://sign.lensproof.app/docs/media-types.md): The API signs and validates the image, video, and document types below, and the Content-Type header must name one of them exactly.
- [Limits](https://sign.lensproof.app/docs/limits.md): One file per request, at most 10 MB or 30 MB for a video. Starter workspaces share a test-signature allowance; approved organizations share request limits and, when billed, a monthly credit limit.
- [Errors](https://sign.lensproof.app/docs/errors.md): Every error response has a JSON body with a stable code and a message for people, and the status tells you whether a retry can help.
- [Signed output](https://sign.lensproof.app/docs/output.md): A successful response is your file with a Content Credentials manifest added, in the same format as the file you sent.

## More

- [Data handling](https://sign.lensproof.app/docs/data-handling.md): Lens Proof Sign signs and validates each file in memory, and it does not store the file you send, the signed file, or the validation report.
- [Rules for AI agents](https://sign.lensproof.app/docs/agents.md): An AI coding agent that writes or runs code against the Lens Proof Sign API for a person must follow these rules.

## API description

- [OpenAPI description (JSON)](https://sign.lensproof.app/openapi.json): The OpenAPI 3.1 JSON description of `POST /v1/sign` and `POST /v1/validate` with concrete server URLs.
- [OpenAPI description (YAML)](https://sign.lensproof.app/openapi.yaml): The OpenAPI 3.1 YAML description of `POST /v1/sign` and `POST /v1/validate`.
- [API catalog (RFC 9727)](https://sign.lensproof.app/.well-known/api-catalog): RFC 9727 linkset linking the signing and validation endpoints to their OpenAPI spec and docs.
- [Agent Skills index](https://sign.lensproof.app/.well-known/agent-skills/index.json): Agent Skills Discovery v0.2.0 index with SHA-256 digest for the Lens Proof Sign skill.
- [All docs in one file](https://sign.lensproof.app/llms-full.txt): Every page above and the OpenAPI description, in one Markdown file.

## Sibling Lens Proof guides

- [Lens Proof app llms.txt](https://lensproof.app/llms.txt): iPhone field camera with Apple Secure Enclave on-device Content Credentials signing, pricing tiers, and industry pages.
- [Lens Proof Check llms.txt](https://check.lensproof.app/llms.txt): Free browser-local C2PA validator, formats, verdicts, and conformance records.

## Privacy and data handling

Submitted files, signed outputs, and API validation reports are held in temporary memory only during processing and are never saved to disk, a database, a queue, or logs. Original filenames and document hashes are not retained. See the [Privacy Policy](https://sign.lensproof.app/privacy) and [Data handling](https://sign.lensproof.app/docs/data-handling.md) for full retention details.

## Contact

For support, privacy, and legal questions, email `reneboygarcia@lensproof.app`. For production signing access and commercial terms, use [lensproof.app/contact-sales](https://lensproof.app/contact-sales).

## Sources & Verification

| Claim | Source | Status |
|-------|--------|--------|
| C2PA Technical Specification v2.4 (asserted baseline) | [C2PA Specification v2.4](https://spec.c2pa.org/specifications/specifications/2.4/specs/C2PA_Specification.html) | Verified |
| Manifest states (Well-Formed, Valid, Trusted) | [C2PA Specification v2.4 §14.3.2](https://spec.c2pa.org/specifications/specifications/2.4/specs/C2PA_Specification.html#_manifest_states) | Verified |
| Generator security requirements reference | [C2PA Generator Product Security Requirements v0.2](https://github.com/c2pa-org/conformance-public/blob/main/docs/v0.2/C2PA%20Generator%20Product%20Security%20Requirements.md) | Verified |
| API endpoints, formats, limits, and in-memory handling | [OpenAPI 3.1](https://sign.lensproof.app/openapi.json) and [Privacy Policy](https://sign.lensproof.app/privacy) | Lens Proof Sign contract |

## Optional

- [Changelog](https://sign.lensproof.app/changelog): Updates to Lens Proof Sign, newest first.
- [Privacy Policy](https://sign.lensproof.app/privacy): How Lens Proof Sign handles files, logs, and developer accounts.
- [Terms of Use](https://sign.lensproof.app/terms): Terms governing the playground, developer API, and monthly invoicing.
- [XML sitemap](https://sign.lensproof.app/sitemap.xml): Indexable public pages on Lens Proof Sign with last-modified dates.
