问题
Image-to-video upload via /v1/videos with input_reference fails with 403 from Cloudflare WAF on POST /rest/app-chat/upload-file.
curl_cffi sends base64 image as JSON payload. Cloudflare blocks large payloads (>5KB) but allows small ones (<5KB). This means the TLS fingerprint passes for small requests but triggers WAF rules for large POST bodies.
Test results from inside the container (same token, same headers, same session):
- 444 bytes payload → 400 (CF passed, Grok: "image too small") ✅
- 2,900 bytes payload (compressed 200x200 JPEG) → 200 (upload OK, video generated) ✅
- 259,652 bytes payload (original 752x1360 JPEG) → 403 "Just a moment..." ❌
Tested with clearance_mode=none, clearance_mode=flaresolverr, and WARP proxy — same result. cf_clearance is valid (verified by successful small upload).
Text-to-video works fine. Only image-to-video fails because of the upload step.
Question: Is there a recommended way to handle this? Would auto-compressing images before upload be acceptable?
上下文(配置 / 日志)
Log:
asset upload request failed: status=403 body=<!DOCTYPE html><html lang="en-US"><head><title>Just a moment...</title>
问题
Image-to-video upload via /v1/videos with input_reference fails with 403 from Cloudflare WAF on POST /rest/app-chat/upload-file.
curl_cffi sends base64 image as JSON payload. Cloudflare blocks large payloads (>5KB) but allows small ones (<5KB). This means the TLS fingerprint passes for small requests but triggers WAF rules for large POST bodies.
Test results from inside the container (same token, same headers, same session):
Tested with clearance_mode=none, clearance_mode=flaresolverr, and WARP proxy — same result. cf_clearance is valid (verified by successful small upload).
Text-to-video works fine. Only image-to-video fails because of the upload step.
Question: Is there a recommended way to handle this? Would auto-compressing images before upload be acceptable?
上下文(配置 / 日志)