Quick Answer
All images and videos generated by API易 (Veo 3.1, Sora, Nano Banana, etc.) are hosted on Cloudflare R2’s global CDN, which is fast worldwide by design. If downloads on your server are slow, it is almost always a network-path issue between your server and Cloudflare’s edge, not a CDN problem itself — especially for servers in mainland China accessing overseas CDNs, where cross-border bandwidth, ISP routing, and local DNS resolution often degrade performance.Key pointCloudflare R2 resource URLs typically look like
*.r2.cloudflarestorage.com or a custom domain proxied through Cloudflare. Download speed depends on how efficiently your server can reach the nearest Cloudflare edge node.Common Causes
Cross-border congestion
Servers in mainland China reaching overseas CDNs often hit congestion on international egress during peak hours, causing slowness or timeouts.
Suboptimal ISP routing
Some cloud providers route international traffic through the US West or Europe, adding tens of milliseconds of unnecessary latency.
Poor DNS resolution
Local DNS may resolve Cloudflare hostnames to a distant edge (e.g., US West) instead of the nearest APAC node.
Firewall / security group limits
Some servers restrict outbound traffic to overseas IP ranges, port 443, or specific CDN domains, degrading connection quality.
HTTP/2 & connection reuse
Clients without HTTP/2 or connection reuse pay the TCP/TLS handshake cost for every file.
Single-threaded download
Serial single-threaded downloads can’t benefit from CDN multiplexing; throughput stays low.
Troubleshooting Steps
Is it one server or everywhere?
Try downloading the same CDN URL from your laptop or another server.
- Laptop fast, server slow → server network path issue
- Slow everywhere → contact support with the specific URL
Test basic network to the CDN
Use Packet loss, latency above 200ms, or routes bouncing overseas all indicate link-level problems.
ping, mtr, traceroute to inspect latency and packet loss:Measure real download speed
Use Focus on:
curl to inspect timing and throughput:time_namelookup: DNS resolution timetime_connect: TCP connect timetime_starttransfer: Time to first byte (TTFB)speed_download: Average throughput (bytes/sec)
Inspect DNS resolution
Solutions
Option 1: Switch to a public DNS (easiest)
Default DNS on many servers resolves Cloudflare to distant nodes. Try these public DNS servers:Option 2: Optimize how you download
Parallel downloads
For batches of files use a parallel downloader (
aria2c -x 8, Python asyncio + httpx) to saturate bandwidth.Resumable downloads
For large videos, use HTTP Range requests with retry so a failure doesn’t restart from zero.
Connection reuse
Use clients with HTTP/2 or keep-alive (
httpx, requests.Session()) to avoid repeated handshakes.Stream to disk
Stream the response directly to disk instead of loading the whole file into memory.
Option 3: Move to a better-connected region
If your use case allows it, prefer regions with good connectivity to Cloudflare:Overseas (recommended)
AWS / GCP / Azure / Cloudflare Workers all reach Cloudflare R2 with very low latency (typically 10-50ms).
China: premium DCs
If you must deploy in mainland China, pick DCs with triple-network BGP + premium international links (CN2 GIA, CMI, AS9929).
Hong Kong / Singapore
A good compromise: low latency to mainland China (30-80ms) and excellent APAC Cloudflare connectivity.
Avoid cheap VPS
Budget hosts often have severely congested international egress and can drop to a few dozen KB/s at peak hours. Not recommended for CDN-heavy workloads.
Option 4: Relay through another host (last resort)
If your server really can’t reach Cloudflare quickly and you can’t change regions:- Use an overseas server as a relay: download to an overseas box first, then transfer back via a private/premium link
- Relay via your own object storage: mirror the asset into your own OSS / COS / S3 (e.g., a China-region bucket), and serve from there
- Pre-warm and cache: download once from your backend and serve subsequent requests from a local cache
Common Questions
Why is my laptop fast but my server slow?
Why is my laptop fast but my server slow?
Home broadband often has optimized international routes via your ISP, while cloud servers go through the datacenter’s international egress — quality can vary dramatically. Check your DC’s international bandwidth first and follow the troubleshooting steps above.
I changed DNS but it's still slow — why?
I changed DNS but it's still slow — why?
DNS only affects which CDN edge you resolve to. If the underlying international bandwidth is already congested, DNS changes alone won’t help. Consider changing regions or relaying through an overseas host.
Is Cloudflare R2 blocked in mainland China?
Is Cloudflare R2 blocked in mainland China?
Cloudflare is not blocked in mainland China, but international egress can get congested at peak hours and some ISPs take suboptimal routes, so access quality is inconsistent. This is a general cross-border networking issue, not an R2-specific problem.
Video downloads keep failing — what can I do?
Video downloads keep failing — what can I do?
Use a downloader that supports resume, like
aria2c or wget -c, with reasonable timeouts and retries:Can API易 return Base64 instead of a CDN URL?
Can API易 return Base64 instead of a CDN URL?
Videos are large (tens to hundreds of MB), and Base64 adds about 33% overhead with no resume support — it’s actually slower and wastes bandwidth. We do not recommend Base64 for large files. Some image endpoints support Base64 responses; see the relevant API docs.
How do I confirm the bottleneck is my network, not the CDN?
How do I confirm the bottleneck is my network, not the CDN?
Run the same
curl test from an overseas host (AWS Tokyo, Singapore, etc.). If it’s fast there but slow on your server, the bottleneck is between your server and Cloudflare — not the CDN itself.Related Docs
Network Proxy Configuration
Proxy options when international connectivity is unstable
Where are API易 Servers?
Learn about API易 server locations and latency
Veo Video Generation API
Output format and URL validity for the video API
Contact Support
If nothing helps, our team will assist you
Info to share with supportWhen contacting us, please include:
- The specific CDN URL (sensitive params can be masked)
- Your server region / DC / cloud provider
- Full
mtrortracerouteoutput - Output of the
curltiming command above - The time window when the issue occurred (helps correlate with cross-border link monitoring)