Skip to content

Quickstart

llms.txtAsk agent

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.

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.

Terminal window
export OP_API_BASE_URL=https://api.originalpictures.com
export OP_API_KEY='opk_…' # paste from the console; do not commit it

Check that the key works before you upload anything. GET /v1/capabilities also lists the formats, recipes, and watermark algorithms this deployment accepts now:

Terminal window
curl -sS "$OP_API_BASE_URL/v1/capabilities" -H "Authorization: Bearer $OP_API_KEY" > capabilities.json
jq '[.media[] | select(.availability.available) | .media_type]' capabilities.json

A 401 means the key is missing, wrong, expired, or revoked. A 403 means it lacks the scope.

Terminal window
FILE=photo.jpg
SHA256=$(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)

PUT the file to the issued URL with exactly the issued headers, and without your API key:

Terminal window
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.

Terminal window
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 stored

ASSET_OBJECT_ID names the original you uploaded. The signed output is a new object, which step 8 reads from the receipt.

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.

Terminal window
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.

Poll until the job reaches a terminal state. Start at one second and double the wait up to 30 seconds:

Terminal window
DELAY=1
while :; 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 ))
done
jq '{state, error_code, result}' job.json

A 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.

Terminal window
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:

Terminal window
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)"
fi

A JPEG carries its manifest inside the file, so this step does nothing for it. See Downloads and sidecar manifests.

The receipt names the signed object. Submit it for verification:

Terminal window
curl -sS "$OP_API_BASE_URL/v1/receipts/$(jq -r .result.receipt_id job.json)" \
-H "Authorization: Bearer $OP_API_KEY" > receipt.json
OUTPUT_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 job
DELAY=1
while :; 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 ))
done
jq '{state, evidence_id, result}' verification.json

POST /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.

  • 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, and 429 responses.
  • 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).