Image Metadata (C2PA) Removal — API Reference
Strip C2PA content credentials and provenance metadata from AI-generated images. The image endpoint removes embedded manifest stores, assertion stores, claim signatures, and all Content Credentials data from JPEG, PNG, and WebP files while preserving the original image quality and pixel data completely intact.
Endpoint
/v1/image/stripUpload an image file and receive the same image with all C2PA metadata removed. The endpoint accepts images up to 25MB in size via multipart form data upload. Processing typically completes in under 200ms for standard resolution images. The output image is byte-identical to the input in terms of pixel data; only the metadata containers and manifest stores are stripped from the file structure. This ensures zero quality loss during the removal process.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
image | file | Yes | The image file to process. Supported formats: JPEG, PNG, WebP. Maximum size: 25MB. |
strip_exif | boolean | No | Also remove EXIF metadata (camera info, GPS coordinates, timestamps). Default: false. |
strip_xmp | boolean | No | Also remove XMP metadata (editing history, software info). Default: false. |
strip_iptc | boolean | No | Also remove IPTC metadata (copyright, caption, keywords). Default: false. |
output_format | string | No | Convert output to a different format. Options: "jpeg", "png", "webp". Default: same as input. |
quality | integer | No | Output quality for lossy formats (1-100). Only applies when converting formats. Default: 95. |
Request Example
class=class="syn-string">"syn-comment"># Strip C2PA metadata class="syn-keyword">from an AI-generated image
with open(class=class="syn-string">"syn-string">"ai-generated-portrait.png", class=class="syn-string">"syn-string">"rb") as f:
result = client.image.strip_c2pa(
image=f,
strip_exif=True,
strip_xmp=True
)
class=class="syn-string">"syn-comment"># Save the clean image
with open(class=class="syn-string">"syn-string">"clean-portrait.png", class=class="syn-string">"syn-string">"wb") as out:
out.write(result.image_data)
print(fclass=class="syn-string">"syn-string">"C2PA manifests removed: {result.manifests_removed}")
print(fclass=class="syn-string">"syn-string">"Original size: {result.original_size} bytes")
print(fclass=class="syn-string">"syn-string">"Clean size: {result.clean_size} bytes")
print(fclass=class="syn-string">"syn-string">"Processing time: {result.processing_ms}ms")
class="syn-keyword">const fs = require(&class=class="syn-string">"syn-comment">#39;fs39;);
class=class="syn-string">"syn-comment">// Strip C2PA metadata from an AI-generated image
class="syn-keyword">const imageBuffer = fs.readFileSync(&class=class="syn-string">"syn-comment">#39;ai-generated-portrait.png39;);
class="syn-keyword">const result = await client.image.stripC2PA({
image: imageBuffer,
stripExif: true,
stripXmp: true
});
class=class="syn-string">"syn-comment">// Save the clean image
fs.writeFileSync(&class=class="syn-string">"syn-comment">#39;clean-portrait.png39;, result.imageData);
console.log(&class=class="syn-string">"syn-comment">#39;Manifests removed:39;, result.manifestsRemoved);
console.log(&class=class="syn-string">"syn-comment">#39;Original size:39;, result.originalSize);
console.log(&class=class="syn-string">"syn-comment">#39;Clean size:39;, result.cleanSize);
curl -X POST https:"syn-comment">//api.claudewatermark.org/v1/image/strip \
-F "syn-string">"image=@ai-generated-portrait.png" \
-F "syn-string">"strip_exif=true" \
-F "syn-string">"strip_xmp=true" \
-o clean-portrait.png
Response (JSON metadata)
When the Accept header is set to application/json, the endpoint returns metadata about the stripping operation instead of the binary image. This is useful for audit logging, verification workflows, and when you need to inspect what was removed before downloading the clean file. The JSON response includes details about every C2PA manifest, claim, and assertion that was found and removed from the image.
{
"syn-string">"success": true,
"syn-string">"manifests_removed": 2,
"syn-string">"claims_removed": 3,
"syn-string">"assertions_removed": [
"syn-string">"c2pa.actions",
"syn-string">"c2pa.hash.data",
"syn-string">"stds.schema-org.CreativeWork"
],
"syn-string">"signer": "syn-string">"Anthropic PBC",
"syn-string">"signed_at": "syn-string">"2026-08-12T14:30:00Z",
"syn-string">"original_size": 2847561,
"syn-string">"clean_size": 2831204,
"syn-string">"size_reduction_bytes": 16357,
"syn-string">"processing_ms": 142,
"syn-string">"download_url": "syn-string">"/v1/image/download/img_abc123",
"syn-string">"download_expires_at": "syn-string">"2026-08-13T12:00:00Z",
"syn-string">"request_id": "syn-string">"req_img_789"
}
Inspect Without Removing
The GET /v1/image/strip endpoint lets you examine C2PA metadata without stripping it. Upload an image to see the full manifest structure, claim chain, assertion details, signer certificates, and timestamp information. This is valuable for understanding what provenance data exists in an image before deciding whether to remove it. Inspect requests are free and do not count against your monthly quota, making them ideal for building classification and triage workflows.
curl -X POST https:"syn-comment">//api.claudewatermark.org/v1/image/strip \
-F "syn-string">"image=@suspicious-image.png"
Error Codes
| Status | Code | Description |
|---|---|---|
| 400 | invalid_image | File is not a valid JPEG, PNG, or WebP image. |
| 400 | image_too_large | Image exceeds the 25MB size limit. |
| 400 | no_c2pa_found | No C2PA metadata was found in the image. The image is already clean. |
| 401 | unauthorized | Missing or invalid API key. |
| 429 | rate_limit_exceeded | Rate limit exceeded. Check the Retry-After header. |
Batch Processing
For high-volume image processing, use the batch endpoint POST /v1/image/batch-strip to submit up to 50 images in a single request. Results are delivered to a webhook URL or can be polled via the batch status endpoint. Batch jobs are processed in parallel and typically complete within seconds even for large sets. This approach is ideal for content management systems, media pipelines, and automated publishing workflows that need to strip provenance data from many files at once.