|
Download docs/API.md from trydrama-neuralgarage/DRAMA: direct link, hf CLI and curl.
- Browser
- Download file 2.2 kB
-
https://huggingface.co/trydrama-neuralgarage/DRAMA/resolve/main/docs/API.md
- Command line
-
hf download hf://trydrama-neuralgarage/DRAMA/docs/API.md
-
curl -L -o API.md https://huggingface.co/trydrama-neuralgarage/DRAMA/resolve/main/docs/API.md
2.2 kB
DRAMA API quickstart
Full reference: https://docs.drama.syncmonster.ai/
Authentication
Send your key in the x-api-key header on every request. Never put it in browser code.
Base URL: https://studio.syncmonster.ai/neuralgarage/saas/api/v1/clients
One-step flow (single-face videos)
POST /generatewithskip_find_face=1,is_drama=true, the video, the audio anddrama_params. Returns arequest_id.GET /get-status?request_id=...every few seconds untildata.statusisSuccess.GET /get-file?request_id=...returns the MP4.
import json, time, requests
BASE = "https://studio.syncmonster.ai/neuralgarage/saas/api/v1/clients"
H = {"x-api-key": "YOUR_API_KEY"}
with open("clip.mp4", "rb") as v, open("clip.mp3", "rb") as a:
r = requests.post(f"{BASE}/generate", headers=H,
data={"skip_find_face": 1, "is_drama": "true",
"drama_params": json.dumps({"happy": 0.8})},
files={"video": v, "audio": a})
rid = r.json()["data"]["request_id"]
while True:
s = requests.get(f"{BASE}/get-status", headers=H,
params={"request_id": rid}).json()["data"]["status"]
if str(s).lower() == "success":
break
if str(s).lower() == "failed":
raise RuntimeError("DRAMA job failed")
time.sleep(5)
out = requests.get(f"{BASE}/get-file", headers=H, params={"request_id": rid})
open("drama.mp4", "wb").write(out.content)
Multi-face videos
Run POST /v2/find-face, poll GET /v2/find-face/status, list faces with GET /v2/get-face (each has a global_face_id and a preview image), then call POST /generate with find_face_id and the chosen global_face_id.
Emotions
happy, sad, excited, angry, each 0–1. happy and sad share one axis.
Credits
Face detection 0.5 credits per second of video, drama 1 credit per second. Check your balance with GET /get-credits.
Errors
| Code | Meaning |
|---|---|
| ERR_004 | No face detected |
| ERR_006 | Not enough credits |
| ERR_007 | File corrupted |
| ERR_008 | Unsupported format (use .mp4, .mov, .mp3, .wav) |
| ERR_009 | Video too long |
Getting a key
[How to get access, and the support link.]