🎬 Scapu Watermark API

Add watermarks, outros, and generate opinion placards

POST GET /generate-placard HTML→PNG
Generate an opinion placard image. Accepts JSON with required fields and optional styling overrides. All static UI text can be translated using the lang parameter.
Required Parameters
user_name string required Display name of the user.
question string required The poll question.
topic string required Topic tag (e.g., "WORLD CUP").
votes string required Vote count string (e.g., "50K VOTES").
percentage1 number required Percentage for the left bar (0–100).
percentage2 number required Percentage for the right bar (0–100).
Optional Content
timestamp string default: "just now" Time since posted.
label1 string default: "{percentage1}%" Text label on the left bar.
label2 string default: "{percentage2}%" Text label on the right bar.
avatar_url string (URL) default: "" (initial) URL of the user's avatar image. If empty, an initial letter is shown.
logo_url string (URL) default: default SCAPU logo URL of the brand logo (40x40 px recommended).
Visual Overrides (all optional)
width integer default: 600 Output image width in pixels (informational).
height integer default: 450 Output image height in pixels (informational).
page_bg_color string (CSS color) default: "#ffffff" Background color of the entire page.
card_bg_color string (CSS color) default: "#000000" Background color of the card.
text_color string (CSS color) default: "#ffffff" Main text color.
brand_color string (CSS color) default: "#F2F400" Background color of the OPINION badge.
bar_color1 string (CSS color) default: "#4ade80" Color for the left progress bar.
bar_color2 string (CSS color) default: "#ef4444" Color for the right progress bar.
font_family string (CSS font stack) default: system fonts CSS font-family value for the card.
Language
lang string default: "en" Language for static UI text (the OPINION badge). Supported values: en, fr, pt-BR, es-MX, es-ES, zh-CN.
Response
200 PNG image (binary)
400 Missing required fields
500 Rendering error
Example Request
curl -X POST http://localhost:8080/generate-placard \
  -H "Content-Type: application/json" \
  -d '{
    "user_name": "John",
    "question": "Best movie?",
    "topic": "MOVIES",
    "votes": "1K",
    "percentage1": 70,
    "percentage2": 30,
    "lang": "fr",
    "page_bg_color": "#ffffff",
    "card_bg_color": "#000000",
    "brand_color": "#F2F400"
  }' --output placard.png
POST /process-media sync
Process image/video synchronously – returns file directly.
Multipart Form Data
username string required
file file optional
file_url string optional
logo file optional
logo_url string optional
outro file optional
outro_url string optional
Response
200 Processed file
POST /process-media-async async
Asynchronous processing – returns job_id.
Multipart Form Data
username string required
pub_id string required
file file optional
file_url string optional
logo file optional
logo_url string optional
outro file optional
outro_url string optional
Response
{"job_id": "550e8400-e29b-41d4-a716-446655440000"}
GET /progress/<job_id>
Check job progress.
Response
{"status": "processing", "progress": 45, "error": null}
GET /download/<job_id>
Download completed result.
GET POST /settings
View or update configuration (HTML form).