URL checks
The free, anonymous endpoint — and exactly what we do before fetching a URL a stranger gave us.
curl -s https://api.c2pa.design/v1/url-checks \
-H "content-type: application/json" \
-d '{"url":"https://cdn.example.com/hero.jpg"}'
No authentication. Rate-limited per IP (20 per hour by default). The response is the same
Verification document the authenticated endpoint returns.
With an API key the same endpoint counts against the url_checks quota and uses your plan's
rate limit instead of the anonymous one.
What happens before we fetch
Fetching a URL supplied by a stranger is a server-side request forgery primitive unless it is guarded properly. Ours:
- Scheme allow-list.
httpsalways;httponly in development. - Port allow-list. 80 and 443. A URL naming port 2375 is refused before a socket opens.
- Address check at connect time. The guard runs on the resolved IP, not the hostname, so a DNS answer that changes between resolution and connection cannot slip past.
- Every forbidden range refused. Loopback, private, link-local (including
169.254.169.254), carrier-grade NAT, documentation, benchmark, multicast, reserved, and the IPv6 equivalents including IPv4-mapped addresses. - Redirects re-validated. Every hop, up to five. A public URL that redirects to
127.0.0.1is refused at the second hop. - Byte cap on the stream. 64 MB, enforced while reading, so a lying
Content-Lengthbuys nothing. - No decompression.
Accept-Encoding: identity, and a gzip bomb arrives still compressed and hits the cap. - Content type from the bytes, never from the header.
- Nothing written to disk.
Errors
| Code | Meaning |
|---|---|
url_forbidden |
The destination is not a public address, port or scheme |
url_unreachable |
DNS, connection, timeout, too many redirects, or a non-2xx status |
asset_too_large |
Over 64 MB |
unsupported_media_type |
Nothing that reads C2PA handles this type |
rate_limited |
Slow down; Retry-After tells you how long |
When to use which
url-checks is the free front door: no key, no account, good for a proof of concept and for
the public tool. POST /verifications with {"url":…} is the same verification with quota,
project scoping, idempotency and history. A monitor is that on a schedule
with a diff against the previous run, which is the part worth paying for.