Social clips from a long interview
Turn a long-form interview or talk into multiple short, self-contained clips ready to post on social media. Tellers finds the best moments and formats them automatically.
With the CLI
# 1. Upload the interview
tellers upload ./interview.mp4 --in-app-path interviews
# 2. Slice it into social-ready clips
tellers "From interview.mp4, extract 5 standalone clips of 30–60 seconds each. \
Each clip should be self-contained with a clear point or insight. \
Format for vertical (9:16) social video." With the API
import os, uuid, time, json, urllib.parse
import requests, sseclient
API_KEY = "sk_..."
BASE = "https://api.tellers.ai"
headers = {"x-api-key": API_KEY}
filepath = "interview.mp4"
# 1. Upload the interview
file_size = os.path.getsize(filepath)
resp = requests.post(f"{BASE}/users/assets/upload_urls", headers=headers, json=[{
"upload_id": str(uuid.uuid4()),
"content_length": file_size,
"file_type": "video",
"source_file": {
"sourceName": "local", "sourceUrl": None, "sourceIconUrl": None,
"authors": [], "creationDatetime": None,
"additionDatetime": int(time.time()),
"inAppPath": ["interviews"], "title": "interview.mp4",
"description": None, "keywords": [],
},
}])
resp.raise_for_status()
upload = resp.json()[0]
asset_id = upload["asset_id"]
with open(filepath, "rb") as f:
requests.put(upload["presigned_put_url"], data=f).raise_for_status()
# 2. Generate social clips
prompt = (
f"Using asset ID {asset_id} (interview.mp4): extract 5 standalone clips "
"of 30–60 seconds each. Each clip should be self-contained with a clear "
"point or insight. Format for vertical (9:16) social video."
)
url = f"{BASE}/create?prompt={urllib.parse.quote(prompt)}"
response = requests.get(url, headers=headers, stream=True)
response.raise_for_status()
for event in sseclient.SSEClient(response).events():
if event.event == "tellers.json_result":
data = json.loads(event.data)
print(data)
if data.get("status") == "done":
break
Install dependencies: pip install requests sseclient-py.
See Upload a file for more on the upload step.