AIcv

← Blog

OpenAI and Claude in Hong Kong: what the 403 really means

· Updated · AIcv Team · Tags: #openai #claude #hong-kong #openrouter #troubleshooting

You picked OpenAI or Anthropic Claude in AIcv, pasted a valid API key, and got a 403. The key is probably fine. The request never reached the part of the API that checks keys.

The two errors look different, but they mean the same thing:

  • OpenAI returns 403 with "code": "unsupported_country_region_territory".
  • Anthropic returns 403 with "type": "forbidden" and "message": "Request not allowed".

Both providers decide whether to serve a request based on where it comes from. Hong Kong is not on their supported list. That is a provider policy decision, not a bug in AIcv and not something an API key can change.

CORS and region blocks are two different problems

A browser will not let a web page call most AI APIs directly unless the API sends the right CORS headers. OpenAI and Anthropic do not, so AIcv forwards those two providers through a small relay at /api/proxy.

That relay solves CORS. It does not change your region.

A relay is still a request from a computer somewhere. If that computer is in Hong Kong, OpenAI and Anthropic see Hong Kong and refuse it. Cloudflare runs a Pages Function in the nearest data centre, so a visitor in Hong Kong is normally served from Hong Kong. Putting the same relay on a different hostname does not move it.

This is why a new relay URL does not fix the 403. It only fixes the browser's CORS check, which was already working.

What actually works

Use OpenRouter. It is AIcv's default for a reason: it allows browser requests, it has a free tier with rotating models, and it exposes OpenAI and Anthropic models through one OpenAI-compatible API. If you want GPT or Claude output from Hong Kong, OpenRouter is the practical route.

Use Gemini, xAI or DeepSeek directly. All three answer browser requests, so AIcv calls them without a relay. They also have their own free or trial tiers.

Use a relay outside the blocked region, if you control one. A small VPS or Worker in Singapore, the United States or Japan can make the request from a supported location. This is technically possible, but it is still your responsibility to follow the provider's terms, and you are now running a proxy that sees your API key. Do not paste your key into a random public relay.

Do not use a free public proxy. A relay that forwards your Authorization header can read your key. If a proxy is advertised as a way around a region block, assume it is also a way to collect keys.

Switching to OpenRouter in AIcv

1. Open Settings → AI Provider.

2. Choose OpenRouter — free models (default).

3. Paste an OpenRouter key. If you do not have one, the API key guide walks through the free signup.

4. Click Test connection. A working key returns OK with a response time.

5. Pick a model from the list, or keep the recommended free alias.

Your CV, the job description and the generated documents stay in your browser. The request goes from your browser to OpenRouter with your key, the same way it would go to any other provider.

Why the model list can change

OpenRouter's free models rotate. A model that is free today can be retired or repriced tomorrow. That is why AIcv recommends the openrouter/free alias instead of hard-coding a model name: the alias points at a currently available free model, so the default keeps working when the catalogue changes.

Paid OpenRouter models are also available if you add credit. The provider dropdown does not care which one you use.

A note on "it works on my machine"

If OpenAI or Anthropic works for you today, you are probably in a supported region, or your network exits through one. That can change when you travel or switch networks. AIcv does not try to guess your location or hide the provider's response. If the provider refuses the request, the error names the host and shows what the provider said, so you can tell a region block apart from a bad key or a broken relay.

For the relay itself — what it forwards, what it stores, and how to run your own — see Why an AI app needs a relay. For the full provider setup, see How to get an AI API key for free.

The AIcv app has no analytics and no third-party tracking scripts. Your CV and job descriptions never leave your browser except in the request you send to the provider you chose.

Frequently asked questions

Why do I get a 403 from OpenAI or Anthropic?

The provider is refusing the request because of where it originates, not because your key is broken. The error in AIcv names the host and repeats what the provider said — for example unsupported_country_region_territory from OpenAI — so you can tell a region block apart from a bad key or a dead relay.

Does the AIcv relay bypass the region block?

No. The relay only fixes the browser's CORS check; it does not change where the request leaves from. A relay running in Hong Kong gets the same 403, because the provider still sees a Hong Kong source.

Which provider works in Hong Kong?

OpenRouter, Gemini, xAI and DeepSeek allow browser requests and are not blocked the same way. OpenRouter's openrouter/free alias is the quickest free starting point — see how to get an API key for the signup steps.

How do I switch to OpenRouter in AIcv?

Open Settings, choose OpenRouter as the provider, paste your key, then press Test connection. Your profiles, seed CV and application records stay exactly where they are — only the model that generates the next draft changes.