Quickstart
This walkthrough signs a JPEG with a C2PA manifest, downloads the signed file (with its .c2pa
manifest when the format uses one), and verifies the result. It needs curl, jq, shasum, and
uuidgen.
1. Get an API key
Section titled “1. Get an API key”In the console, open API keys and click Create API key. There are no options: one click issues one Full access key with every scope an integration uses (everything except managing keys and governance, starting payments, creator personal data and enrolment, and trusted-capture enrolment; see the preset table) and no expiry. It can sign, watermark, fingerprint and verify; what each call does (watermark, fingerprint, the AI mark, CAWG, express, verify) is chosen in that request’s body, not on the key. The secret is shown once. Revoke or rotate the key any time; an IP allowlist or a rate limit can be added later on the key’s page, under Restrict this key. Keys issued before 2026-10-19 keep the 90-day expiry they were issued with. See Authentication.
export OP_API_BASE_URL=https://api.originalpictures.comexport OP_API_KEY='opk_…' # paste from the console; do not commit itCheck that the key works before you upload anything. GET /v1/capabilities also lists the formats,
recipes, and watermark algorithms this deployment accepts now:
curl -sS "$OP_API_BASE_URL/v1/capabilities" -H "Authorization: Bearer $OP_API_KEY" > capabilities.jsonjq '[.media[] | select(.availability.available) | .media_type]' capabilities.jsonA 401 means the key is missing, wrong, expired, or revoked. A 403 means it lacks the scope.
2. Create an upload
Section titled “2. Create an upload”FILE=photo.jpgSHA256=$(shasum -a 256 "$FILE" | cut -d' ' -f1)SIZE=$(wc -c < "$FILE" | tr -d ' ')
curl -sS -X POST "$OP_API_BASE_URL/v1/uploads" \ -H "Authorization: Bearer $OP_API_KEY" \ -H "Content-Type: application/json" \ -d "{\"byte_length\": $SIZE, \"sha256\": \"$SHA256\", \"declared_media_type\": \"image/jpeg\", \"mode\": \"single\", \"filename\": \"$FILE\"}" \ > upload.json
UPLOAD_ID=$(jq -r .upload_id upload.json)ASSET_ID=$(jq -r .asset_id upload.json)3. Send the bytes
Section titled “3. Send the bytes”PUT the file to the issued URL with exactly the issued headers, and without your API key:
HEADERS=()while IFS= read -r header; do HEADERS+=(-H "$header"); done \ < <(jq -r '.upload.headers | to_entries[] | "\(.key): \(.value)"' upload.json)
curl -fsS -X PUT "${HEADERS[@]}" --upload-file "$FILE" "$(jq -r .upload.url upload.json)" \ && echo "upload OK"The upload session expires after an hour; create a new one if it has.
4. Complete the upload
Section titled “4. Complete the upload”curl -sS -X POST "$OP_API_BASE_URL/v1/uploads/$UPLOAD_ID/complete" \ -H "Authorization: Bearer $OP_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{}' > completed.json
ASSET_OBJECT_ID=$(jq -r .asset_object_id completed.json) # the unsigned original, as storedASSET_OBJECT_ID names the original you uploaded. The signed output is a new object, which step 8
reads from the receipt.
5. Sign
Section titled “5. Sign”Everything the job does is in the request body. Send both flags every time:
"watermark": false, "fingerprint": false writes and signs a C2PA manifest, and nothing else.
curl -sS -X POST "$OP_API_BASE_URL/v1/sign" \ -H "Authorization: Bearer $OP_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"asset_id\": \"$ASSET_ID\", \"watermark\": false, \"fingerprint\": false}" > job.json
JOB_ID=$(jq -r .job_id job.json)The answer is 202 with the job_id and its state. Each upload is signed once: signing the same
asset_id again is refused with 409, so upload the file again for a second variant.
The watermark and fingerprints are opt-in:
| Body | What the job adds |
|---|---|
"watermark": true, "fingerprint": false |
An invisible watermark, embedded before the manifest. |
"watermark": true, "fingerprint": true |
The watermark, plus server-side fingerprints for recovery. |
"watermark": false, "fingerprint": true |
Server-side fingerprints, no watermark. |
To declare that a generative model produced the file, add an ai_declaration and keep
"watermark": false; the C2PA claim plan refuses a watermark together with an AI declaration:
{ "asset_id": "ast_…", "watermark": false, "fingerprint": true, "ai_declaration": { "digital_source_type": "trainedAlgorithmicMedia", "software_agent_name": "Studio Nova Imagine" }}Sign lists every field, the algorithms and strengths you can choose, and every refusal.
6. Wait for the job
Section titled “6. Wait for the job”Poll until the job reaches a terminal state. Start at one second and double the wait up to 30 seconds:
DELAY=1while :; do STATE=$(curl -sS "$OP_API_BASE_URL/v1/jobs/$JOB_ID" -H "Authorization: Bearer $OP_API_KEY" \ | tee job.json | jq -r .state) case "$STATE" in completed|failed|rejected|canceled|expired) break ;; esac sleep "$DELAY" DELAY=$(( DELAY * 2 > 30 ? 30 : DELAY * 2 ))donejq '{state, error_code, result}' job.jsonA completed job’s result gives you the receipt_id, publication_id, and ready verification
evidence (verification_id, which starts with vfy_). Read that evidence with
GET /v1/verification-evidence/{verification_id}; it is not a verification job, so
GET /v1/verifications/{id} does not take it. On failed or rejected, error_code is
a reason code. Webhooks can replace polling.
7. Download the signed file
Section titled “7. Download the signed file”curl -sS -X POST "$OP_API_BASE_URL/v1/assets/$ASSET_ID/download" \ -H "Authorization: Bearer $OP_API_KEY" > download.json
FILENAME=$(jq -r .filename download.json)DOWNLOAD_HEADERS=()while IFS= read -r header; do DOWNLOAD_HEADERS+=(-H "$header"); done \ < <(jq -r '.headers | to_entries[] | "\(.key): \(.value)"' download.json)curl -sS "${DOWNLOAD_HEADERS[@]}" -o "$FILENAME" "$(jq -r .url download.json)"test "$(shasum -a 256 "$FILENAME" | cut -d' ' -f1)" = "$(jq -r .sha256 download.json)" \ && echo "sha256 OK"Downloading the asset_id returns its signed output. The link expires a few minutes after it is
issued (expires_at); ask for a new one if it has.
For a sidecar format the response also has sidecar_manifest.
Download it the same way and save it as sidecar_manifest.filename, next to the file:
if jq -e .sidecar_manifest download.json > /dev/null; then SIDECAR_HEADERS=() while IFS= read -r header; do SIDECAR_HEADERS+=(-H "$header"); done \ < <(jq -r '.sidecar_manifest.headers | to_entries[] | "\(.key): \(.value)"' download.json) curl -sS "${SIDECAR_HEADERS[@]}" -o "$(jq -r .sidecar_manifest.filename download.json)" \ "$(jq -r .sidecar_manifest.url download.json)"fiA JPEG carries its manifest inside the file, so this step does nothing for it. See Downloads and sidecar manifests.
8. Verify the signed object
Section titled “8. Verify the signed object”The receipt names the signed object. Submit it for verification:
curl -sS "$OP_API_BASE_URL/v1/receipts/$(jq -r .result.receipt_id job.json)" \ -H "Authorization: Bearer $OP_API_KEY" > receipt.jsonOUTPUT_OBJECT_ID=$(jq -r .evidence.output.object_id receipt.json)
curl -sS -X POST "$OP_API_BASE_URL/v1/verifications" \ -H "Authorization: Bearer $OP_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"object_id\": \"$OUTPUT_OBJECT_ID\"}" > verification.json
VERIFICATION_ID=$(jq -r .verification_id verification.json) # vjob_…, a verification jobDELAY=1while :; do STATE=$(curl -sS "$OP_API_BASE_URL/v1/verifications/$VERIFICATION_ID" \ -H "Authorization: Bearer $OP_API_KEY" | tee verification.json | jq -r .state) case "$STATE" in completed|failed) break ;; esac sleep "$DELAY" DELAY=$(( DELAY * 2 > 30 ? 30 : DELAY * 2 ))donejq '{state, evidence_id, result}' verification.jsonPOST /v1/verifications answers 202 with a verification_id that starts with vjob_: a job to
poll, which passes through accepted and running. When it is completed, evidence_id is the
vfy_… evidence. A sidecar file is verified the same way: send only the object id, and the API
finds the stored manifest.
Files signed on this API carry our production signing certificate from SSL.com, which is on the
C2PA Trust List, so a completed verification of your own file reports status: "valid". The
platform supplies that certificate’s revocation status from evidence refreshed daily; if that
evidence has lapsed, the result is unavailable with VALIDATION_REVOCATION_UNAVAILABLE among its
reasons, which means the manifest is intact but its trust could not be established. That is not a
failure of your integration; a later verification reads valid again. See Verify
for how to read the result.
Next steps
Section titled “Next steps”- Sign and Verify explain every field in more depth.
- A verify page lets anyone check a file against your own records, on a
hosted page or with the
<op-verify>embed on your site. - Workflow templates save a sign request shape to reuse by
template_id. - Errors covers retries,
Idempotency-Key, and429responses. - Webhooks notify you when an asset is published, so you can stop polling.
- The agent install guide is this flow written for an AI coding assistant.
- Prefer a client library? The same flow is one install away:
Python SDK (
pip install originalpictures-sdk), TypeScript SDK (npm i @originalpictures/sdk), the command line (pipx install originalpictures-cli) and a local MCP server (uvx originalpictures-mcp).