Metadata-Version: 2.4
Name: markproof
Version: 0.1.0
Summary: Python client for the Markproof API - EU AI Act Article 50 watermarking and verification.
Author-email: Markproof <support@markproof.co>
License-Expression: MIT
Project-URL: Homepage, https://markproof.co
Project-URL: Documentation, https://markproof.co/docs
Keywords: eu-ai-act,article-50,watermark,c2pa,content-credentials,ai-generated,provenance
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Multimedia :: Sound/Audio
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31
Dynamic: license-file

# markproof

Python client for the [Markproof](https://markproof.co) API — EU AI Act Article 50 watermarking and verification in one call. Thin wrapper over `requests`.

## Install

```bash
pip install markproof
```

## Usage

```python
from markproof import Markproof

client = Markproof(api_key="lt_live_...")

marked = client.mark("generated.png", generator_name="my-app", model_name="my-model-v1")
print(marked.watermark_code, marked.verify_url)
with open("generated-marked.png", "wb") as f:
    f.write(marked.file)

result = client.verify("generated-marked.png")
print(result.summary)
```

## API

- `Markproof(api_key, base_url=DEFAULT_BASE_URL)` — `base_url` defaults to the production API; override for local dev.
- `client.mark(file, filename=None, generator_name=None, model_name=None, response_format="file")` → `MarkResult` — `file` is a path (`str`/`os.PathLike`) or raw `bytes` (in which case `filename` is required). `response_format="file"` (default) returns the marked bytes inline (`result.file`/`result.content_type`); `"url"` returns a short-lived signed download URL instead (`result.file_url`, ~1 hour — download promptly rather than caching it). Either way you also get `asset_id`, `watermark_code`, `verify_url`, `c2pa_manifest_label`.
- `client.verify(file, filename=None)` → `VerifyResult` — `watermark`/`c2pa` detection results, `matched_asset` if the watermark matches a record in Markproof's database, and a human-readable `summary`.
- `client.get_asset(asset_id)` → `Asset` — requires an API key on the same project that created the asset.

All methods raise `MarkproofError` (with `.status` and `.body`) on a non-2xx response.
