TapCub is live — analytics, insights and live chat, free on one platform

Images API ID Photo Compliance Check API

Send a photo and a country spec and get each rule checked, such as head size, eye position, pose and background. The photo is not changed.

POSThttps://api.pathclue.com/v1/images/id-photo-checkBeta
Request

Call it from your code

Set your key in the TAPCUB_API_KEY environment variable. Base URL: https://api.pathclue.com/v1.

terminal
curl -X POST "https://api.pathclue.com/v1/images/id-photo-check?spec=us&consent=true" \
  -H "Authorization: Bearer $TAPCUB_API_KEY" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @photo.jpg

Send the file itself as the request body and put the options in the query string.

Parameters

Request parameters

Request parameters
ParameterTypeRequiredDefaultDescription
specstringYes—Photo spec id, e.g. us (US passport), us-visa, uk, schengen, canada, cn-visa, cn-1in. Same list as the website's passport photo maker.
consentbooleanYes—Must be true: you confirm you have the right to process this person's photo. The photo is not stored or logged.
Response

Example response

Successful responses carry the X-Credits-Charged and X-Credits-Balance headers. Errors return {"error":{"code","message"}} and are never charged.

response.json
{
  "spec": {
    "id": "us",
    "name": "US passport",
    "widthMm": 50.8,
    "heightMm": 50.8,
    "background": [
      "white"
    ],
    "source": "https://travel.state.gov/content/travel/en/passports/how-apply/photos.html",
    "checked": null
  },
  "photo": {
    "width": 600,
    "height": 600,
    "type": "image/jpeg",
    "kb": 98
  },
  "verdict": "fail",
  "checks": [
    {
      "key": "head",
      "level": "pass",
      "v": {
        "head": 29.5,
        "min": 25.4,
        "max": 34.9
      }
    },
    {
      "key": "eyes",
      "level": "pass",
      "v": {
        "mm": 30.5,
        "min": 28.6,
        "max": 34.9
      }
    },
    {
      "key": "aspect",
      "level": "pass",
      "v": {
        "ratio": 1,
        "want": 1
      }
    },
    {
      "key": "glasses",
      "level": "fail"
    },
    {
      "key": "background",
      "level": "pass"
    }
  ],
  "faces": 1,
  "note": "Checks against the published requirements listed in spec.source. Passing does not guarantee acceptance."
}
Price and limits

What it costs

What it costs
Price20 credits per image
In US dollarsabout $0.02 · $20 / 1,000
CreditsPaid credits only
Rate limitFree 10 / min · Plus 60 / min · Pro 300 / min
ChargedOnly on success — errors and timeouts are free
Use cases

What people build with it

Photo studios

Check every shot before printing.

Visa services

Catch rejected photos before an application is filed.

Onboarding flows

Ask users for a new photo right away when one fails.

FAQ

Frequently asked questions

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

Does a pass guarantee acceptance?

No. It checks the published spec, but the issuing office makes the final decision.

How are face photos handled?

They are processed and deleted right after the response. Face images are never logged.

How much does the ID Photo Compliance Check API cost?

Each successful call costs 20 credits per image (about $0.02). 1 credit is about $0.001. Failed calls — invalid input, unreachable sites, timeouts or errors on our side — are not charged.

Can I use free credits?

No. Document and image endpoints only use paid credits from a Tools plan or a credit pack. To check the result before you pay, use the matching free tool on tapcub.com.

What are the rate limits?

Free accounts can make 10 calls a minute and 1,000 a day per key; Plus allows 60 a minute and Pro 300. Over the limit you get HTTP 429 with a Retry-After header, and nothing is charged.

How do I get an API key?

Sign in to the TapCub console, verify your email and create a key on the Tools → API page. Keys start with tck_ and are shown once; send them in the Authorization: Bearer header.

Get your API key

Create a key in the console and make your first call in a minute. Light endpoints run on free daily credits.