API overview

The Tellers API lets you integrate video creation, assets, and workflows into your applications. Use it to prompt the editing agent, upload media, call generation models directly, and render exports.

What you can do

  • Prompt the agent — Send a request in plain language and get back the projects and assets it made.
  • Work with assets — Upload, organize, describe, and download media in your library.
  • Control exports — Render projects to MP4 at one or more resolutions and track the job.
  • Generate media — Call video, image, music, sound effect, and speech models directly.

Creating your API token

To use the API or the CLI, you need an API key. Create one from the app:

  1. Go to app.tellers.ai.
  2. Click your user menu (top right).
  3. Go to User settings.
  4. Open API keys.
  5. Click Create new and copy your key.

Send the key in the x-api-key header on every request to https://api.tellers.ai. The examples below read it from the TELLERS_API_KEY environment variable.

Credits

You need credits on your account before using the API or CLI. All actions made through the API or CLI using your API token consume credits based on the requests (uploads, exports, etc.). Purchase credits on app.tellers.ai. New users who sign in with Google SSO receive a small amount of free credits to get started.

Getting started

Use the API reference for full endpoint details, request/response schemas, and try-it-out. All endpoints are documented in OpenAPI 3.1 format.

Examples

The examples use Python with requests (pip install requests) and plain HTTP calls. Set the TELLERS_API_KEY environment variable to your API key before running them.

Generate a video from a prompt

The simplest way to create a video: send a prompt to the agent, then check back until it is done. No file upload needed — the agent uses stock footage and the tools available to it.POST /agent/messages returns a chat_id; callGET /agent/chat/{chat_id}/result until status is no longer progressing.

import os, time
import requests  # pip install requests

BASE    = "https://api.tellers.ai"
HEADERS = {"x-api-key": os.environ["TELLERS_API_KEY"]}

# 1. Send your prompt to the agent.
resp = requests.post(f"{BASE}/agent/messages", headers=HEADERS, json={
    "message": "Search a stock video of ocean waves at sunset "
               "and add the title 'Golden Hour'.",
    "no_interaction": True,  # the agent finishes without asking questions
})
resp.raise_for_status()
chat_id = resp.json()["chat_id"]

# 2. Ask for the result 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":
        break
    time.sleep(10)

print(result["status"])    # "done" or "error"
print(result["message"])   # the agent's summary
print(result["projects"])  # IDs of the projects it created

Upload a file

Uploading a file is a two-step process: request an upload with POST /users/assets/uploads, then PUT your file directly to the returned presigned_put_url. For very large files, set "multipart": true and fetch each part's URL from POST /users/assets/multipart/part_urls just before sending it — see the API reference.

import os, time, uuid
import requests  # pip install requests

BASE    = "https://api.tellers.ai"
HEADERS = {"x-api-key": os.environ["TELLERS_API_KEY"]}
path    = "footage/interview.mp4"

# 1. Ask for an upload URL.
resp = requests.post(f"{BASE}/users/assets/uploads", headers=HEADERS, json=[{
    "upload_id":      str(uuid.uuid4()),
    "content_length": os.path.getsize(path),
    "file_type":      "video",
    "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":        ["footage"],
        "title":            "interview.mp4",
        "description":      None,
        "keywords":         [],
    },
}])
resp.raise_for_status()
upload = resp.json()[0]

# 2. Send the file to that URL (it already carries its own auth).
with open(path, "rb") as f:
    requests.put(upload["presigned_put_url"], data=f).raise_for_status()

print("Uploaded as asset", upload["asset_id"])

Generate a video with an uploaded file

Once your file is uploaded, reference it in your prompt by its asset ID (returned by POST /users/assets/uploads) or by its filename. Using the asset ID is more reliable — filenames may not be unique. This example wraps the two previous ones in upload_file() and run_agent(), which the later examples reuse.

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}


# The two examples above, wrapped as functions.
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)


asset_id = upload_file("footage/interview.mp4", folder="footage")

result = run_agent(
    f"Using asset ID {asset_id} (interview.mp4): "
    "add a title card at the start that says 'Product Demo', "
    "then cut to the best 60 seconds."
)

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"])

Follow the agent live (SSE)

Instead of checking for the result, you can watch the agent work as it happens.GET /agent/chat/{chat_id}/stream returns Server-Sent Events: start it from the stream_cursor that POST /agent/messages returned, so no event is missed.

import json, os
import requests  # pip install requests

BASE    = "https://api.tellers.ai"
HEADERS = {"x-api-key": os.environ["TELLERS_API_KEY"]}

# 1. Send your prompt, exactly as in the first example.
resp = requests.post(f"{BASE}/agent/messages", headers=HEADERS, json={
    "message": "Search a stock video of ocean waves at sunset "
               "and add the title 'Golden Hour'.",
    "no_interaction": True,
})
resp.raise_for_status()
sent = resp.json()

# 2. Follow the agent live. Each event arrives as "event: <name>" and
#    "data: <json>" lines; the stream closes after "tellers.stream.end".
with requests.get(
    f"{BASE}/agent/chat/{sent['chat_id']}/stream",
    headers=HEADERS,
    params={"after": sent["stream_cursor"], "pending_id": sent["pending_id"]},
    stream=True,
    timeout=(10, 120),
) as stream:
    stream.raise_for_status()
    event = None
    for line in stream.iter_lines(decode_unicode=True):
        if line.startswith("event:"):
            event = line[len("event:"):].strip()
        elif line.startswith("data:"):
            data = json.loads(line[len("data:"):])
            if event == "response.output_text.delta":
                print(data.get("delta", ""), end="", flush=True)  # the agent's reply
            elif event == "tool.execution.started":
                print("\n[running a tool]")
            elif event == "tellers.stream.end":
                print(f"\nDone ({data['reason']})")
                break

# 3. Get the projects and assets the agent made.
resp = requests.get(f"{BASE}/agent/chat/{sent['chat_id']}/result", headers=HEADERS)
resp.raise_for_status()
print(resp.json()["projects"])

Export a project to MP4

Render a project, wait for the task to complete, then download the file.

# Uses HEADERS, BASE and run_agent() from the example above.
project_id = result["projects"][0]  # e.g. from run_agent()

# 1. Start the render. The export becomes a new video asset.
resp = requests.post(
    f"{BASE}/project/{project_id}/export",
    headers=HEADERS,
    json=["1080p"],  # one or more of "480p", "720p", "1080p", "4k"
)
resp.raise_for_status()
export = resp.json()

# 2. Poll the task until the render finishes.
while True:
    task = requests.get(f"{BASE}/task/{export['task_id']}", headers=HEADERS).json()
    if task["status"] == "COMPLETE":
        break
    if task["status"] == "FAILED":
        raise RuntimeError(task["result"])
    time.sleep(5)

# 3. Get a temporary download URL and save the MP4.
resp = requests.post(f"{BASE}/asset/download_urls", headers=HEADERS, json={
    "asset_ids": [export["asset_id"]],
    "quality":   "1080p",
})
resp.raise_for_status()
url = resp.json()["items"][0]["download"]["url"]

with requests.get(url, stream=True) as video, open("export.mp4", "wb") as f:
    video.raise_for_status()
    for chunk in video.iter_content(chunk_size=1 << 20):
        f.write(chunk)

Available models

The agent models you can pass as llm_model, read from the published OpenAPI spec. For generation models, call GET /tools/models: it lists every model with the formats, resolutions, and inputs it supports.

UseEndpoint & fieldModels
Agent LLMPOST /agent/messages
llm_model
  • gpt-6.2-astra
  • gpt-6.2-sol
  • gpt-6-astra
  • gpt-6.1-sol
  • gpt-6.1-terradefault
  • gpt-6-sol
  • gpt-6-luna

CLI

We provide a command-line interface for common operations. Use it for scripts, CI/CD, or local workflows.

For the complete list of endpoints and parameters, see the API reference.