Video enhancement for agentic workflows

AI agents orchestrate multiple tools to complete tasks. BetterVideo's API is designed to fit cleanly into agentic architectures — stateless, idempotent, and private by default.

Free sandbox key, no card. Never trained on. Never sold. Auto-deleted.

BetterVideo as an agent tool

In agentic frameworks, tools are functions the agent can call. BetterVideo exposes three operations:

  • enhance_video(url, resolution) — Submit a video for enhancement
  • get_job_status(job_id) — Check if processing is complete
  • get_download_url(job_id) — Get a time-limited download link

Wrap these in your framework's tool interface and the agent can decide when to use them.

Framework integration patterns

LangChain / LangGraph

from langchain.tools import Tool

@tool
def enhance_video(video_url: str) -> str:
    """Enhance video quality. Use when video is blurry, noisy, or low-resolution."""
    # Call BetterVideo API
    job = bettervideo.submit(video_url)
    job.wait()
    return job.download_url

OpenAI function calling

functions = [{
    "name": "enhance_video",
    "description": "Improve video quality (upscale, sharpen, denoise)",
    "parameters": {
        "type": "object",
        "properties": {
            "video_url": {"type": "string"},
            "resolution": {"type": "string", "enum": ["1080p", "4k"]}
        }
    }
}]

Handling asynchronous processing

Video enhancement takes time (30-120 seconds typically). Two patterns for agents:

Polling

Submit job, then poll status until complete. Simple, but blocks the agent.

Webhook + state management

Submit job with webhook URL, continue other work, resume when notified. More complex, but scales better.

For most agents, polling is fine — the enhancement time is similar to the thinking time for complex reasoning.

One API call — curl, Python & Node

Submit a video by URL, then poll GET /v1/jobs/{id} until done (or receive a signed webhook), and fetch a time-limited download link:

cURL
curl -X POST https://api.bettervideo.io/v1/jobs \
  -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"video_url":"https://.../clip.mp4","resolution":"1080p"}'
Python
import requests
r = requests.post("https://api.bettervideo.io/v1/jobs",
    headers={"Authorization": "Bearer YOUR_KEY"},
    json={"video_url": "https://.../clip.mp4", "resolution": "1080p"})
job = r.json()  # poll GET /v1/jobs/{job['id']} until status == "done"
Node.js
const res = await fetch("https://api.bettervideo.io/v1/jobs", {
  method: "POST",
  headers: { "Authorization": "Bearer YOUR_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({ video_url: "https://.../clip.mp4", resolution: "1080p" })
});
const job = await res.json();

Privacy is the default, not an upgrade

  • Never trained on. Pre-trained, fixed-weight models — your frames are enhanced and returned, never used to train AI.
  • Never sold or shared. No third parties, no data brokers, no "anonymized" resale.
  • Auto-deleted. Files self-delete (default 30 days), or delete any job instantly with one call.
  • Proof on the Secure tier. Every deletion can return a signed deletion certificate, with a full audit log.

Frequently Asked Questions

Any framework that can make HTTP calls. We've tested with LangChain, AutoGPT, and custom orchestrators.

Yes — give the agent a quality assessment tool, or describe in the tool description when enhancement is appropriate.

The API returns standard HTTP errors. Implement retry logic with exponential backoff, or surface errors for human review.

Not yet — use the requests library directly. SDK coming soon.

Start free — get your API key

Free sandbox key (no card). Try the entire submit → enhance → download flow in a minute with the Run-in-Postman collection.