Cliphi Agent API · Codex

Automate clip creation with Codex

Codex writes and runs the glue code for you. Describe the workflow, videos in, clips out, and it scripts the Cliphi API calls, error handling and polling included.

Please keep a human in the loop before anything gets published.

How it works in Codex

  1. 1. Give Codex your API key as an environment variable and the two endpoint shapes.
  2. 2. Have it write the submit-and-poll script, or just let it call the API directly in a task.
  3. 3. Wire the resulting clip URLs into whatever comes next: review, storage, or posting.

Start a job

Request
curl -X POST https://www.cliphi.com/api/v1/jobs \
  -H "X-API-Key: chp_live_..." \
  -H "Content-Type: application/json" \
  -d '{"video_url": "https://www.youtube.com/watch?v=VIDEO_ID"}'
Response
{
  "job_id": "9f2c1b8e-...",
  "status": "processing",
  "status_url": "/api/v1/jobs/9f2c1b8e-..."
}

Poll until done

Jobs run asynchronously and usually finish in a few minutes. The finished job includes rendered clips plus every detected moment with its score, transcript excerpt, and a raw preview URL, so the agent can show its human what else deserves a render.

Request
curl https://www.cliphi.com/api/v1/jobs/9f2c1b8e-... \
  -H "X-API-Key: chp_live_..."
Response
{
  "job_id": "9f2c1b8e-...",
  "status": "completed",
  "video": { "title": "My podcast ep. 42", "duration_seconds": 3611 },
  "clips": [
    {
      "clip_id": "c_01",
      "title": "Why nobody presses the money button",
      "url": "https://cdn.cliphi.com/clips/....mp4",
      "thumbnail_url": "https://cdn.cliphi.com/thumbs/....jpg",
      "aspect_ratio": "9:16",
      "viral_score": 92
    }
  ],
  "moments": [
    {
      "moment_id": "m_07",
      "title": "The enterprise pricing rant",
      "viral_score": 79,
      "transcript_excerpt": "and that is why per-seat pricing...",
      "preview_url": "https://cdn.cliphi.com/source/....mp4",
      "rendered": false
    }
  ]
}

Priced per use, in credits

The API spends the same credits as the Cliphi app: processing is billed per video minute and rendering per clip, so an agent pays for exactly what it uses. No seats, no separate API plan.

FAQ

How do I get a key?

Email [email protected] from your Cliphi account email. Keys are tied to your account and its credit balance.

What about supercuts and threads?

Coming to the same endpoint as new formats. Clips shipped first.

Can the agent publish directly?

Publishing through your connected social accounts is on the roadmap. Today the agent gets clip URLs it can post with any tool you already use.

Also works from