77trust / 100

Frames

by ffpipe in Documents & files

x402 APIPassing, checked 59 min ago

Extract still frames from any video as JPEG, WebP or PNG: sample many for a vision model, or grab one frame at a given timestamp (a thumbnail/poster/screenshot). Modes: every frame, every Nth, a rate in seconds, keyframes, N evenly spaced, or exact timestamps. One frame at 5s: mode=timestamps, timestamps=[5], format=jpeg. Up to 1000 frames/job; result is a manifest of frames with timestamps and download URLs, kept 24h. USDC over x402; no account; input <=100 MB.

POST https://ffpipe.dev/v1/frames

Last 30 days

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed

Uptime
100%
Response time
779 ms typical, 1.3 s slowest 5%
Last check
59 min ago
Next check
any minute now

How to call it

POST https://ffpipe.dev/v1/frames

Each call costs $0.01 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://ffpipe.dev/v1/frames
content-type: application/json

{
  "fps": 1,
  "maxOutputHeight": 720,
  "maxOutputWidth": 1280,
  "mode": "interval",
  "sourceUrl": "https://storage.example.com/clip.mov?signature=abc123"
}

Parameters

ParameterTypeRequiredDescription
countintegerNo`evenly_spaced` only: how many frames to spread across the window.
endTimenumberNoWindow end in seconds (0 = to the end). Must be greater than `startTime`; past the end of the media it is clamped.
formatstringNoImage format of each frame. `jpeg` (default) is small and accepted by every vision API; `png` is lossless; `webp` splits the difference. `jpg` is accepted as a spelling of `jpeg`. One of: jpeg, jpg, webp, png. Default: "jpeg".
fpsnumberNo`interval` only: frames per second, framerate-independent. May be below 1 - `0.5` is one frame every two seconds.
maxFramesintegerNoCeiling on how many frames this job may produce, and also the hard limit: 1000 frames is what one job's flat price covers. A request whose sampling would exceed it fails before any decoding, with the predicted count in the message. Default: 1000.
maxOutputHeightintegerNoFit box height. Same rules as `maxOutputWidth`.
maxOutputWidthintegerNoFit box width for each frame, applied to the source's DISPLAY dimensions: aspect preserved, never upscaled, oriented to the input (a portrait clip given 1920x1080 yields 1080x1920). 0 = no limit on this axis.
modestringYesHow to pick frames. Required - there is no default, because every possible one implies a sampling rate you did not ask for. `all` every frame; `every_nth` every Nth decoded frame (needs `n`); `interval` a fixed rate in seconds (needs `fps`, may be below 1); `keyframes` keyframes only (cheap on long… One of: all, every_nth, interval, keyframes, evenly_spaced, timestamps.
nintegerNo`every_nth` only: keep every Nth DECODED frame. This is a frame index, not a time - on a variable-frame-rate source the spacing in seconds varies.
qualityintegerNoEncoder quality for `jpeg`/`webp`; ignored for the lossless `png`. Default: 85.
sourceUrlstring (uri)Nohttps URL we fetch the input from. Rejected before any charge if it is not https, is an IP literal, or resolves to a localhost/.internal/.local name; redirects are followed (max 3) and every hop is re-checked. We fetch from datacenter IP ranges - hosts that block datacenter egress will fail with `i…
startTimenumberNoWindow start in seconds (0 = from the beginning). Applies to every mode.
timestampsarray of numberNo`timestamps` only: seconds into the source, one accurate frame each. Sorted for you. A timestamp at or past the end of the media fails the job.
uploadbooleanNoPush intake: instead of a `sourceUrl`, reserve an upload window and PUT the raw bytes (<= 100 MiB, same cap) to the `uploadUrl` in the 202 before `uploadExpiresAt`. You are charged at the 202, before any bytes move: letting the window expire is a terminal `error` with no refund; a pipeline failure …

Example response

The provider's example. We can't check it without paying.

{
  "jobId": "6f1e28d4-3b52-4d0a-9c1f-2ab5cbe2f9c3",
  "status": "queued",
  "statusUrl": "https://ffpipe.example/v1/jobs/6f1e28d4-3b52-4d0a-9c1f-2ab5cbe2f9c3?t=9a1b2c3d4e5f60718293a4b5c6d7e8f9"
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.01.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://ffpipe.dev/v1/frames' \
  -H 'content-type: application/json' \
  --data-raw '{"fps":1,"maxOutputHeight":720,"maxOutputWidth":1280,"mode":"interval","sourceUrl":"https://storage.example.com/clip.mov?signature=abc123"}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://ffpipe.dev/v1/frames' \
  -H 'content-type: application/json' \
  --data-raw '{"fps":1,"maxOutputHeight":720,"maxOutputWidth":1280,"mode":"interval","sourceUrl":"https://storage.example.com/clip.mov?signature=abc123"}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.01 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.01" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.01 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fffpipe.dev%2Fv1%2Fframes&method=POST
const res = await pay("https://ffpipe.dev/v1/frames", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "fps": 1,
    "maxOutputHeight": 720,
    "maxOutputWidth": 1280,
    "mode": "interval",
    "sourceUrl": "https://storage.example.com/clip.mov?signature=abc123"
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.01 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.01"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://ffpipe.dev/v1/frames",
        json={
            "fps": 1,
            "maxOutputHeight": 720,
            "maxOutputWidth": 1280,
            "mode": "interval",
            "sourceUrl": "https://storage.example.com/clip.mov?signature=abc123",
        },
    )
    print(res.status_code, res.text)

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
59 min agoPassed4021.3 s$0.01
5 h agoPassed4021.0 s$0.01
9 h agoPassed402779 ms$0.01
13 h agoPassed402634 ms$0.01
17 h agoPassed402825 ms$0.01
21 h agoPassed402682 ms$0.01
25 h agoPassed4021.3 s$0.01
29 h agoPassed402769 ms$0.01
32 h agoPassed4021.3 s$0.01
36 h agoPassed402750 ms$0.01
39 h agoPassed402620 ms$0.01
43 h agoPassed402757 ms$0.01
46 h agoPassed402768 ms$0.01
2 days agoPassed402708 ms$0.01
2 days agoPassed402813 ms$0.01