Skip to content
AI Infrastructure

The AI API Is 12ms Away. The Answer Is 325.

In August I measured the AI APIs answering a handshake from Kathmandu in under 35ms and called it evidence that edge infrastructure reaches Nepal. It does. This is what I missed: on the same hostname, one path answers in 8.6ms and another takes 338.8.

Published · How this was researched

← Back to Global Tech Search

Market Horizon

Point-in-time measurement, Sep 2 2026 — one vantage point, network conditions change

Target Sector

Network Infrastructure, Nepal Developer Experience, AI API Architecture

AI API edge path

10 ms

After TLS, median

AI API origin path

325 ms

Same hostname, 32x further

N. Virginia, for scale

290 ms

Measured from this line

Credentials required

None

A rejected request travels too

In August I measured how far Kathmandu is from the cloud and found something that felt like good news: the three major AI APIs answered a TCP handshake in 12.6 to 34.2 milliseconds, while AWS Mumbai took 50.3 ms and N. Virginia took 323.2. I wrote that CDN edge infrastructure reaches Nepal even though no hyperscale data centre does.

That was true. It was also a doorway being mistaken for a room.

TLS terminates at the nearest point of presence. Nothing is inferred there — no GPU, no model weights, no tokens. I had measured how long it takes to knock. This is what happens after the door opens.

The trick that makes it measurable

curl reports each phase boundary of a request, so you can subtract:

postTls = time_starttransfer − time_appconnect

That is everything which happened after the encrypted session was already up — the round trip to whatever composed the response, plus that thing's own processing. A response written at the edge pays almost nothing. A response carried somewhere else pays the journey.

The useful part is that this needs no API key. A rejected request gets carried exactly as far as an accepted one. Nothing here authenticates; no request body contains anything but a dummy model name; every response is a 401, 403 or 404. Anyone with curl can reproduce it.

The measurement

Eleven targets, twelve reps, probed round-robin rather than one target at a time — on a residential line in Kathmandu, a blocked design would hand whichever target ran during a congestion episode the entire cost of it. Medians, because network latency is heavy-tailed and a mean chases the outlier.

ProbeCodeTCPTLSTTFBpostTLS
api.anthropic.com/40410.925.335.38.6
api.anthropic.com/zzz-nonexistent4049.923.2279.1254.9
api.anthropic.com/v1/messages40112.927.6364.8338.8
api.openai.com/42112.228.139.311.4
api.openai.com/zzz-nonexistent40411.124.9334.4310.6
api.openai.com/v1/chat/completions40112.529.0382.8351.2
generativelanguage.googleapis.com/40427.959.7464.5409.7
…/v1beta/models/none:generateContent40327.058.4481.0426.5
REF Cloudflare /cdn-cgi/trace20012.328.940.010.9
REF S3 Mumbai30744.889.7131.242.1
REF S3 N. Virginia307290.0588.9913.5290.4

Read the first three rows together. Same hostname. Same point of presence. Same TLS session cost, 23–28 ms in all three. One path answers 8.6 ms after the handshake completes. Another takes 338.8.

The host is eleven milliseconds away. The answer is three hundred and twenty-five.

Why it isn't just a distant server

Two objections could explain this away, and both are testable.

"The host is simply far." It is not, and the handshake proves it: TCP connect is 10.9 ms to Anthropic, 12.2 to OpenAI, 27.4 to Google. The machine terminating the connection is a few milliseconds away in every case. Whatever is slow, it is not the distance to the front door.

"The 401 is padded on purpose." Rate limiting and anti-brute-force delays are real, and an authenticated endpoint is exactly where you would expect them. So the run also probes /zzz-nonexistent — an unauthenticated 404 for a path that does not exist, which has no reason to be deliberately slowed.

It costs 254.9 ms on Anthropic against 338.8 for the 401, and 310.6 against 351.2 on OpenAI. Ratios of 0.75 and 0.88: the same tier. A nonsense URL travels just as far as a real one.

What 325 milliseconds means here

A figure in milliseconds means nothing without something to compare it to, so the run carries two references measured from this same connection in August.

  • Composed at the edge: 10.9 ms.
  • AWS Mumbai, a real region measured at 50.3 ms away: 42.1 ms.
  • AWS N. Virginia, measured at 323.2 ms away: 290.4 ms.

The AI API origin paths sit at roughly 325 ms — past Mumbai, past Singapore, past Tokyo, past Ireland, and squarely in the company of the North American regions.

I want to be careful here, because this is the point where a measurement gets oversold. postTls is backhaul plus whatever the origin spends composing the response. The two cannot be separated by this design, so 325 ms is an upper bound on distance and not a location. What I can say is that the figure is indistinguishable from this line's measured round trip to North America, and nowhere near its round trip to the nearest region that could plausibly host the service. Consistent with an origin on the other side of the planet. Not proof of one.

Google is a different shape

Google could not be put in the headline ratio, and the reason is interesting enough to keep.

Its handshake is fast — 27.4 ms, so the host is near. But nothing on that host appears to be composed locally: even a 404 on / costs 409.7 ms, essentially the same as the API path's 426.5. There is no fast arm to compare against because there is no fast path.

Anthropic and OpenAI terminate TLS at an edge that can also answer — it owns a 404 and returns it immediately. Google's terminates TLS and forwards everything. Two architectures, both reasonable, and the measurement can only compute a ratio for the first kind.

The analyser handles this by excluding that host from the ratio and printing why, rather than vetoing the whole run. A per-host exclusion is a finding. A broken vantage point would not be.

What this changes

For anyone building on a frontier API from South Asia, the practical content is small and worth knowing: roughly a third of a second is spent before the model has produced a single token, and no amount of edge presence removes it. It is not the provider's latency and it is not your code. It is the distance between the PoP that greeted you and the compute that serves you.

It also sharpens what the August post got right. Edge infrastructure genuinely does reach Kathmandu — the handshake numbers were real and they still are. What reaches Kathmandu is the front of these services. The hydropower-and-data-centre argument that Nepal is well positioned for AI infrastructure is not weakened by this; if anything it is the clearest statement of the gap. A country can be twelve milliseconds from the doorway and a third of a second from the room.

Limits

One vantage point, one residential line, one afternoon. Twelve interleaved reps make the tiers stable; they do not make the absolute numbers a permanent property of the internet.

The authenticated path is not measured. A real, billable, streaming inference request may route differently from a rejected one, and nothing here excludes that — it is the obvious next measurement and it needs credentials this run deliberately does without.

No provider is being graded. A far origin is an architecture, not a defect, and every number here is an upper bound on a distance rather than a claim about where any machine sits.

The harness, the analyser, the three controls and all 132 probes are in the repository. Three minutes and no credentials will tell you what the internet looks like from where you are.

✓ Advantages

  • • The controlling comparison is two paths on one hostname, so the same PoP and the same TLS session serve both arms and host distance is excluded by construction rather than by argument
  • • The confound that would explain the result away — a deliberately padded 401 — is tested with an unauthenticated 404 for a path that does not exist, which has no reason to be padded and costs the same
  • • Needs no API key, no account and no payment: a rejected request is carried just as far as an accepted one, so the measurement is reproducible by anyone with curl
  • • Two calibration references at known distances, both measured from this same connection in August, turn a millisecond figure into something interpretable

× Challenges

  • • postTls is backhaul plus origin processing and cannot separate them, so every figure here is an upper bound on distance and never a location
  • • The authenticated inference path is not measured. A real billable request may route differently from a rejected one, and nothing here excludes that
  • • One vantage point on one residential line in Kathmandu, on one afternoon. The tiers are stable across twelve interleaved reps; the absolute numbers are not a permanent property of the internet
  • • Google could not be included in the headline ratio — nothing on that host appears to be composed at the edge, so it has no fast arm to compare against
Abhishek Kushwaha

Written by Abhishek Kushwaha

Full-stack software engineer in Kathmandu, Nepal — six years shipping production Django and Next.js systems, most recently at Pinakin Technologies & Research Center. Writes Global Tech Search on what the AI buildout costs in power, water and silicon, measuring it first-hand where he can. More about the author →