> ## Documentation Index
> Fetch the complete documentation index at: https://ailabtools.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Face Analyzer

> Face Analyzer API detects facial position, attributes, attractiveness, pose, and quality metrics from portrait images.

export const FileStoragePolicy = ({uploadedFiles, responseType}) => {
  const responseFileData = {
    URL: {
      stored: "Yes",
      retention: "24 Hours",
      deletion: "Automatic"
    },
    BASE64: {
      stored: "No",
      retention: "N/A",
      deletion: "Immediate"
    }
  };
  if (!uploadedFiles && !responseType) return null;
  return <div>
      <table>
        <thead>
          <tr>
            <th>Data Type</th>
            <th>Stored</th>
            <th>Retention</th>
            <th>Training</th>
            <th>Deletion</th>
          </tr>
        </thead>
        <tbody>
          {uploadedFiles && <tr>
              <td>Uploaded Files</td>
              <td>No</td>
              <td>N/A</td>
              <td>No</td>
              <td>Immediate</td>
            </tr>}
          {responseType && responseFileData?.[responseType] && <tr>
              <td>Response Files ({responseType})</td>
              <td>{responseFileData[responseType]['stored']}</td>
              <td>{responseFileData[responseType]['retention']}</td>
              <td>No</td>
              <td>{responseFileData[responseType]['deletion']}</td>
            </tr>}
        </tbody>
      </table>

      <Tip>
        For more information, see the{" "}<a href="/docs/file-storage-policy">File Storage Policy</a> and{" "}<a href="https://www.ailabtools.com/privacy-policy" target="_blank">Privacy Policy</a>.
      </Tip>
    </div>;
};

export const BillingInstructions = ({creditsPerRequest = 1}) => {
  const creditUnitPrice = 0.0027;
  const billingTiers = [{
    price: 6,
    credits: 2000,
    costPerCredit: 0.003
  }, {
    price: 30,
    credits: 10000,
    costPerCredit: 0.003
  }, {
    price: 300,
    credits: 110000,
    costPerCredit: 0.0027
  }, {
    price: 1500,
    credits: 550000,
    costPerCredit: 0.0027
  }, {
    price: 2500,
    credits: 1000000,
    costPerCredit: 0.0025
  }];
  const formatCurrency = (value, fractionDigits = 2) => value.toLocaleString("en-US", {
    style: "currency",
    currency: "USD",
    minimumFractionDigits: fractionDigits,
    maximumFractionDigits: fractionDigits
  });
  const formatNumber = (value, fractionDigits = 0) => value.toLocaleString("en-US", {
    minimumFractionDigits: fractionDigits,
    maximumFractionDigits: fractionDigits
  });
  return <>
      <table>
        <thead>
          <tr>
            <th style={{
    textAlign: "right"
  }}>Price</th>
            <th style={{
    textAlign: "right"
  }}>Requests</th>
            <th style={{
    textAlign: "right"
  }}>Cost / Request</th>
          </tr>
        </thead>
        <tbody>
          {billingTiers.map(tier => {
    const requests = tier.credits / creditsPerRequest;
    const costPerRequest = tier.costPerCredit * creditsPerRequest;
    return <tr key={tier.credits}>
                <td style={{
      textAlign: "right"
    }}>{formatCurrency(tier.price)}</td>
                <td style={{
      textAlign: "right"
    }}>{formatNumber(requests)}</td>
                <td style={{
      textAlign: "right"
    }}>
                  {formatCurrency(costPerRequest, 4)}
                </td>
              </tr>;
  })}
        </tbody>
      </table>

      <Tip>
        Each successful API request consumes{" "}<strong>{creditsPerRequest} credits (≈{" "}{formatCurrency(creditUnitPrice * creditsPerRequest, 4)})</strong>. Failed requests are not billed.

        <ul>
          <li>
            View pricing on the{" "}<a href="https://www.ailabtools.com/price?tab=api" target="_blank">pricing page</a>{" "}or manage credits in the{" "}<a href="https://www.ailabtools.com/developer/billing" target="_blank">developer platform</a>.
          </li>
          <li>
            Need more credits or an enterprise plan? Contact{" "}<a href="mailto:business@ailabtools.com">business@ailabtools.com</a>.
          </li>
        </ul>
      </Tip>
    </>;
};

## Billing Instructions

<BillingInstructions creditsPerRequest={1} />

## File Storage Policy

<FileStoragePolicy uploadedFiles />

## Application Scenarios

* **Security and Surveillance**: Face Analyzer can enhance security systems by accurately identifying individuals in real-time, enabling efficient access control and threat detection in public spaces, airports, or corporate environments.
* **Social Media and Marketing**: By analyzing faces in user-generated content, Face Analyzer helps businesses gain valuable insights into consumer behavior, sentiment analysis, and demographic profiling. This information can be leveraged for targeted marketing campaigns and personalized customer experiences.
* **Healthcare and Biometrics**: Face Analyzer can be utilized in medical diagnostics, monitoring patient well-being, and assisting in facial recognition for identity verification in healthcare systems, improving patient safety and reducing administrative burdens.
* **Entertainment and Gaming**: The entertainment industry can harness Face Analyzer for interactive experiences, such as augmented reality (AR) filters, virtual makeup applications, or personalized character creation in video games.

## Featured Advantages

* **Real-Time Response**: Facial recognition possesses characteristics like high concurrency, high throughput, and low latency. Each request can be processed in just a few hundred milliseconds, meeting your real-time usage requirements.
* **Accuracy**: Face Analyzer leverages advanced neural networks and deep learning techniques to achieve exceptional accuracy in detecting faces. It can reliably identify faces even in challenging scenarios, such as low light conditions, partial occlusions, or varying angles.
* **Efficiency**: Powered by highly optimized algorithms, Face Analyzer delivers impressive performance in terms of processing speed and resource utilization. It can rapidly analyze large volumes of images, making it suitable for real-time applications, such as video surveillance or live streaming platforms.
* **Scalability**: Face Analyzer is designed to handle diverse use cases, ranging from individual image analysis to bulk processing of image datasets. Its scalability enables seamless integration with existing workflows, ensuring flexibility and adaptability across different projects and applications.
* **Multi-Face Detection**: With the ability to detect and analyze multiple faces simultaneously, Face Analyzer proves invaluable in scenarios where identification or analysis of multiple individuals is crucial. This capability makes it ideal for crowd monitoring, security applications, or social media analytics.
