Passport / Visa / ID · API

ID Photo API
SaaS Service

Generate professional ID, passport, and visa photos using our all-in-one ID Photo API within seconds. Seamless background removal, precise crop, and comprehensive photo validation to ensure every photo meets professional standards.

Read the API Docs

Support hundreds of customizable formats for passport, visa, and ID photos, tailored to meet global requirements.

Portrait → passport photo Sample output
Original
Young woman in a sunlit outdoor setting before ID photo processing
Input portrait972 × 778 px
US passport photo
Generated US passport photo
2 × 2 in600 × 600 px
✓ Background adjusted
✓ Face position aligned
✓ Output dimensions applied
POST /v2/makeIdPhoto Example output
All-in-one APIOne call, full pipeline
Background removalClean cutout from any backdrop
Crop & complianceFace-aligned crop with spec checks
Pre-built specs150+ passport, visa & ID formats

01 / Photo processing

From portrait to specification.

A focused pipeline for the details that matter: face position, background, image quality, and output size.

Automatic face alignment

Position and crop the face according to output dimensions, head size, and eye-line requirements.

Background processing

Replace the original background while preserving natural edges around hair, clothing, and facial details.

Original
Woman's portrait with its original outdoor background
Processed
Same woman's portrait after the background is replaced with white

Photo quality checks

Identify common issues such as a tilted or turned head, uneven lighting, poor brightness or sharpness, eyeglasses, or a non-neutral expression.

Flexible delivery

Receive the final image in the API response, through a temporary URL, or as a print-ready layout.

Base64 response Temporary image URL Printable photo sheet

Need a format that is not listed? We can help create a custom photo specification for your use case.

Talk to us about a custom specification

02 / Sample results

One portrait. Multiple photo formats.

Compare original portraits with prepared sample outputs. Switch the photo format to explore the crop and dimensions.

1Choose a sample
2Select a photo format
Original photoInput
Original photo before processing
Processed sampleOutput
Generated US passport photo
Photo specification
Photo format
US Passport Photo
Physical size
2 × 2 in
Pixel size
600 × 600 px
DPI
300
Background
White
✓ Background Removed ✓ Size Adjusted ✓ Expression OK ✓ Lighting OK ✓ Quality OK ✓ No Eyeglasses

Want to build this into your product?Generate the same result through the API.

Built for a fast integration

One endpoint.
Your entire photo workflow.

Send a portrait and document specification, then receive a correctly cropped, processed, and sized photo for your product.

Authentication, parameters, issue codes, and complete response schemas are maintained in the API documentation.

Sample RequestJSON
POST /v2/makeIdPhoto

{
  "apiKey": "••••••",
  "apiSecret": "••••••",
  "imageBase64": "...",
  "specCode": "us-passport",
  "outputFormat": "IMAGE_BASE64"
}
● 200 OK"issues": []

03 / Document specifications

One API. 150+ photo specifications.

Generate passport, visa, identity, driver's license, and application photos for countries and regions around the world. Pass the document as specCode on POST /v2/makeIdPhoto.

Common formats include a US passport photo, a UK passport photo, a China visa photo, and a Schengen visa photo, plus passport and visa photos for Canada, Australia, Japan, India, Singapore, New Zealand, Brazil, and South Korea.

Specification data can be queried through the API, so your product can display supported document types dynamically.

View all photo specifications

Example specCode values

US passport photo
us-passport
UK passport photo
uk-passport
China visa photo
china-visa

These are the specCode values for the three sample formats. The same field accepts the other passport, visa, and ID specifications.

04 / Use cases

A photo API.
Many ways to put it to work.

From consumer-facing photo apps to high-volume organizational workflows, use the same API foundation and adapt the experience to your product.

01

Passport and visa photo apps

Launch a customer-facing photo product with direct generation or a watermarked preview workflow.

02

Travel and visa platforms

Help customers prepare correctly sized photos and identify common photo-quality problems before submission.

03

Photo studios and retailers

Automate background processing, cropping, sizing, and printable photo-sheet generation at scale.

04

HR and identity systems

Standardize employee badge and profile photos across onboarding, directory, and access-management workflows.

Privacy-conscious by design

Choose how images are delivered and stored.

Identity photos are sensitive. IDPhoto.ai supports workflows designed to reduce unnecessary image retention and give businesses greater control over delivery.

Read our Data Privacy policy
01

Base64 delivery

Receive the generated image as Base64 data without storing the photo on our service.

02

Temporary URL delivery

Use temporary AWS S3 delivery, with documented retention ranging from 2 hours to 14 days.

03

Regional endpoints

Use US or EU API endpoints, with other regional deployment options available on request.

04

Data protection

Data is encrypted during transmission. Our documented practices address GDPR and CCPA requirements.

More from IDPhoto.ai

Extend your photo workflow.

Use focused APIs and services alongside the complete ID photo workflow.

Frequently asked questions

What you need to know before integrating.

Still have a question or a custom requirement?

Contact support@idphoto.ai
What photo formats does the API support?

IDPhoto.ai supports more than 150 photo specifications, including passport, visa, ID, driver's license, and application-photo formats from countries around the world. You can query the available specification codes through the API.

Can you add a custom photo specification?

Yes. If the format you need is not currently available, contact us with the required dimensions, crop, background, and validation rules. We can review the specification for your use case.

How do I get an API key?

Create or access your account in the IDPhoto.ai Dashboard. Your API credentials and account usage are managed separately from this website.

Is a free trial available?

Yes. Create an account in the Dashboard to check the currently available trial access and account quota.

Are uploaded photos stored?

You can request Base64 output for a workflow that stores no images on our service. URL-based output uses temporary AWS S3 storage, with documented retention ranging from 2 hours to 14 days.

What should the input photo look like?

For the best result, provide a clear, front-facing portrait with the face and upper body visible. Avoid strong shadows, blur, extreme head angles, or obstructions around the face.

Does the API guarantee that a photo will be accepted?

The API formats photos according to the selected specification and reports detectable quality issues. Final acceptance is determined by the relevant government agency, application platform, or reviewing authority.

Which API regions are available?

US and EU API endpoints are currently documented. Other regional deployment options may be available for enterprise requirements.

How is pricing determined?

Pricing depends on usage volume and workflow requirements. Start with a trial account in the Dashboard or contact us for volume pricing and custom deployment needs.

Start building

Your next integration.
Picture it here.

Create your API credentials in the Dashboard, then follow the documentation to generate your first photo.

Need help with volume pricing, custom specifications, or regional deployment? Contact support@idphoto.ai