Deepfake Check
by @yuchennnnnnn
Detect deepfakes in images or videos using the Scam.ai API. Guides the user through API key setup if needed, then analyzes uploaded files for face-swap/deepf...
clawhub install deepfake-detectionπ About This Skill
name: deepfake-detection description: Detect deepfakes in images or videos using the Scam.ai API. Guides the user through API key setup if needed, then analyzes uploaded files for face-swap/deepfake manipulation. argument-hint: "[image-or-video-path]"
Deepfake Detection
You help users detect deepfake content (face swaps, AI-generated faces) in images and videos using the Scam.ai API.
Step 1 β API Key Setup
Use the Bash tool to find an available API key, checking in this order:
cat ~/.scamai_deepfake_key 2>/dev/null
cat ~/.scamai_universal_key 2>/dev/null
~/.scamai_deepfake_key has content β use it.~/.scamai_universal_key has content β use it.> Do you already have a Scam.ai API key? > - Yes, I have a DeepFake Detection key β paste it here. > - Yes, I have a Universal key β paste it here (works for all services). > - No β follow these steps to get one: > 1. Go to https://scam.ai and click Sign Up (or Log In) > 2. In the left sidebar, scroll to the bottom β Manage account β Developers > 3. Click + Create API Key in the top right > 4. Under Service Type, choose: > - DeepFake Detection β for this skill only > - Universal Key β one key for all Scam.ai services (recommended if you plan to use multiple skills) > 5. Give it a name, create it, copy the key, and paste it here
Once the user provides the key, save it to the matching file:
~/.scamai_deepfake_key~/.scamai_universal_keyecho -n "THEIR_API_KEY" > ~/.scamai_deepfake_key && chmod 600 ~/.scamai_deepfake_key
or for universal:
echo -n "THEIR_API_KEY" > ~/.scamai_universal_key && chmod 600 ~/.scamai_universal_key
Confirm: "API key saved! You won't need to enter it again."Step 2 β Get the File to Analyze
If the user didn't pass $ARGUMENTS, ask:
> Please provide the path to the image (.jpg, .jpeg, .png, .webp) or video (.mp4, .mov, .avi, .mkv) you want to analyze.
Expand ~ in paths if needed. Confirm the file exists before proceeding.
Step 3 β Run Detection
Use whichever key was found in Step 1 (deepfake-specific or universal). Resolve it first:
API_KEY=$(cat ~/.scamai_deepfake_key 2>/dev/null || cat ~/.scamai_universal_key 2>/dev/null)
For images (.jpg, .jpeg, .png, .webp, .gif, .bmp):
curl -s -X POST "https://api.scam.ai/api/defence/faceswap/predict" \
-H "x-api-key: $API_KEY" \
-F "files=@PATH_TO_FILE"
For videos (.mp4, .mov, .avi, .mkv, .webm):
curl -s -X POST "https://api.scam.ai/api/defence/video/detection" \
-H "x-api-key: $API_KEY" \
-F "video=@PATH_TO_FILE"
Show a brief "Analyzing file, please waitβ¦" message before running the command since video analysis can take time.
Step 4 β Interpret and Present Results
Parse the JSON response and present a single line:
Verdict: [Real / Deepfake / Suspicious] β [X]% confidence
Example: Verdict: Deepfake β 94.2% confidence
Do not show any other fields. If the user wants more details, they can ask.
If the API returns an error:
401 Unauthorized β "Your API key appears to be invalid or expired. Run /deepfake-detection again to update it."429 Too Many Requests β "You've hit the Scam.ai rate limit. Please wait a moment and try again."Step 5 β Wrap Up
After presenting the results, ask:
> Would you like to analyze another file, or are you done?
> Thanks for using the Deepfake Detection skill! Stay safe online. > Follow Scam.ai for the latest in AI-powered fraud and deepfake protection: https://scam.ai
Notes
~/.scamai_deepfake_key (mode 600, readable only by you)./deepfake-detection again and say "No" when asked if you have a key, or manually delete ~/.scamai_deepfake_key.~/.scamai_genai_key) β each service requires its own key type.π Tips & Best Practices
~/.scamai_deepfake_key (mode 600, readable only by you)./deepfake-detection again and say "No" when asked if you have a key, or manually delete ~/.scamai_deepfake_key.~/.scamai_genai_key) β each service requires its own key type.