{"openapi":"3.1.0","info":{"title":"x402 Video Gateway","version":"1.0.0","description":"Pay-per-call AI video generation over the x402 payment protocol. No accounts, no API keys, no credit cards: HTTP 402 -> pay USDC on Base -> generate. Prompts are screened before payment — rejected requests are never charged.","contact":{"name":"x402 Video","url":"https://x402-video.com"},"x-guidance":"POST a generation endpoint with a JSON prompt. You get HTTP 402 with exact USDC payment requirements; pay with any x402 client (e.g. @x402/fetch) and retry. The paid response returns { job_id, status_url } immediately. Poll GET /jobs/{id} (free) until status is succeeded, then download video_url within 24h. Optional Idempotency-Key header prevents double-charging on retries. Full agent storefront: GET /llms.txt."},"servers":[{"url":"https://api.x402-video.com"}],"paths":{"/generate/seedance/5s-720p":{"post":{"operationId":"generate_seedance_5s_720p","summary":"Seedance 2.0 — 5-second 720p text-to-video (highest quality)","description":"Seedance 2.0 — 5-second 720p text-to-video (highest quality). Returns { job_id, status_url } immediately; poll GET /jobs/{id} (free) until succeeded, then download video_url within 24h.","tags":["generation"],"security":[],"x-payment-info":{"protocols":[{"x402":{"version":2,"scheme":"exact","network":"eip155:8453","asset":"USDC"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.96"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","maxLength":2000,"description":"Text prompt describing the video. Screened before payment — rejected prompts are never charged. Parameter directives (--flag) are not allowed."},"ratio":{"type":"string","enum":["16:9","4:3","1:1","3:4","9:16","21:9","adaptive"],"default":"16:9","description":"Aspect ratio of the output video."}},"required":["prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Payment settled — job accepted. Poll status_url until succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreated"}}}},"402":{"description":"Payment required — x402 v2 challenge (Payment-Required header + JSON body) with USDC payment requirements (exact scheme). Pay and retry; the quote is exact for your request."},"403":{"description":"Rejected before payment by validation or the content filter — never charged."},"429":{"description":"Per-IP rate limit exceeded. Retry later."},"503":{"description":"At service capacity — rejected BEFORE payment, never charged."}}}},"/generate/seedance-fast/5s-720p":{"post":{"operationId":"generate_seedance_fast_5s_720p","summary":"Seedance 2.0 Fast — 5-second 720p text-to-video (faster, cheaper)","description":"Seedance 2.0 Fast — 5-second 720p text-to-video (faster, cheaper). Returns { job_id, status_url } immediately; poll GET /jobs/{id} (free) until succeeded, then download video_url within 24h.","tags":["generation"],"security":[],"x-payment-info":{"protocols":[{"x402":{"version":2,"scheme":"exact","network":"eip155:8453","asset":"USDC"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.91"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","maxLength":2000,"description":"Text prompt describing the video. Screened before payment — rejected prompts are never charged. Parameter directives (--flag) are not allowed."},"ratio":{"type":"string","enum":["16:9","4:3","1:1","3:4","9:16","21:9","adaptive"],"default":"16:9","description":"Aspect ratio of the output video."}},"required":["prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Payment settled — job accepted. Poll status_url until succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreated"}}}},"402":{"description":"Payment required — x402 v2 challenge (Payment-Required header + JSON body) with USDC payment requirements (exact scheme). Pay and retry; the quote is exact for your request."},"403":{"description":"Rejected before payment by validation or the content filter — never charged."},"429":{"description":"Per-IP rate limit exceeded. Retry later."},"503":{"description":"At service capacity — rejected BEFORE payment, never charged."}}}},"/generate/seedance/custom":{"post":{"operationId":"generate_seedance_custom","summary":"Seedance 2.0 — parametric text-to-video: choose duration (4-15s), resolution (480p/720p/1080p), ratio, seed, audio. Price scales with duration × resolution.","description":"Seedance 2.0 — parametric text-to-video: choose duration (4-15s), resolution (480p/720p/1080p), ratio, seed, audio. Price scales with duration × resolution.. The 402 quote is computed from YOUR params (formula: retail_usd_per_second[resolution] × duration × (generate_audio ? 1.25 : 1) + $0.00 fee, rounded up to the cent).","tags":["generation"],"security":[],"x-payment-info":{"protocols":[{"x402":{"version":2,"scheme":"exact","network":"eip155:8453","asset":"USDC"}}],"price":{"mode":"dynamic","currency":"USD","min":"0.45","max":"9.00"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","maxLength":2000,"description":"Text prompt describing the video. Screened before payment — rejected prompts are never charged. Parameter directives (--flag) are not allowed."},"duration":{"type":"integer","minimum":4,"maximum":15,"default":5,"description":"Video length in seconds. Price scales linearly."},"resolution":{"type":"string","enum":["480p","720p","1080p"],"default":"720p","description":"Output resolution. Price scales with resolution."},"ratio":{"type":"string","enum":["16:9","4:3","1:1","3:4","9:16","21:9","adaptive"],"default":"adaptive","description":"Aspect ratio of the output video."},"seed":{"type":"integer","minimum":-1,"maximum":4294967295,"description":"Random seed; -1 = random."},"generate_audio":{"type":"boolean","default":false,"description":"Generate synced audio (×1.25 on the per-second rate)."},"camera_fixed":{"type":"boolean","description":"Lock the camera position."}},"required":["prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Payment settled — job accepted. Poll status_url until succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreated"}}}},"402":{"description":"Payment required — x402 v2 challenge (Payment-Required header + JSON body) with USDC payment requirements (exact scheme). Pay and retry; the quote is exact for your request."},"403":{"description":"Rejected before payment by validation or the content filter — never charged."},"429":{"description":"Per-IP rate limit exceeded. Retry later."},"503":{"description":"At service capacity — rejected BEFORE payment, never charged."}}}},"/generate/seedance-fast/custom":{"post":{"operationId":"generate_seedance_fast_custom","summary":"Seedance 2.0 Fast — parametric text-to-video: choose duration (4-15s), resolution (480p/720p), ratio, seed, audio. Price scales with duration × resolution.","description":"Seedance 2.0 Fast — parametric text-to-video: choose duration (4-15s), resolution (480p/720p), ratio, seed, audio. Price scales with duration × resolution.. The 402 quote is computed from YOUR params (formula: retail_usd_per_second[resolution] × duration × (generate_audio ? 1.25 : 1) + $0.00 fee, rounded up to the cent).","tags":["generation"],"security":[],"x-payment-info":{"protocols":[{"x402":{"version":2,"scheme":"exact","network":"eip155:8453","asset":"USDC"}}],"price":{"mode":"dynamic","currency":"USD","min":"0.26","max":"3.42"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","maxLength":2000,"description":"Text prompt describing the video. Screened before payment — rejected prompts are never charged. Parameter directives (--flag) are not allowed."},"duration":{"type":"integer","minimum":4,"maximum":15,"default":5,"description":"Video length in seconds. Price scales linearly."},"resolution":{"type":"string","enum":["480p","720p"],"default":"720p","description":"Output resolution. Price scales with resolution."},"ratio":{"type":"string","enum":["16:9","4:3","1:1","3:4","9:16","21:9","adaptive"],"default":"adaptive","description":"Aspect ratio of the output video."},"seed":{"type":"integer","minimum":-1,"maximum":4294967295,"description":"Random seed; -1 = random."},"generate_audio":{"type":"boolean","default":false,"description":"Generate synced audio (×1.25 on the per-second rate)."},"camera_fixed":{"type":"boolean","description":"Lock the camera position."}},"required":["prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Payment settled — job accepted. Poll status_url until succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreated"}}}},"402":{"description":"Payment required — x402 v2 challenge (Payment-Required header + JSON body) with USDC payment requirements (exact scheme). Pay and retry; the quote is exact for your request."},"403":{"description":"Rejected before payment by validation or the content filter — never charged."},"429":{"description":"Per-IP rate limit exceeded. Retry later."},"503":{"description":"At service capacity — rejected BEFORE payment, never charged."}}}},"/jobs/{id}":{"get":{"operationId":"get_job","summary":"Job status + result URL (free)","tags":["jobs"],"security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Job state. video_url appears when status is succeeded (expires ~24h).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"404":{"description":"Unknown job id."}}}},"/status":{"get":{"operationId":"get_status","summary":"Live reliability stats (free)","tags":["meta"],"security":[],"responses":{"200":{"description":"Success rate, p50 generation seconds, delivered count, in-flight jobs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/":{"get":{"operationId":"get_storefront","summary":"Machine-readable storefront: SKUs, live prices, limits (free)","tags":["meta"],"security":[],"responses":{"200":{"description":"Storefront JSON.","content":{"application/json":{}}}}}},"/llms.txt":{"get":{"operationId":"get_llms_txt","summary":"Agent-readable storefront (markdown, free)","tags":["meta"],"security":[],"responses":{"200":{"description":"llms.txt.","content":{"text/plain":{}}}}}}},"components":{"schemas":{"JobCreated":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"status_url":{"type":"string"},"note":{"type":"string"}},"required":["job_id","status","status_url"]},"Job":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"sku":{"type":"string"},"status":{"type":"string","enum":["pending_settlement","queued","generating","succeeded","failed","cancelled"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"attempts":{"type":"integer"},"video_url":{"type":["string","null"],"description":"Signed download URL; expires ~24h after completion."},"video_expires_at":{"type":["string","null"]},"seed":{"type":["integer","null"]},"frames_per_second":{"type":["number","null"]},"error":{"type":["object","null"]}},"required":["job_id","sku","status"]},"Status":{"type":"object","properties":{"service":{"type":"string"},"total_jobs":{"type":"integer"},"delivered":{"type":"integer"},"success_rate":{"type":["number","null"]},"p50_generation_seconds":{"type":["number","null"]},"in_flight":{"type":"integer"}}}}}}