sboxm
(Jhon)
March 16, 2026, 6:59am
1
Problem
When I used Vercel AI Gateway today, the interface returned a 403 response to me.
What I’ve Tried
Deleted and rebound the payment method
Created a new API key
The problem was not resolved.
Error:
{
"error": {
"message": "Forbidden.",
"type": "access_denied"
}
}
My Team ID is team_F4sCK9QW4pjPtrCkfaUbtMJE
It’s almost always “this request isn’t allowed to use AI Gateway”, not “your model provider key is wrong”. Since you already tried new payment method + new API key, the most likely buckets are wrong credential/scope, feature/plan/enablement, or an account/network restriction.
Please run request that prints response headers so that you can grab req ID.
curl -i “$AI_GATEWAY_BASE_URL/v1/models”
-H “Authorization: Bearer $AI_GATEWAY_KEY”
Then paste the response headers so I can tell you something.
sboxm
(Jhon)
March 16, 2026, 8:41am
6
Thanks for the guidance. I ran the curl command and captured the output.
Request ID: sin1::fra1::px78m-1773649643335-8826b1d38a61
Response Headers:
Date: Mon, 16 Mar 2026 08:27:23 GMT
Server: Vercel
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
Vary: rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch
X-Matched-Path: /v1/models
X-Vercel-Cache: BYPASS
X-Vercel-Id: sin1::fra1::px78m-1773649643335-8826b1d38a61
Transfer-Encoding: chunked
Good, those headers suggest your curl request didn’t hit the AI gateway API, but instead hit a next.js app/route on vercel. I think that usually happens when the base url is wrong.
so please go to vercel dashboard, AI/Gateway and copy the Gateway Base URL.
Then run this command again.
curl -i “https://<GATEWAY_BASE_HOST>/v1/models”
-H “Authorization: Bearer <YOUR_AI_GATEWAY_KEY>”
sboxm
(Jhon)
March 16, 2026, 9:49am
8
Here are the full request/response details as requested:
Request:
POST https://ai-gateway.vercel.sh/v1/chat/completions
Request Headers:
Authorization: Bearer <MY_AI_GATEWAY_KEY>
Content-Type: application/json
Accept: /
Accept-Encoding: gzip, deflate, br
User-Agent: PostmanRuntime-ApipostRuntime/1.1.0
Connection: keep-alive
Cache-Control: no-cache
Host: ai-gateway.vercel.sh
Content-Length: 136
Response Headers:
Cache-Control: public, max-age=0, must-revalidate
Content-Encoding: br
Content-Type: application/json
Date: Mon, 16 Mar 2026 09:41:18 GMT
Server: Vercel
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
Vary: rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch
X-Matched-Path: /v1/chat/completions
X-Vercel-Cache: MISS
X-Vercel-Id: sin1::fra1::mr2nm-1773654078302-80a62b52517d
Transfer-Encoding: chunked
Response Body:
{
“error”: {
“message”: “Forbidden.”,
“type”: “access_denied”
}
}
The response still shows Next.js headers (Vary: rsc, X-Matched-Path) and returns 403 Forbidden.
anshumanb
(Anshuman Bhardwaj)
March 16, 2026, 10:23am
9
Hi @sboxm , welcome to the Vercel Community!
Sorry that you’re facing this issue. I’ve found the issue with your account and fixing it. It might take a few hours but I’ll keep you posted here.
anshumanb
(Anshuman Bhardwaj)
March 16, 2026, 12:36pm
11
Hi @sboxm , I’ve patched this for you. Can you give it a try and confirm the fix?
sboxm
(Jhon)
March 16, 2026, 1:25pm
13
Hi, I just tested it and can confirm the fix works. The API is now responding correctly.
Thanks for the quick patch!
1 Like