Markproof

v0.3.3
io.github.Ajinkya710/markproof Checked 4 days ago Published 1 month ago

Watermark and C2PA-sign AI-generated images and audio for EU AI Act Article 50, and verify files.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

mark_file Mark an AI-generated file

Adds an invisible watermark and a signed C2PA manifest (Content Credentials) to an AI-generated image (PNG, JPEG, WebP) or audio file (WAV, MP3), marking it as AI-generated for EU AI Act Article 50. Writes the marked copy next to the original (images as PNG, audio as WAV) and returns its watermark code and public verification URL. Use this on every image or audio file you generate before handing it to a user. Counts as one API call.

ParameterTypeDescription
path *stringPath to the local image or audio file to mark.
generator_namestringName of the app or system that generated the file; recorded in the C2PA manifest.
label_positionstringCorner for visible_label. Defaults to bottom-right.
model_namestringName of the model that generated the file.
output_pathstringWhere to write the marked copy. Defaults to <name>.marked.<ext> beside the original.
overwritebooleanAllow replacing an existing file at output_path. Defaults to false.
visible_labelImages only. Also draw a visible label on the image (EU AI Act Art. 50(4), e.g. for deepfakes): true for "AI-generated", or custom text up to 40 characters.

verify_file Check a file for AI marking

Checks an image or audio file for a Markproof watermark and a C2PA manifest, and reports whether its signature is valid and whether it matches a record in this Markproof account. Use it to confirm a file is marked before publishing, or to inspect a file of unknown origin. Counts as one API call.

ParameterTypeDescription
pathstringPath to the local image or audio file to check. Uploads are limited to about 4.5 MB.
urlstringPublic https URL of the file, instead of path. Use it for files over 4.5 MB (up to 25 MB), e.g. marked audio, which is WAV.

get_asset Look up a marked file

Fetches the record for a file this account marked, by the asset_id that mark_file returned. Doesn't count toward the quota.

ParameterTypeDescription
asset_id *stringThe asset_id returned by mark_file.