{"openapi":"3.1.0","info":{"title":"ffpipe — media processing for agents, by VidDay","version":"0.1.0","summary":"Machine-payable video conversion, media inspection and frame extraction, priced per job in USDC over x402.","description":"ffpipe does video conversion, media inspection and frame extraction for callers that pay per request with x402 — no account, no API key, no invoice.\n\n**Live on base mainnet.** Payments settle in real USDC (eip155:8453).\n\nFlow: POST a paid endpoint without payment → `402` with a `PAYMENT-REQUIRED` challenge → an x402 client signs and retries → `202 { jobId, statusUrl }` → poll `statusUrl` (free, token-gated) until `finished` or `error`.\n\nPrefer tools over REST? The same API is served as a remote MCP server at `/mcp` (streamable HTTP) — see that path's description.\n\nJobs are asynchronous. Download results within 24 hours of completion.\n\nIf a paid job fails inside our pipeline, or could not be queued after your payment settled, its status response carries a `retryVoucher` — one free retry, chained up to 3 times per job lineage. That is the refund mechanism; there are no on-chain refunds.\n\nCaveat for `sourceUrl`: we fetch it from datacenter IP ranges, so origins that block datacenter egress (some CDNs answer 403) fail with `ingest_failed`. Prefer a presigned URL from storage you control.\n\nNeed an operation that is not here? Today we offer video conversion, media inspection and frame extraction — `POST /v1/feedback` (free) is where to ask for anything else, and those requests are what drive the roadmap.","contact":{"name":"VidDay","url":"https://www.vidday.com","email":"ffpipe@vidday.com"},"x-guidance":"To convert a video: POST https://ffpipe.dev/v1/convert with JSON {\"sourceUrl\": \"<public https URL>\"} — or {\"upload\": true} to receive an uploadUrl you PUT the raw bytes to (≤ 100 MiB either way). The first, unpaid request answers 402 with a PAYMENT-REQUIRED challenge ($0.02 USDC on base); sign it with any x402 client and repeat the request. The 202 response carries a statusUrl — poll it (free) until status is finished, then download the MP4 from resultUrl within 24 hours. If the job fails on our side, the status response includes a retryVoucher header value good for one free retry. Anything you wanted but did not find is worth a free POST /v1/feedback — capability requests drive what gets built next.","termsOfService":"https://ffpipe.dev/terms"},"servers":[{"url":"https://ffpipe.dev","description":"this gateway"}],"tags":[{"name":"jobs","description":"Paid job submission and free status polling."},{"name":"discovery","description":"Unpaid, cacheable descriptions of this service."},{"name":"feedback","description":"Free, one-way channel for capability requests, bug reports and feedback. Requests for operations ffpipe does not offer yet are aggregated and drive what gets built next."},{"name":"mcp","description":"The same job API as MCP tools (Model Context Protocol, streamable HTTP). JSON-RPC, so the operation below is a pointer, not a full description — connect an MCP client and list the tools."}],"x-x402":{"protocol":"x402","version":2,"network":"eip155:8453","networkName":"base","scheme":"exact","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetSymbol":"USDC","assetDecimals":6,"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402","payTo":"0x38c72cAb5d8F053a7CCE4F522b923C3c70291B9d","testnet":false,"prices":{"POST /v1/convert":"$0.02","POST /v1/probe":"$0.01","POST /v1/frames":"$0.01"},"challengeHeader":"PAYMENT-REQUIRED","paymentHeader":"payment-signature","settlementHeader":"PAYMENT-RESPONSE","capture":"verify before the handler, settle after a 2xx — non-2xx responses are never charged"},"paths":{"/v1/convert":{"post":{"operationId":"convertVideo","tags":["jobs"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"x402":{}}]},"summary":"Queue a video conversion ($0.02 USDC)","description":"Two intake modes, exactly ONE per request: pull — we stage `sourceUrl` into our storage (≤ 100 MiB); or push — send `\"upload\": true` and PUT the bytes to the returned `uploadUrl` yourself (same cap; see `PUT /ingest/{jobId}`). Then a conversion scaled to fit `maxWidth`×`maxHeight` (defaults 1920×1080, cap 4096) is queued. Asynchronous: the 202 hands back a `statusUrl`; the result appears there when the render finishes. Pay with x402 ($0.02 USDC, exact scheme, base) or with a convert-kind `x-retry-voucher`.","parameters":[{"name":"payment-signature","in":"header","required":false,"description":"x402 v2 payment payload (base64 JSON) produced by an x402 client from the PAYMENT-REQUIRED challenge. The legacy `x-payment` header is also accepted. Omit it to receive the challenge.","schema":{"type":"string"}},{"name":"x-retry-voucher","in":"header","required":false,"description":"Retry-voucher credential ({uuid}.{hmac}) from a failed paid job's status response. Pays for this request instead of x402; must match the endpoint kind. Anything invalid falls through to the ordinary 402.","schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.[0-9a-f]{32}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertRequest"},"example":{"sourceUrl":"https://storage.example.com/clip.mov?signature=abc123","maxWidth":1280,"maxHeight":720}}}},"responses":{"202":{"description":"Accepted — and, for an x402-paid request, only now settled. Pull mode (`sourceUrl`): the job is durably recorded and paid work will happen — it is queued once the payment settles, and if it cannot be queued after payment the job becomes `error` with a `retryVoucher`. Upload mode (`upload: true`): the response instead carries `status: \"awaiting_upload\"` plus `uploadUrl` and `uploadExpiresAt` — PUT the raw bytes to `uploadUrl` before the deadline (this response is the ONLY place that credential is handed out; the status route never repeats it). You are charged now, before any bytes: an abandoned window becomes a terminal `error` with no refund, while a post-upload pipeline failure earns a `retryVoucher`.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded settlement details (transaction hash, network). Present for x402-paid requests; absent when the request was paid with a retry voucher.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"400":{"description":"Invalid request body or source URL (also returned when a source redirects to a disallowed URL). Never charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"invalid_request","message":"…"}}}},"x-error-codes":["invalid_request","invalid_source_url"]},"402":{"description":"Payment required ($0.02 USDC on base). For API callers the body is an empty JSON object — the machine-readable requirements are in the base64 `PAYMENT-REQUIRED` response header (x402 v2). Also returned when a presented payment fails verification, when a retry voucher is invalid/replayed/wrong-kind, and when settlement fails after acceptance (in which case the job is voided and no money moves). A browser (Accept: text/html + a Mozilla user agent) gets the SDK's HTML paywall page instead of JSON.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded JSON: { x402Version, accepts: [ { scheme, network, amount, asset, payTo, extra } ], error? }.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{}},"text/html":{"schema":{"type":"string"}}}},"412":{"description":"Emitted by the x402 middleware when a permit2-based payment attempt needs an allowance first. Payers using the advertised `exact` (EIP-3009) scheme never see this.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded JSON payment requirements.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"413":{"description":"The source exceeded the ingest byte cap (100 MiB by default), enforced while streaming. Never charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"source_too_large","message":"…"}}}},"x-error-codes":["source_too_large"]},"429":{"description":"Rate limited (per-IP request rate) or over the per-payer daily job cap. Never charged — and a rate-limited request cannot burn a retry voucher either.","headers":{"retry-after":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"rate_limited","message":"…"}}}},"x-error-codes":["rate_limited","daily_cap_exceeded"]},"500":{"description":"The gateway cannot accept payment right now. Note the legacy shape: a plain `error` string, not the `{ error: { code, message } }` envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"502":{"description":"The source could not be fetched/staged, or the job could not be queued. Never charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"ingest_failed","message":"…"}}}},"x-error-codes":["ingest_failed","pipeline_error"]},"503":{"description":"The gateway is misconfigured and cannot accept this request right now. Never charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_configured","message":"…"}}}},"x-error-codes":["not_configured"]}},"x-x402":{"x402Version":2,"accepts":[{"scheme":"exact","network":"eip155:8453","networkName":"base","price":"$0.02","amountAtomic":"20000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetSymbol":"USDC","assetDecimals":6,"payTo":"0x38c72cAb5d8F053a7CCE4F522b923C3c70291B9d"}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402","capture":"capture-at-acceptance: the facilitator VERIFIES before the handler runs and SETTLES only after a 2xx. Any non-2xx answer (400/402/403/413/429/502/503) is never charged. Pull mode (sourceUrl) stages the source and records the job before the 202, and queues it once the payment has settled — if it cannot be queued after payment, the job becomes `error` with a retry voucher; upload mode (upload: true) charges at the 202, BEFORE any bytes arrive — abandoning the upload window refunds nothing, while a failure to queue the job after your upload mints a retry voucher.","alternativePayment":{"header":"x-retry-voucher","description":"A retry-voucher credential ({uuid}.{hmac}) issued when a paid job failed on our side. Pays for exactly one request of the same kind; no on-chain movement. Invalid, replayed or wrong-kind vouchers get the ordinary 402."}}}},"/v1/probe":{"post":{"operationId":"probeMedia","tags":["jobs"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"summary":"Inspect a media file ($0.01 USDC)","description":"Stages `sourceUrl` (≤ 100 MiB) — or, with `\"upload\": true` instead (exactly one of the two) — and analyses it, delivering the technical metadata as a downloadable file. Asynchronous, same 202 → `statusUrl` shape as /v1/convert, including the upload-mode fields. In the default `json` format the result is the full raw analysis PLUS one added top-level `ffpipe_summary` object: container, duration, codecs, **display** width/height (post-rotation) alongside the coded ones, rotation, fps as a number, HDR, audio channels and sample rate. Read the display dimensions, not the raw stream ones — a phone's portrait video is stored as a landscape-coded frame plus a rotation flag, and acting on the coded pair is the classic sideways-output bug. A file that cannot be decoded is a SUCCESSFUL probe: the result carries the diagnosis (an `error` section) instead of stream data, because \"why won't this play?\" is a legitimate question and that is the answer. It is not a failure and earns no voucher. Pay with x402 ($0.01 USDC, exact scheme, base) or with a probe-kind `x-retry-voucher`.","parameters":[{"name":"payment-signature","in":"header","required":false,"description":"x402 v2 payment payload (base64 JSON) produced by an x402 client from the PAYMENT-REQUIRED challenge. The legacy `x-payment` header is also accepted. Omit it to receive the challenge.","schema":{"type":"string"}},{"name":"x-retry-voucher","in":"header","required":false,"description":"Retry-voucher credential ({uuid}.{hmac}) from a failed paid job's status response. Pays for this request instead of x402; must match the endpoint kind. Anything invalid falls through to the ordinary 402.","schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.[0-9a-f]{32}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProbeRequest"},"example":{"sourceUrl":"https://storage.example.com/clip.mov?signature=abc123"}}}},"responses":{"202":{"description":"Accepted — and, for an x402-paid request, only now settled. Pull mode (`sourceUrl`): the job is durably recorded and paid work will happen — it is queued once the payment settles, and if it cannot be queued after payment the job becomes `error` with a `retryVoucher`. Upload mode (`upload: true`): the response instead carries `status: \"awaiting_upload\"` plus `uploadUrl` and `uploadExpiresAt` — PUT the raw bytes to `uploadUrl` before the deadline (this response is the ONLY place that credential is handed out; the status route never repeats it). You are charged now, before any bytes: an abandoned window becomes a terminal `error` with no refund, while a post-upload pipeline failure earns a `retryVoucher`.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded settlement details (transaction hash, network). Present for x402-paid requests; absent when the request was paid with a retry voucher.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"400":{"description":"Invalid request body or source URL (also returned when a source redirects to a disallowed URL). Never charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"invalid_request","message":"…"}}}},"x-error-codes":["invalid_request","invalid_source_url"]},"402":{"description":"Payment required ($0.01 USDC on base). For API callers the body is an empty JSON object — the machine-readable requirements are in the base64 `PAYMENT-REQUIRED` response header (x402 v2). Also returned when a presented payment fails verification, when a retry voucher is invalid/replayed/wrong-kind, and when settlement fails after acceptance (in which case the job is voided and no money moves). A browser (Accept: text/html + a Mozilla user agent) gets the SDK's HTML paywall page instead of JSON.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded JSON: { x402Version, accepts: [ { scheme, network, amount, asset, payTo, extra } ], error? }.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{}},"text/html":{"schema":{"type":"string"}}}},"412":{"description":"Emitted by the x402 middleware when a permit2-based payment attempt needs an allowance first. Payers using the advertised `exact` (EIP-3009) scheme never see this.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded JSON payment requirements.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"413":{"description":"The source exceeded the ingest byte cap (100 MiB by default), enforced while streaming. Never charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"source_too_large","message":"…"}}}},"x-error-codes":["source_too_large"]},"429":{"description":"Rate limited (per-IP request rate) or over the per-payer daily job cap. Never charged — and a rate-limited request cannot burn a retry voucher either.","headers":{"retry-after":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"rate_limited","message":"…"}}}},"x-error-codes":["rate_limited","daily_cap_exceeded"]},"500":{"description":"The gateway cannot accept payment right now. Note the legacy shape: a plain `error` string, not the `{ error: { code, message } }` envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"502":{"description":"The source could not be fetched/staged, or the job could not be queued. Never charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"ingest_failed","message":"…"}}}},"x-error-codes":["ingest_failed","pipeline_error"]},"503":{"description":"The gateway is misconfigured and cannot accept this request right now. Never charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_configured","message":"…"}}}},"x-error-codes":["not_configured"]}},"x-x402":{"x402Version":2,"accepts":[{"scheme":"exact","network":"eip155:8453","networkName":"base","price":"$0.01","amountAtomic":"10000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetSymbol":"USDC","assetDecimals":6,"payTo":"0x38c72cAb5d8F053a7CCE4F522b923C3c70291B9d"}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402","capture":"capture-at-acceptance: the facilitator VERIFIES before the handler runs and SETTLES only after a 2xx. Any non-2xx answer (400/402/403/413/429/502/503) is never charged. Pull mode (sourceUrl) stages the source and records the job before the 202, and queues it once the payment has settled — if it cannot be queued after payment, the job becomes `error` with a retry voucher; upload mode (upload: true) charges at the 202, BEFORE any bytes arrive — abandoning the upload window refunds nothing, while a failure to queue the job after your upload mints a retry voucher.","alternativePayment":{"header":"x-retry-voucher","description":"A retry-voucher credential ({uuid}.{hmac}) issued when a paid job failed on our side. Pays for exactly one request of the same kind; no on-chain movement. Invalid, replayed or wrong-kind vouchers get the ordinary 402."}}}},"/v1/frames":{"post":{"operationId":"extractFrames","tags":["jobs"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"summary":"Extract still frames from a video ($0.01 USDC)","description":"Stages `sourceUrl` (≤ 100 MiB) — or, with `\"upload\": true` instead (exactly one of the two) — and extracts still frames as JPEG, WebP or PNG. `mode` is required and decides the sampling; everything else has a default. Asynchronous, same 202 → `statusUrl` shape as /v1/convert, including the upload-mode fields. A finished job's `resultUrl` is a JSON MANIFEST: the source's display dimensions, fps and rotation, an echo of your parameters, `frame_count`, and one entry per frame with its `index`, `pts_time` (seconds in the source timeline) and its own download `url` on this gateway. There is no second API call — fetch the manifest, then fetch the frames you want. Up to 1000 frames per job. Just want ONE frame at a moment — a thumbnail, poster frame or screenshot at a given second? Send `{\"mode\":\"timestamps\",\"timestamps\":[5],\"format\":\"jpeg\"}`; the result is a one-entry manifest pointing at that image. (If you would prefer the image bytes returned directly rather than via a manifest, tell us at POST /v1/feedback — we build what agents ask for.) Unlike a probe, an unreadable or non-video input FAILS here (audio-only files and still images included) — there are no frames to deliver. Probe first if you need a diagnosis. Pay with x402 ($0.01 USDC, exact scheme, base) or with a frames-kind `x-retry-voucher`.","parameters":[{"name":"payment-signature","in":"header","required":false,"description":"x402 v2 payment payload (base64 JSON) produced by an x402 client from the PAYMENT-REQUIRED challenge. The legacy `x-payment` header is also accepted. Omit it to receive the challenge.","schema":{"type":"string"}},{"name":"x-retry-voucher","in":"header","required":false,"description":"Retry-voucher credential ({uuid}.{hmac}) from a failed paid job's status response. Pays for this request instead of x402; must match the endpoint kind. Anything invalid falls through to the ordinary 402.","schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.[0-9a-f]{32}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FramesRequest"},"example":{"sourceUrl":"https://storage.example.com/clip.mov?signature=abc123","mode":"interval","fps":1,"maxOutputWidth":1280,"maxOutputHeight":720}}}},"responses":{"202":{"description":"Accepted — and, for an x402-paid request, only now settled. Pull mode (`sourceUrl`): the job is durably recorded and paid work will happen — it is queued once the payment settles, and if it cannot be queued after payment the job becomes `error` with a `retryVoucher`. Upload mode (`upload: true`): the response instead carries `status: \"awaiting_upload\"` plus `uploadUrl` and `uploadExpiresAt` — PUT the raw bytes to `uploadUrl` before the deadline (this response is the ONLY place that credential is handed out; the status route never repeats it). You are charged now, before any bytes: an abandoned window becomes a terminal `error` with no refund, while a post-upload pipeline failure earns a `retryVoucher`.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded settlement details (transaction hash, network). Present for x402-paid requests; absent when the request was paid with a retry voucher.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"400":{"description":"Invalid request body or source URL (also returned when a source redirects to a disallowed URL). Never charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"invalid_request","message":"…"}}}},"x-error-codes":["invalid_request","invalid_source_url"]},"402":{"description":"Payment required ($0.01 USDC on base). For API callers the body is an empty JSON object — the machine-readable requirements are in the base64 `PAYMENT-REQUIRED` response header (x402 v2). Also returned when a presented payment fails verification, when a retry voucher is invalid/replayed/wrong-kind, and when settlement fails after acceptance (in which case the job is voided and no money moves). A browser (Accept: text/html + a Mozilla user agent) gets the SDK's HTML paywall page instead of JSON.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded JSON: { x402Version, accepts: [ { scheme, network, amount, asset, payTo, extra } ], error? }.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{}},"text/html":{"schema":{"type":"string"}}}},"412":{"description":"Emitted by the x402 middleware when a permit2-based payment attempt needs an allowance first. Payers using the advertised `exact` (EIP-3009) scheme never see this.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded JSON payment requirements.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"413":{"description":"The source exceeded the ingest byte cap (100 MiB by default), enforced while streaming. Never charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"source_too_large","message":"…"}}}},"x-error-codes":["source_too_large"]},"429":{"description":"Rate limited (per-IP request rate) or over the per-payer daily job cap. Never charged — and a rate-limited request cannot burn a retry voucher either.","headers":{"retry-after":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"rate_limited","message":"…"}}}},"x-error-codes":["rate_limited","daily_cap_exceeded"]},"500":{"description":"The gateway cannot accept payment right now. Note the legacy shape: a plain `error` string, not the `{ error: { code, message } }` envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"502":{"description":"The source could not be fetched/staged, or the job could not be queued. Never charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"ingest_failed","message":"…"}}}},"x-error-codes":["ingest_failed","pipeline_error"]},"503":{"description":"The gateway is misconfigured and cannot accept this request right now. Never charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_configured","message":"…"}}}},"x-error-codes":["not_configured"]}},"x-x402":{"x402Version":2,"accepts":[{"scheme":"exact","network":"eip155:8453","networkName":"base","price":"$0.01","amountAtomic":"10000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetSymbol":"USDC","assetDecimals":6,"payTo":"0x38c72cAb5d8F053a7CCE4F522b923C3c70291B9d"}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402","capture":"capture-at-acceptance: the facilitator VERIFIES before the handler runs and SETTLES only after a 2xx. Any non-2xx answer (400/402/403/413/429/502/503) is never charged. Pull mode (sourceUrl) stages the source and records the job before the 202, and queues it once the payment has settled — if it cannot be queued after payment, the job becomes `error` with a retry voucher; upload mode (upload: true) charges at the 202, BEFORE any bytes arrive — abandoning the upload window refunds nothing, while a failure to queue the job after your upload mints a retry voucher.","alternativePayment":{"header":"x-retry-voucher","description":"A retry-voucher credential ({uuid}.{hmac}) issued when a paid job failed on our side. Pays for exactly one request of the same kind; no on-chain movement. Invalid, replayed or wrong-kind vouchers get the ordinary 402."}}}},"/v1/jobs/{id}":{"get":{"operationId":"getJob","security":[],"tags":["jobs"],"summary":"Job status (free)","description":"Free to call. The `t` token from the 202's `statusUrl` proves you bought the job — without it (or with a wrong one) the answer is the same 404 as a nonexistent job, so ids cannot be probed. `status` goes [`awaiting_upload` →] `queued` → `finished` | `error` (`awaiting_upload` only for upload-mode jobs; `processing` is reserved and not emitted today). While `awaiting_upload` the body carries `uploadExpiresAt` but never the `uploadUrl` — that credential is handed out exactly once, in the 202. An upload window that expires becomes `error` (\"upload never completed\") with NO voucher: abandoning the upload is buyer-caused. A job whose pipeline failed (or that could not be queued after payment) carries `retryVoucher`; a job whose payment never settled is `error` with no voucher. Download results within 24 hours of completion; a queued job with no completion within 6 hours is marked `error`.","parameters":[{"name":"id","in":"path","required":true,"description":"jobId from the 202 response.","schema":{"type":"string","format":"uuid"}},{"name":"t","in":"query","required":true,"description":"Ownership token minted with the job (32 hex chars). Present in the `statusUrl` you were handed; not derivable.","schema":{"type":"string","pattern":"^[0-9a-f]{32}$"}}],"responses":{"200":{"description":"Current job state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatus"},"examples":{"queued":{"summary":"still working","value":{"jobId":"6f1e…","status":"queued"}},"finished":{"summary":"result ready","value":{"jobId":"6f1e…","status":"finished","resultUrl":"https://…/output.mp4?X-Amz-…","thumbnailUrl":"https://…/thumb.jpg?X-Amz-…","durationMs":12480}},"failed":{"summary":"pipeline failed — free retry attached","value":{"jobId":"6f1e…","status":"error","errorMessage":"processing failed","retryVoucher":"3f2a51c8-1d6b-4c7e-9f10-6b0a1c2d3e4f.9a1b2c3d4e5f60718293a4b5c6d7e8f9"}}}}}},"404":{"description":"No such job, or a missing/incorrect `t` token (deliberately indistinguishable) — `not_found`. Requesting this path with `{id}` still in it answers `literal_path_template` instead, with the substitution to make.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_found","message":"…"}}}},"x-error-codes":["not_found","literal_path_template"]},"503":{"description":"The gateway is temporarily misconfigured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_configured","message":"…"}}}},"x-error-codes":["not_configured"]}}}},"/v1/jobs/{id}/result":{"get":{"operationId":"downloadResult","security":[],"tags":["jobs"],"summary":"Download the finished output (free)","description":"Streams the finished output from the gateway's own storage. This is where a finished job's `resultUrl` points; a probe job's output is its analysis document; a frames job's is its manifest, also served at /v1/jobs/{id}/frames/manifest. Free and unmetered — re-download as often as you need within the record's lifetime. The `t` query parameter is the SAME status token as `GET /v1/jobs/{id}`: bad/missing token and unknown/unfinished job are the same 404. A single `bytes` Range is honoured (206 with `content-range`; video players seek this way); multi-range or malformed Range headers are ignored and answered 200 with the full body; a range past the end is 416. Always answered by this gateway, never a redirect: if our stored copy is not ready yet (for a few seconds right after completion, or if the copy failed) the same bytes are streamed through this route.","parameters":[{"name":"id","in":"path","required":true,"description":"jobId from the 202 response.","schema":{"type":"string","format":"uuid"}},{"name":"t","in":"query","required":true,"description":"The job's ownership token — the same `t` as in your `statusUrl`.","schema":{"type":"string","pattern":"^[0-9a-f]{32}$"}},{"name":"range","in":"header","required":false,"description":"Optional single bytes range, e.g. `bytes=0-1023`.","schema":{"type":"string"}}],"responses":{"200":{"description":"The output bytes (content-type per the job: video/mp4, application/json and the other analysis formats, application/json for a manifest, …).","headers":{"accept-ranges":{"description":"`bytes`","schema":{"type":"string"}},"cache-control":{"description":"`private, max-age=3600` — the URL embeds your ownership token; never shared-cacheable.","schema":{"type":"string"}}},"content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"206":{"description":"The requested byte range, with `content-range`.","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"No such job, wrong/missing `t` token, job not `finished`, or nothing to serve — deliberately indistinguishable. A path still containing `{id}` answers `literal_path_template` instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_found","message":"…"}}}},"x-error-codes":["not_found","literal_path_template"]},"416":{"description":"The Range lies entirely past the end of the object (`content-range: bytes */{size}`)."},"503":{"description":"The gateway is temporarily misconfigured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_configured","message":"…"}}}},"x-error-codes":["not_configured"]}}}},"/v1/jobs/{id}/thumbnail":{"get":{"operationId":"downloadThumbnail","security":[],"tags":["jobs"],"summary":"Download the poster frame (free)","description":"Streams the poster frame the pipeline produced. This is where a finished job's `thumbnailUrl` points. Free and unmetered — re-download as often as you need within the record's lifetime. The `t` query parameter is the SAME status token as `GET /v1/jobs/{id}`: bad/missing token and unknown/unfinished job are the same 404. A single `bytes` Range is honoured (206 with `content-range`; video players seek this way); multi-range or malformed Range headers are ignored and answered 200 with the full body; a range past the end is 416. Always answered by this gateway, never a redirect: if our stored copy is not ready yet (for a few seconds right after completion, or if the copy failed) the same bytes are streamed through this route.","parameters":[{"name":"id","in":"path","required":true,"description":"jobId from the 202 response.","schema":{"type":"string","format":"uuid"}},{"name":"t","in":"query","required":true,"description":"The job's ownership token — the same `t` as in your `statusUrl`.","schema":{"type":"string","pattern":"^[0-9a-f]{32}$"}},{"name":"range","in":"header","required":false,"description":"Optional single bytes range, e.g. `bytes=0-1023`.","schema":{"type":"string"}}],"responses":{"200":{"description":"The poster frame bytes (image/jpeg).","headers":{"accept-ranges":{"description":"`bytes`","schema":{"type":"string"}},"cache-control":{"description":"`private, max-age=3600` — the URL embeds your ownership token; never shared-cacheable.","schema":{"type":"string"}}},"content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"206":{"description":"The requested byte range, with `content-range`.","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"No such job, wrong/missing `t` token, job not `finished`, or nothing to serve — deliberately indistinguishable. A path still containing `{id}` answers `literal_path_template` instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_found","message":"…"}}}},"x-error-codes":["not_found","literal_path_template"]},"416":{"description":"The Range lies entirely past the end of the object (`content-range: bytes */{size}`)."},"503":{"description":"The gateway is temporarily misconfigured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_configured","message":"…"}}}},"x-error-codes":["not_configured"]}}}},"/v1/jobs/{id}/frames/manifest":{"get":{"operationId":"downloadFramesManifest","security":[],"tags":["jobs"],"summary":"Download a frames job's manifest (free)","description":"The JSON index of everything the job produced, and where a finished frames job's `resultUrl` points. Each entry's `url` is a `GET /v1/jobs/{id}/frames/{index}` on this gateway carrying the same token — fetch them directly. `GET /v1/jobs/{id}/result` serves this same document, for callers that only know the generic route. Free and unmetered, always answered by this gateway (never a redirect): if our stored copy is not ready yet the manifest is still served here, with every frame `url` pointing at this gateway.","parameters":[{"name":"id","in":"path","required":true,"description":"jobId from the 202 response.","schema":{"type":"string","format":"uuid"}},{"name":"t","in":"query","required":true,"description":"The job's ownership token — the same `t` as in your `statusUrl`.","schema":{"type":"string","pattern":"^[0-9a-f]{32}$"}}],"responses":{"200":{"description":"The manifest.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FramesManifest"}}}},"404":{"description":"No such job, wrong/missing `t` token, the job is not a finished frames job, or no such frame index — deliberately indistinguishable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_found","message":"…"}}}},"x-error-codes":["not_found","literal_path_template"]},"503":{"description":"The gateway is temporarily misconfigured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_configured","message":"…"}}}},"x-error-codes":["not_configured"]}}}},"/v1/jobs/{id}/frames/{index}":{"get":{"operationId":"downloadFrame","security":[],"tags":["jobs"],"summary":"Download one frame (free)","description":"One extracted frame's bytes. `index` is the manifest entry's `index`, which is also the number in the frame's file name. Free and unmetered, byte Range supported, same `t` token as the manifest. Always answered by this gateway, never a redirect — if our copy of that one frame is unavailable its bytes are streamed through this route.","parameters":[{"name":"id","in":"path","required":true,"description":"jobId from the 202 response.","schema":{"type":"string","format":"uuid"}},{"name":"index","in":"path","required":true,"description":"Zero-based frame index, from the manifest.","schema":{"type":"integer","minimum":0}},{"name":"t","in":"query","required":true,"description":"The job's ownership token — the same `t` as in your `statusUrl`.","schema":{"type":"string","pattern":"^[0-9a-f]{32}$"}},{"name":"range","in":"header","required":false,"description":"Optional single bytes range, e.g. `bytes=0-1023`.","schema":{"type":"string"}}],"responses":{"200":{"description":"The frame bytes (image/jpeg, image/webp or image/png, per the job's `format`).","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"206":{"description":"The requested byte range, with `content-range`.","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"No such job, wrong/missing `t` token, the job is not a finished frames job, or no such frame index — deliberately indistinguishable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_found","message":"…"}}}},"x-error-codes":["not_found","literal_path_template"]},"416":{"description":"The Range lies entirely past the end of the frame."},"503":{"description":"The gateway is temporarily misconfigured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_configured","message":"…"}}}},"x-error-codes":["not_configured"]}}}},"/v1/feedback":{"post":{"operationId":"leaveFeedback","security":[],"tags":["feedback"],"summary":"Request a capability, report a bug, or send feedback (free)","description":"Free, unauthenticated and one-way. ffpipe offers video conversion, media inspection and frame extraction and nothing else today — if the operation you needed is not here (another output format, a trimmed clip, a different transformation), this is where to say so. Submissions are aggregated and are the primary input to what gets built next, so one concrete sentence is worth more than none. Only `message` is required, and the intake is deliberately forgiving: it is also read from `feedback`, `text`, `comment` or `body`, or from a raw `text/plain` request body. `type` is optional and defaults to `feedback`; `jobId` is optional CONTEXT and is deliberately not verified (no token, no ownership check, and it cannot be used to probe whether a job exists); `contact` is optional and is the only way we can reply. Answers `202 { ok: true }` — accepted for processing. No id is issued and there is no read-back endpoint. No payment is involved: this route has no 402 and cannot queue work.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"},"example":{"type":"feature_request","message":"I needed a single frame as a JPEG at a given timestamp, not a full conversion.","contact":"agent-owner@example.com"}},"text/plain":{"schema":{"type":"string","maxLength":2000,"description":"The message on its own. Filed as `feedback` with no `jobId` or `contact`."},"example":"I needed a single frame as a JPEG at a given timestamp, not a full conversion."}}},"responses":{"202":{"description":"Accepted. Recorded and counted; nothing further happens synchronously.","content":{"application/json":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean","const":true}}},"example":{"ok":true}}}},"400":{"description":"Malformed JSON, unknown `type`, missing/empty `message` (under any of its accepted keys), or a field over its length limit. The `message` restates the shape we accept, so a caller can correct itself from the refusal alone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"invalid_request","message":"…"}}}},"x-error-codes":["invalid_request"]},"429":{"description":"Over the per-IP submission rate (5/minute) or the per-IP daily acceptance cap (50/day). Retry per `retry-after`.","headers":{"retry-after":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"rate_limited","message":"…"}}}},"x-error-codes":["rate_limited","daily_cap_exceeded"]},"503":{"description":"The submission could not be recorded, so it was NOT accepted — please retry rather than assume we have it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"unavailable","message":"…"}}}},"x-error-codes":["unavailable"]}}}},"/health":{"get":{"operationId":"health","security":[],"tags":["discovery"],"summary":"Liveness (free)","responses":{"200":{"description":"The gateway is up.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"service":{"type":"string"}},"required":["ok","service"]},"example":{"ok":true,"service":"ffpipe-gateway"}}}}}}},"/":{"get":{"operationId":"landing","security":[],"tags":["discovery"],"summary":"Human landing page (free)","responses":{"200":{"description":"Self-contained HTML overview.","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/.well-known/x402":{"get":{"operationId":"wellKnownX402","security":[],"tags":["discovery"],"summary":"x402 discovery manifest (free)","description":"Machine-readable list of this gateway's paid resources with prices and payment requirements — the same information the 402 challenges carry, in the de-facto well-known manifest shape crawlers fetch.","responses":{"200":{"description":"Discovery manifest.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/llms.txt":{"get":{"operationId":"llmsTxt","security":[],"tags":["discovery"],"summary":"Agent primer (free)","description":"Plain-text orientation for LLM agents: endpoints, prices, the handshake, ready-to-run snippets.","responses":{"200":{"description":"Plain text.","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/openapi.json":{"get":{"operationId":"openapi","security":[],"tags":["discovery"],"summary":"This document (free)","responses":{"200":{"description":"OpenAPI 3.1 document.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/privacy":{"get":{"operationId":"privacy","security":[],"tags":["discovery"],"summary":"Privacy policy (free)","responses":{"200":{"description":"The privacy policy, as HTML — includes what the public blockchain necessarily exposes about payments.","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/terms":{"get":{"operationId":"terms","security":[],"tags":["discovery"],"summary":"Terms of service (free)","responses":{"200":{"description":"The terms of service, as HTML.","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/mcp":{"post":{"operationId":"mcp","security":[],"tags":["mcp"],"summary":"MCP server — convert_video / probe_media / extract_frames / get_job_status / get_balance / leave_feedback as tools","description":"Remote MCP server (streamable HTTP transport, stateless — no session id issued or required; responses are plain JSON). Tools: `convert_video` (paid, same terms as POST /v1/convert), `probe_media` (paid, same terms as POST /v1/probe), `extract_frames` (paid, same terms as POST /v1/frames), `get_job_status` (free, same token semantics as GET /v1/jobs/{id}), `get_balance` (free, no input — the connected account's balance, same body as GET /v1/credits/balance; anonymous callers get an `unauthorized` tool result), `leave_feedback` (free, same body as POST /v1/feedback). The last three are registered under every configuration. Every tool carries MCP annotations: the paid job tools are writes (`readOnlyHint: false`, and never idempotent — two identical calls are two jobs and two charges), the free lookups are read-only, and `probe_media` reports `readOnlyHint: true` (it inspects a file and leaves no artifact behind). Nothing here is `destructiveHint: true`. Payment rides the MCP protocol (Cloudflare Agents SDK x402 convention), NOT HTTP headers: an unpaid paid-tool call returns an `isError` result whose `_meta[\"x402/error\"]` carries the same `accepts[]` as a REST 402; the client signs and retries the call with `_meta[\"x402/payment\"]` set to the base64 payload. `withX402Client` from the `agents` npm package automates this. Capture semantics are identical to REST: verify before the tool runs, settle only on a non-error result. Retry vouchers are redeemed via the optional `retryVoucher` tool input. The body is JSON-RPC 2.0 per the MCP spec — not usefully describable as an OpenAPI schema; connect an MCP client and call tools/list.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"A JSON-RPC 2.0 MCP message (initialize, tools/list, tools/call, …)."}}}},"responses":{"200":{"description":"JSON-RPC response. Tool-level failures (including the x402 payment challenge) are `isError` tool results inside a 200, per MCP.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"x-x402":{"transport":"mcp","challenge":"_meta[\"x402/error\"]","payment":"_meta[\"x402/payment\"]","settlement":"_meta[\"x402/payment-response\"]","tools":{"convert_video":{"price":"$0.02","priceUSD":0.02,"amountAtomic":"20000"},"probe_media":{"price":"$0.01","priceUSD":0.01,"amountAtomic":"10000"},"extract_frames":{"price":"$0.01","priceUSD":0.01,"amountAtomic":"10000"},"get_job_status":{"price":"free"},"get_balance":{"price":"free"},"leave_feedback":{"price":"free"}},"capture":"verify before the tool callback, settle only after a non-error tool result — failed tool calls are never charged"}}},"/ingest/{jobId}":{"put":{"operationId":"uploadSource","security":[],"tags":["jobs"],"summary":"Upload-mode source delivery (buyers)","description":"Completes an upload-mode job: PUT the raw bytes (≤ 100 MiB) to the exact `uploadUrl` from the paid 202 before its `uploadExpiresAt`. The `t` token uses its own HMAC namespace — the status token does not work here, and this one does not work there. Send a correct `Content-Length` when you can; chunked bodies are accepted and streamed (the byte cap is enforced either way). On success (`201`) the job transitions to `queued` and processing begins — from here it behaves exactly like a pull-mode job. A 413 (over the cap) persists nothing and leaves the job `awaiting_upload`, so you can retry within your window. A second PUT after the job queued — or after the window expired — answers `410`. If the pipeline refuses the job AFTER your upload stored (502): you were already charged at acceptance, so that failure automatically mints a `retryVoucher` — poll your `statusUrl` to collect it.","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"t","in":"query","required":true,"description":"Upload token from the 202's `uploadUrl` (32 hex chars, its own HMAC namespace). Not derivable, not repeated anywhere.","schema":{"type":"string","pattern":"^[0-9a-f]{32}$"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"*/*":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Bytes stored, job queued for processing. Poll your `statusUrl`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadComplete"}}}},"400":{"description":"Missing request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"invalid_request","message":"…"}}}},"x-error-codes":["invalid_request"]},"404":{"description":"Unknown job or wrong/missing token (deliberately indistinguishable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_found","message":"…"}}}},"x-error-codes":["not_found"]},"410":{"description":"The job is not awaiting an upload — already queued, terminal, or the upload window expired (deliberately indistinguishable). An expired window is a terminal `error` with no voucher.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"gone","message":"…"}}}},"x-error-codes":["gone"]},"413":{"description":"The body exceeded the ingest byte cap (100 MiB by default). Nothing was stored; the job stays `awaiting_upload` — retry within your window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"source_too_large","message":"…"}}}},"x-error-codes":["source_too_large"]},"502":{"description":"Your bytes were stored but the job could not be queued (or the stream failed mid-flight). For a stored-then-refused job a `retryVoucher` was minted automatically — poll your `statusUrl`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"pipeline_error","message":"…"}}}},"x-error-codes":["pipeline_error","ingest_failed"]},"503":{"description":"The gateway is temporarily misconfigured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_configured","message":"…"}}}},"x-error-codes":["not_configured"]}}}}},"components":{"securitySchemes":{"x402":{"type":"apiKey","in":"header","name":"payment-signature","description":"Not an API key: an x402 v2 payment payload, freshly signed per request from the PAYMENT-REQUIRED challenge. Modelled as apiKey because OpenAPI has no x402 security type — see the `x-x402` extensions."},"retryVoucher":{"type":"apiKey","in":"header","name":"x-retry-voucher","description":"Single-use retry credential issued when a paid job failed on our side."}},"schemas":{"ConvertRequest":{"type":"object","additionalProperties":true,"description":"Unknown properties are ignored. Validation runs before any charge, so a bad body costs nothing. EXACTLY ONE of `sourceUrl` or `upload: true` is required — both present or both absent is a 400 (never charged).","properties":{"sourceUrl":{"$ref":"#/components/schemas/SourceUrl"},"upload":{"$ref":"#/components/schemas/UploadFlag"},"maxWidth":{"type":"integer","minimum":1,"maximum":4096,"default":1920,"description":"Max output width. Must be a positive integer (JSON number, not a string)."},"maxHeight":{"type":"integer","minimum":1,"maximum":4096,"default":1080,"description":"Max output height."}}},"ProbeRequest":{"type":"object","additionalProperties":true,"description":"EXACTLY ONE of `sourceUrl` or `upload: true` is required. Every option below is optional and every number/boolean must be a JSON number/boolean, not a string. Validation runs before any charge.","properties":{"sourceUrl":{"$ref":"#/components/schemas/SourceUrl"},"upload":{"$ref":"#/components/schemas/UploadFlag"},"outputFormat":{"type":"string","enum":["json","xml","csv","flat","ini"],"default":"json","description":"Format of the delivered analysis. `json` (the default) is the only one that carries the normalized `ffpipe_summary` block; the others are the raw writer output, untouched. `flat` is delivered as .txt."},"sections":{"type":"array","items":{"type":"string","enum":["format","streams","chapters","programs"]},"default":["format","streams","chapters"],"description":"Which sections to report. Defaults to format + streams + chapters. Duplicates are collapsed; an unknown name is a 400 (never charged)."},"summary":{"type":"boolean","default":true,"description":"Keep the normalized `ffpipe_summary` block (JSON only). Send false for byte-exact raw output. PREFER the summary: it answers coded-vs-display dimensions, rotation, fps as a number and HDR directly, which is where hand-rolled parsing of the raw sections usually goes wrong."},"selectStreams":{"type":"string","maxLength":256,"description":"Restrict the analysis to matching streams, e.g. `v:0` (first video stream) or `a` (all audio). A specifier that matches nothing still succeeds and says so.","examples":["v:0"]},"showFrames":{"type":"boolean","default":false,"description":"Report per-FRAME detail. Large: unless you also send `readIntervals`, a bounded window is applied for you so the analysis cannot outgrow what we can deliver. Combine with `showEntries` to keep only the fields you need."},"showPackets":{"type":"boolean","default":false,"description":"Report per-PACKET detail. Same bounded-window treatment as `showFrames`."},"showEntries":{"type":"string","maxLength":256,"description":"Keep only the named fields, e.g. `frame=pict_type,pts_time,key_frame` or `format=duration`. Section and field names only; a malformed expression is a 400 (never charged) rather than a job that cannot succeed.","examples":["frame=pict_type,pts_time,key_frame"]},"readIntervals":{"type":"string","maxLength":256,"description":"Limit the analysis to a window, e.g. `%+60` (the first 60 seconds), `30%+10` (10 seconds from 0:30) or `%+#500` (the first 500 packets). Applied automatically when frame/packet detail is requested without one. A malformed expression is a 400 (never charged).","examples":["%+60"]},"countFrames":{"type":"boolean","default":false,"description":"Count frames exactly, which requires decoding the whole file - slow on long sources. Leave it off unless an exact count is the point."},"countPackets":{"type":"boolean","default":false,"description":"Count packets exactly. Same cost caveat as `countFrames`."}}},"FramesRequest":{"type":"object","required":["mode"],"additionalProperties":true,"description":"EXACTLY ONE of `sourceUrl` or `upload: true` is required, plus `mode`. Every number must be a JSON number, not a string. Validation runs before any charge, including the parameter each mode needs.","properties":{"sourceUrl":{"$ref":"#/components/schemas/SourceUrl"},"upload":{"$ref":"#/components/schemas/UploadFlag"},"mode":{"type":"string","enum":["all","every_nth","interval","keyframes","evenly_spaced","timestamps"],"description":"How 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 sources); `evenly_spaced` N samples across the window (needs `count`); `timestamps` one frame per given second (needs `timestamps`). Every mode is bounded by `maxFrames` (1000): `all` and `interval` on a long source, and `keyframes` on a dense one, can exceed it - the job then fails fast and, being our own limit rather than your mistake, earns the usual retry voucher. For long inputs prefer `interval`, `evenly_spaced` or `timestamps`."},"n":{"type":"integer","minimum":1,"description":"`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."},"fps":{"type":"number","exclusiveMinimum":0,"maximum":120,"description":"`interval` only: frames per second, framerate-independent. May be below 1 - `0.5` is one frame every two seconds."},"count":{"type":"integer","minimum":1,"maximum":1000,"description":"`evenly_spaced` only: how many frames to spread across the window."},"timestamps":{"type":"array","items":{"type":"number","minimum":0},"maxItems":1000,"description":"`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.","examples":[[1.5,30,90.25]]},"startTime":{"type":"number","minimum":0,"description":"Window start in seconds (0 = from the beginning). Applies to every mode."},"endTime":{"type":"number","minimum":0,"description":"Window end in seconds (0 = to the end). Must be greater than `startTime`; past the end of the media it is clamped."},"maxOutputWidth":{"type":"integer","minimum":0,"maximum":4096,"description":"Fit 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."},"maxOutputHeight":{"type":"integer","minimum":0,"maximum":4096,"description":"Fit box height. Same rules as `maxOutputWidth`."},"format":{"type":"string","enum":["jpeg","jpg","webp","png"],"default":"jpeg","description":"Image 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`."},"quality":{"type":"integer","minimum":1,"maximum":100,"default":85,"description":"Encoder quality for `jpeg`/`webp`; ignored for the lossless `png`."},"maxFrames":{"type":"integer","minimum":1,"maximum":1000,"default":1000,"description":"Ceiling 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."}}},"FramesManifest":{"type":"object","required":["frame_count","frames"],"additionalProperties":true,"description":"Index of everything one frames job produced. Read `source.width`/`height` (DISPLAY dimensions, post-rotation) as the size the frames actually depict; the coded pair is reported separately and must not be compared against the frames.","properties":{"source":{"type":"object","additionalProperties":true,"description":"The input as we measured it: duration, display width/height, coded width/height, fps, codec, rotation, HDR flag."},"params":{"type":"object","additionalProperties":true,"description":"Echo of the sampling parameters this job ran with, so a stored manifest explains itself."},"frame_count":{"type":"integer","description":"How many frames the job produced."},"frames":{"type":"array","description":"One entry per frame, ordered by time.","items":{"type":"object","required":["index","pts_time","url"],"additionalProperties":true,"properties":{"index":{"type":"integer","description":"Array position, the number in the frame's file name, and the `{index}` of its download route."},"pts_time":{"type":"number","description":"Seconds in the SOURCE timeline (a window offset is added back in for you)."},"url":{"type":"string","format":"uri","description":"Download URL for this frame: `GET /v1/jobs/{id}/frames/{index}` on this gateway, carrying the same ownership token — just GET it."},"width":{"type":"integer"},"height":{"type":"integer"}}}}}},"SourceUrl":{"type":"string","format":"uri","description":"https 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 `ingest_failed`, so prefer a presigned URL from storage you control. Body size cap: 100 MiB by default, enforced while streaming.","examples":["https://storage.example.com/clip.mov?signature=abc123"]},"UploadFlag":{"type":"boolean","const":true,"description":"Push 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 after your upload earns a `retryVoucher`."},"JobAccepted":{"type":"object","required":["jobId","status","statusUrl"],"properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued","awaiting_upload"],"description":"`queued` for pull mode; `awaiting_upload` for upload mode (the job queues when your PUT completes)."},"statusUrl":{"type":"string","format":"uri","description":"Free, token-gated status endpoint for this job. Keep it: the token is the only proof of ownership and is not recoverable."},"fundingSource":{"type":"string","enum":["x402","credits","voucher"],"description":"What paid for this acceptance: `x402` (the on-chain payment you signed), `credits` (your account's balance, when you sent a Bearer token) or `voucher` (a free retry). Stated back to you so a caller holding both a token and a wallet never has to guess which one it just spent."},"uploadUrl":{"type":"string","format":"uri","description":"Upload mode only: PUT the raw bytes here before `uploadExpiresAt`. Keep it - this response is the ONLY place the upload token is handed out (the status route never repeats it), and it is not recoverable."},"uploadExpiresAt":{"type":"string","format":"date-time","description":"Upload mode only: deadline for the PUT. Past it the job becomes a terminal `error` with no refund."}}},"UploadComplete":{"type":"object","required":["jobId","status","bytes"],"properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"queued"},"bytes":{"type":"integer","description":"Bytes stored from your upload."}}},"JobStatus":{"type":"object","required":["jobId","status"],"properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["awaiting_upload","queued","processing","finished","error"],"description":"`awaiting_upload` only for upload-mode jobs whose PUT has not completed. `processing` is reserved and not emitted today."},"uploadExpiresAt":{"type":"string","format":"date-time","description":"Only while `awaiting_upload`: the PUT deadline. The `uploadUrl` itself is deliberately NOT repeated here — it was handed out exactly once, in the 202."},"resultUrl":{"type":"string","format":"uri","description":"Download URL for the output — download within 24 hours of completion. Only on `finished`. Always this gateway's `GET /v1/jobs/{id}/result` (a frames job's: `GET /v1/jobs/{id}/frames/manifest`) — free, re-downloadable, Range-supporting, same `t` token, never a redirect: just GET it."},"thumbnailUrl":{"type":"string","format":"uri","description":"Poster frame download URL, when the pipeline produced one — same serving semantics as `resultUrl` (always `GET /v1/jobs/{id}/thumbnail` on this gateway)."},"durationMs":{"type":"integer","description":"Output duration in milliseconds."},"frameCount":{"type":"integer","description":"Frames jobs only: how many frames the manifest at `resultUrl` lists."},"errorMessage":{"type":"string","description":"Human-readable failure reason. Only on `error`."},"retryVoucher":{"type":"string","description":"Free-retry credential ({uuid}.{hmac}) for a job we charged for and failed to deliver. Send it as `x-retry-voucher` on the same kind of endpoint. Absent when the failure cost you nothing (settlement voided) or when the lineage already used its 3 retries."}}},"FeedbackRequest":{"type":"object","required":["message"],"additionalProperties":true,"description":"Unknown properties are ignored. Nothing here is authenticated and nothing is charged.","properties":{"type":{"type":"string","enum":["feature_request","bug","feedback"],"default":"feedback","description":"`feature_request` for an operation ffpipe does not offer yet (the one this channel exists for), `bug` for something broken, `feedback` for anything else. Optional — omitted means `feedback`; a value outside this list is refused rather than guessed."},"message":{"type":"string","minLength":1,"maxLength":2000,"description":"What you needed, what broke, or what you think. Plain text, trimmed; be concrete about the operation you wanted. Also accepted under `feedback`, `text`, `comment`, `body` — or as a raw `text/plain` body."},"jobId":{"type":"string","maxLength":200,"description":"Optional job this relates to. CONTEXT ONLY: it is not verified, needs no token, and reveals nothing about whether that job exists."},"contact":{"type":"string","maxLength":200,"description":"Optional email or handle to reply at. Omit for an anonymous submission."}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_request","invalid_source_url","source_too_large","ingest_failed","pipeline_error","rate_limited","daily_cap_exceeded","not_found","literal_path_template","gone","unknown_job","unauthorized","not_configured","unavailable"]},"message":{"type":"string"}}}}}}}}