This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Programmatically Generate PDF document from markdown or HTML input | |
import requests | |
import json | |
# Replace with your actual PixLab API key | |
api_key = "YOUR_PIXLAB_API_KEY" # Get yours from https://console.pixlab.io/ | |
# Markdown formatted invoice | |
markdown_text = """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Programmatically Generate PDF document from markdown or HTML input | |
// Replace with your actual PixLab API key | |
const apiKey = "YOUR_PIXLAB_API_KEY"; // Get yours from https://console.pixlab.io/ | |
// Markdown formatted invoice | |
const markdownText = ` | |
# Invoice | |
## To: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import base64 | |
import os | |
# Programmatically remove backgrounds from input images using the PixLab BG-REMOVE API endpoint. | |
# | |
# Refer to the official documentation at: https://pixlab.io/endpoints/background-remove-api for the API reference | |
# guide and more code samples. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
# Get natural language responses to image-related queries | |
# Target Image: Change to any link or switch to POST if you want to upload your image directly, refer to the REST API code samples for more info. | |
img = 'https://s-media-cache-ak0.pinimg.com/originals/35/d0/f6/35d0f6ee0e40306c41cfd714c625f78e.jpg' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
# Generate a natural language description of an image content | |
# Target Image: Change to any link or switch to POST if you want to upload your image directly, refer to the REST API code samples for more info. | |
img = 'https://s-media-cache-ak0.pinimg.com/originals/35/d0/f6/35d0f6ee0e40306c41cfd714c625f78e.jpg' | |
key = 'PIXLAB_API_KEY' # Get your API key from https://console.pixlab.io/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Age Verification & Gender Extraction using the FACEIO REST API - https://faceio.net/rest-api#age-check | |
# | |
# The age verification API endpoint allows you to verify customer age and gender | |
# by directly uploading a base64 encoded image of the person being verified. | |
# No prior face enrollment is required; Age verification operates directly on the uploaded images. | |
# This API endpoint expects a single face to be present in the source image being checked. | |
import requests | |
import json | |
import base64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Face Verification API - Programmatically Compare Two Faces in Different Images | |
# | |
# Documentation: - https://faceio.net/rest-api#faceverify | |
# | |
# The Face Verify API endpoint allow you to programmatically compare (check) whether two faces | |
# in different images belong to the same person. This API is ideal for programmatic face checks | |
# that don't require user interaction. Simply upload two images, each containing a single face, | |
# using your preferred programming language, and the algorithm determines if the faces belong to the same person. | |
import requests | |
import json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
* Scan over 11K ID Documents from over 197 countries using the PixLab DOCSCAN API Endpoint | |
* documented at: https://pixlab.io/id-scan-api/docscan | |
* | |
* In this example, given a Passport document, extract the passport holder face and convert/parse all Machine Readable Zone | |
* to textual content ready to be consumed by your application. | |
* | |
* PixLab recommend that you connect your AWS S3 bucket via the dashboard at https://console.pixlab.io | |
* so that any extracted face or MRZ crop is automatically stored on your S3 bucket rather than the PixLab one. | |
* This feature should give you full control over your analyzed media files. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Scan over 11K ID Documents from over 197 countries using the PixLab DOCSCAN API Endpoint | |
* documented at: https://pixlab.io/id-scan-api/docscan | |
* | |
* In this example, given a Passport document, extract the passport holder face and convert/parse all Machine Readable Zone | |
* to textual content ready to be consumed by your application. | |
* | |
* PixLab recommend that you connect your AWS S3 bucket via the dashboard at https://console.pixlab.io | |
* so that any extracted face or MRZ crop is automatically stored on your S3 bucket rather than the PixLab one. | |
* This feature should give you full control over your analyzed media files. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
# Change the PIN Code of a given Facial ID on a FACEIO application | |
# Refer to: https://faceio.net/rest-api#setfacialidpincode for the official documentation & expected parameters | |
req = requests.post('https://api.faceio.net/setfacialidpincode',json={ | |
"fid": "FACIAL_ID", # Target Facial ID to change the PIN code for | |
"pin": "1234", # New PIN Code for this user. Must be a numeric STRING! | |
"key": "FACEIO_APP_API_KEY" # Your FACEIO Application API Key. Retrieve this key from the Application Manager on the console at: https://console.faceio.net | |
}) |