Vercel AI Gateway returns 403 Forbidden access_denied error

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.

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>”

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.

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.

Hi @sboxm, I’ve patched this for you. Can you give it a try and confirm the fix?

Hi, I just tested it and can confirm the fix works. The API is now responding correctly.

Thanks for the quick patch!

1 Like