HaaFoto

Passport Photo API

Compliant passport, visa & ID photos in a single API call.

198 countries · 375 document types · AI validation against 41 official government sources · SHA-256 key auth · Redis rate limiting. The only passport-photo API with deterministic, government-compliant AI.

202
Countries
375
Document Types
41
Government Sources
<2min
Processing Time

Why integrate the HaaFoto API?

🎯 Deterministic compliance

Our proprietary AI pipeline produces the same government-compliant result every time — no hallucinatory generative AI, no guesswork. Every photo is validated against the official specs for the target country.

🌍 198 countries, one endpoint

No need to maintain a database of 375 document specifications across 198 countries. We handle the specs, the background colours, the crop ratios and the file-size limits — sourced from 41 government agencies.

⚡ Under 2 minutes

Upload to compliant JPEG in under 2 minutes. Background removal, face detection, dimension cropping and file-size optimisation all happen server-side.

🔒 Secure by design

SHA-256 hashed API keys, Redis sliding-window rate limiting, strict CSP, HSTS preload. Photos are processed and returned — not stored.

How it works

1

Upload a photo

POST /api/b2b/photo with the image file and target country.

2

AI validates + processes

AI face detection, background processing, exact-dimension crop, file-size optimisation.

3

Receive compliant JPEG

A government-compliant photo matching the country's official specifications.

Quick start

curl -X POST https://haafoto.com/api/b2b/photo \
  -H "x-api-key: YOUR_API_KEY" \
  -F "file=@photo.jpg" \
  -F "country=us"

Returns a compliance-validated, background-removed, correctly-cropped JPEG.

Who uses it

🛂

Visa & Immigration Services

Let applicants upload a photo and get a compliant result instantly — no manual editing.

💊

Pharmacies & Photo Studios

Offer passport photos in-store via a kiosk or tablet without a photo booth.

✈️

Travel Agents

Bundle compliant passport/visa photos into your booking flow.

🎓

Universities

International student offices can process visa photos during enrollment.

Pricing tiers

Free

$0

10 req/min · Testing & small projects

  • All endpoints
  • 198 countries
  • 375 document types
  • Community support

Pro

Custom

100 req/min · Production apps

  • Everything in Free
  • Priority processing
  • Email support
  • Higher rate limits

Enterprise

Custom

1,000 req/min · High-volume, SLA

  • Everything in Pro
  • Dedicated support
  • Custom SLA
  • On-premise option

API endpoints

POST
/api/b2b/photo

Upload + AI-process a photo to compliant specs. Returns a compliance-validated, background-removed, correctly-cropped JPEG.

GET
/api/b2b/specs

List supported document types, sizes, background colours and requirements per market (198 countries, 375 docs).

GET
/api/b2b/usage

View your API key quota, current usage and tier limits.

Frequently asked questions

Everything you need to know.

The short answers to the questions we hear most often. Can't find what you're looking for? Our support team replies in under an hour.

We accept all major credit and debit cards (Visa, Mastercard, American Express) processed securely through Stripe, with Apple Pay and Google Pay where available. All payments are encrypted and PCI DSS compliant.

Get an API key

Email business@haafoto.com to request a key, or start with the free tier.

Contact us