Liveness Detection API Docs Home|日本語

Liveness Detection API — Quickstart Guide

This guide walks you through the five steps from subscribing on AWS Marketplace to sending your first liveness detection (anti-spoofing) request.

Item Value
API base URL https://liveness.api.pas-ta.io
Customer dashboard https://liveness.api.pas-ta.io/console/dashboard
Authentication method X-API-Key header
Content type application/json (UTF-8)

Step 1. Subscribe on AWS Marketplace

  1. Open the Liveness Detection API by Swallow Incubate product page on AWS Marketplace.

    https://aws.amazon.com/marketplace/pp/prodview-24ciftyaakrsa

    The AWS Marketplace product page. Start your subscription from “View purchase options” at the top right.
  2. Sign in with the AWS account you want to use for this subscription. Click Sign in at the top right and enter your AWS account credentials.

    The AWS sign-in screen. Sign in with the account you want to use for the subscription.

    Once you have signed in, you are returned to the product page with “Hello, <account name>” shown at the top right.

    The product page after signing in. Your account name appears at the top right.
  3. Click View purchase options to open the subscribe screen, then choose whether to enable Auto-renewal.

    Contract details on the subscribe screen. Choose whether the contract renews automatically.
  4. Scroll down and select a plan under Dimensions. To evaluate the product at no cost, select Free.

    Dimensions under Pricing details. Select one plan (Free / Starter / Standard / Professional / Business / Enterprise).
    Plan Monthly calls Monthly price Overage per call
    Free (evaluation) 50 $0 Not available (hard cap always on)
    Starter 1,000 $180 $0.18
    Standard 5,000 $750 $0.15
    Professional 10,000 $1,200 $0.12
    Business 30,000 $2,400 $0.08
    Enterprise 100,000+ (custom) $5,000+ $0.05

    Note: On plans other than Free, the behavior when you exceed the limit (continue on a pay-as-you-go basis / stop the API) can be switched later from the dashboard.
    Note: Private Offers are available for customers in Japan. Please contact Support if you are interested.

  5. Scroll down further and review Terms and conditions (EULA), Purchase order (PO) number, and Purchase details.

    Terms and conditions and Purchase details. Review the EULA and your contract details.
  6. Click the Subscribe button at the bottom of the page.

    The Subscribe button below Purchase details.
  7. “Your request is in progress” appears while the contract is being created. The purchase confirmation screen appears after a few minutes.

    The in-progress message. Do not refresh or close this page while you wait.
    The Purchase confirmation screen. Agreement status becomes Active.

Step 2. Register your account information and verify your email

  1. Click Set up your account on the purchase confirmation screen to open our onboarding screen (you can also open it from the in-progress screen in Step 1-7).

  2. You are taken to a registration screen where your AWS Account ID and Subscription ID are filled in automatically. Enter the following items and click Continue.

    The onboarding registration screen. AWS Account ID and Subscription ID are filled in automatically.
    Item Required Notes
    First name / Last name Required Name of the person in charge
    Work email Required This becomes your login ID and the destination for various notifications
    Company name Required
    Company website Required In the format https://example.com
  3. A verification link (valid for 24 hours) is sent to the email address you registered.

    The confirmation screen, showing that a verification link has been sent to the address you entered.

    Open the URL in the email you receive.

    The verification email. Open the URL in the message body to verify your email address.

    If the email does not arrive, please check your spam folder. The sender is noreply@liveness.api.pas-ta.io.

Step 3. Set a password and save your API keys

  1. The verification link takes you to the password setup screen. Set a password with at least 8 characters, including at least one uppercase letter, one lowercase letter, one number, and one symbol, then click Activate account.

    The password setup screen, showing that your email address has been verified.
  2. Your account is activated and two API keys, Primary and Secondary, are displayed. Save both keys before you click Go to console.

    The account activation screen. The Primary and Secondary API keys are shown in full.

    ⚠️ This is the only screen where the API keys are shown in full. Once you leave it, the full keys can never be displayed again (the dashboard shows only the leading prefix, such as lc_a1B2c…). Store them in a password manager.

    If you did not save them, issue new keys with Regenerate on the dashboard (the old key is invalidated immediately, and the new key is shown once, on the spot).

    About the two-key scheme: Normally, you use the Primary key. In the unlikely event that a key is leaked, you can rotate without downtime by using the Secondary key while you swap out your code and then regenerating the Primary key.

Step 4. Sign in to the console and set up two-factor authentication

  1. On the sign-in screen, enter the email address you registered in Step 2 and the password you set in Step 3, then click Sign in.

    The customer dashboard sign-in screen.
  2. The two-factor authentication (TOTP) setup screen appears. Scan the QR code with an authenticator app such as Google Authenticator, Authy, or 1Password, enter the 6-digit one-time password, and click Verify and enable.

    The two-factor authentication setup screen. Scan the QR code with your authenticator app.

    Setting up two-factor authentication is mandatory. If you cannot scan the QR code, enter the string shown under “Or enter this secret manually” into your authenticator app by hand.

  3. Once setup is complete, you can sign in to the customer dashboard, where you can check your plan, the current month’s usage, and the status of your API keys.

    The customer dashboard. Check your plan, usage, and API keys.
  4. You will receive a welcome email. From then on, sign in at the following URL.

    https://liveness.api.pas-ta.io/console/dashboard

    The welcome email, which contains the sign-in URL.

Step 5. Send your first detection request

Base64-encode the face image and send it to POST /v1/check/liveness.

① Basic form (for small images)

curl -X POST https://liveness.api.pas-ta.io/v1/check/liveness \
  -H "X-API-Key: {your API key}" \
  -H "Content-Type: application/json" \
  -d '{"image": "{Base64-encoded image}", "image_format": "jpeg"}'

② For large images (up to 10 MB)

# Base64-encode the image and pass the body via stdin (macOS: base64 -i / Linux: base64 -w0)
{ printf '{"image": "'; base64 -i face.jpg | tr -d '\n'; printf '", "image_format": "jpeg"}'; } \
| curl -X POST https://liveness.api.pas-ta.io/v1/check/liveness \
  -H "X-API-Key: {your API key}" \
  -H "Content-Type: application/json" \
  --data-binary @-

If ① fails with argument list too long, use ②: Expanding the Base64 string directly into an argument hits the shell’s argument-length limit (as a rule of thumb, once the source image exceeds a few hundred KB), and the command cannot run at all. The stdin approach in ② works up to the API’s 10 MB limit (tr -d '\n' is required to keep the JSON valid).

Field Required Description
image Base64-encoded image (up to 10MB)
image_format "jpeg" or "png"

Example response (200 OK):

{
  "metadata": {
    "ver": "1.0.1",
    "customer_id": "550e8400-e29b-41d4-a716-446655440000",
    "remaining_calls": 3850,
    "over_limit_calls": 0,
    "status": "success"
  },
  "data": {
    "isFakeFace": false,
    "isFakeLikelihood": 0.987,
    "isValidFace": true,
    "faceBrightness": 142.3,
    "latency_ms": 120
  }
}

How to read the Processing Result: isFakeFace (true = suspected photo or spoof) is a reference verdict that becomes true when isFakeLikelihood (a score from 0.0 to 1.0) exceeds the default threshold of 0.15. For stricter operation, evaluate isFakeLikelihood against a threshold on your side.

About billing: Only successful detection responses are counted as calls. Error responses (4xx/5xx), GET /v1/usage, GET /v1/health, and dashboard operations are not counted.


Next steps