Code examples for AI Engine APIs — computer vision, OCR, and image processing.
All APIs are available on RapidAPI with a free tier.
| API | Description | RapidAPI |
|---|---|---|
| Background Removal | Remove backgrounds from images and get a clean transparent PNG. | Subscribe |
| Emotion & Personality Analysis | Detect emotions and personality traits from text. | Subscribe |
| Face Analyzer | Detect faces and analyze age, gender, emotions, and facial features. | Subscribe |
| Face Restoration | Restore and enhance old, blurry, or low-quality face photos. | Subscribe |
| Face Swap | Swap faces between two images using AI. | Subscribe |
| Image Colorization | Colorize black-and-white photos with AI. | Subscribe |
| Image Generation | Generate images from text prompts using AI. | Subscribe |
| Label Image | Auto-tag images with descriptive labels and confidence scores. | Subscribe |
| Landmark Detection | Identify famous landmarks in photos with GPS coordinates. | Subscribe |
| Logo Detection | Detect brand logos in images. | Subscribe |
| Mask Detection | Detect whether people are wearing face masks. | Subscribe |
| NSFW Detect | Detect NSFW/inappropriate content in images for content moderation. | Subscribe |
| Object Detection | Detect and locate objects in images with bounding boxes. | Subscribe |
| OCR Wizard | Extract text from images with support for 200+ languages and handwriting. | Subscribe |
| Photo to Anime | Transform photos into anime, cartoon, or sketch styles. | Subscribe |
| PPE Detection | Detect personal protective equipment (helmets, masks, gloves) on people. | Subscribe |
- Create a free account on RapidAPI
- Subscribe to any AI Engine API (free tier available)
- Copy your API key from the RapidAPI dashboard
- Set your API key as an environment variable:
export RAPIDAPI_KEY="your_api_key_here"- Run any example:
# cURL
bash background-removal/curl/example.sh
# Python
python3 background-removal/python/example.py
# JavaScript (Node.js 18+)
node background-removal/javascript/example.mjsAll examples read the RAPIDAPI_KEY environment variable automatically. You can also replace YOUR_API_KEY directly in the code if you prefer.
Each API folder contains working examples in three languages:
api-name/
├── README.md # API description and response format
├── curl/example.sh # cURL
├── python/example.py # Python (requests)
└── javascript/example.mjs # Node.js (fetch)
- cURL: any modern version
- Python: 3.7+ with
requests(pip install requests) - Node.js: 18+ (uses native
fetch)
MIT
