API access failed (showing cloudflare block page)

I’m also using Vercel edge functions and OpenAI blocked one of the regions. not sure how to solve this.

looking at the logs, hkg1 is the culprit so i disabled it:

export const config = {
    runtime: 'edge',
    // https://vercel.com/docs/edge-network/regions#region-list
    regions: [
        'arn1',
        'bom1',
        'cdg1',
        'cle1',
        'cpt1',
        'dub1',
        'fra1',
        'gru1',
        // 'hkg1', ip blocked by openai
        'hnd1',
        'iad1',
        'icn1',
        'kix1',
        'lhr1',
        'pdx1',
        'sfo1',
        'sin1',
        'syd1',
    ],
};
5 Likes

Super useful community information, thank you for sharing.

Thanks you for sharing.
Despite not being a supported country, Hong Kong was working until today. It seems it’s now been blocked via Cloudflare. Sad times.
AFAIK, Azure allows access from Hong Kong, so we could take our business there.

Alternatively, runpod has a much cheaper llama endpoint template, if you can rewrite for compatibility, or insert something in the chain to correct its format to OpenAPI format. Please let me know if you manage to do that.

My server is in Russia and today I also started getting an error when making a request to openai. Too bad…

7 Likes

Same Error even the support team don’t know how to solve this issue.

I had this exact same problem happen to me twice yesterday. I was on a public wifi at a library in the USA.

Luckily the library had a separate WiFi and as soon as I switched to that I was back up and running.

I know this workaround won’t work for some of the edge configurations described in this thread. But it should work if your WiFi’s IP is blocked.

Maybe security feature on the server. What platform are you using the host your data?

The same problem, anyone have solutions?

same problem. All my api and services for openai just return html page with error:

Sorry, you have been blocked

You are unable to access api.openai.com

1 Like

Experiencing the same thing here, on Vercel edge function and got CloudFlare error message with Assistant API.
I wonder would this be OpenAI’s mitigation to the DDoS attack recently.

Hi, do you know how to modify Cloudflare worker to disable hkg and cn region and make it work? Thanks so much.

Thanks i’ve had the same problem with OpenIndexAI hosted on fly dot io. We also had an asian server in HK, working to move region.

Having the same problem with the code compiled from bun to nodejs, but if I run the uncompiled script from bun it works. I wonder if bun sends its own special UserAgent header or something and thats why CloudFlare doesn’t block the request.

Такая же фигня, бро. Один апи полностью отрубился, другой сайт еще работает. Перестал работать после генерации Dalle 3 HD. Едем в америку?)))

1 Like

The Russian IP address was blocked. As an option, I plan to take hosting in Germany, which is on the list of allowed countries. Question about the .ru domain - should I change it to .com or is this not critical and a German IP address will be enough?

It seems like it is okay now, as I just tried to make an API call with my OpenAI API from the HK site, and it is working without any issues today.

1 Like