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, time, uuid
import requests # pip install requests
API_KEY = os.environ["TELLERS_API_KEY"]
BASE = "https://api.tellers.ai"
HEADERS = {"x-api-key": API_KEY}
def upload_file(path: str, folder: str = "uploads", file_type: str = "video") -> str:
"""Upload a local file to your Tellers library and return its asset ID."""
resp = requests.post(f"{BASE}/users/assets/uploads", headers=HEADERS, json=[{
"upload_id": str(uuid.uuid4()),
"content_length": os.path.getsize(path),
"file_type": file_type, # "video", "audio", "image", ...
"multipart": False, # one presigned URL for the whole file
"source_file": {
"sourceName": "local",
"sourceUrl": None,
"sourceIconUrl": None,
"authors": [],
"creationDatetime": None,
"additionDatetime": int(time.time()),
"inAppPath": [folder],
"title": os.path.basename(path),
"description": None,
"keywords": [],
},
}])
resp.raise_for_status()
upload = resp.json()[0]
# PUT the bytes straight to storage. The presigned URL carries its own auth.
with open(path, "rb") as f:
requests.put(upload["presigned_put_url"], data=f).raise_for_status()
return upload["asset_id"]
def run_agent(message: str) -> dict:
"""Send a prompt to the Tellers agent and wait until its turn ends."""
resp = requests.post(f"{BASE}/agent/messages", headers=HEADERS, json={
"message": message,
"no_interaction": True, # run to the end without asking follow-up questions
# "llm_model": "gpt-6.1-terra", # optional, see "Available models"
})
resp.raise_for_status()
chat_id = resp.json()["chat_id"]
# Check every 10 seconds until the agent is done.
while True:
resp = requests.get(f"{BASE}/agent/chat/{chat_id}/result", headers=HEADERS)
resp.raise_for_status()
result = resp.json()
if result["status"] != "progressing":
return result # status is "done" or "error"
time.sleep(10)
# 1. Upload the interview
asset_id = upload_file("interview.mp4", folder="interviews")
# 2. Generate social clips
result = run_agent(
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."
)
if result["status"] == "error":
raise RuntimeError(result["message"])
print(result["message"]) # the agent's summary
print("Projects:", result["projects"]) # project IDs it created or edited
for asset in result["assets"]: # assets it generated or used
print(asset["type"], asset["id"])Install dependencies: pip install requests, and set TELLERS_API_KEY to your API key. See Upload a file for more on the upload step.