# 500 Internal Server Error while trying with API

**URL:** <https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240>\
**Category:** Gemini API\
**Tags:** api, gemini\
**Created:** [August 27, 2025, 7:53am UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240 "2025-08-27T07:53:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andavar\_Alagarsamy](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/andavar_alagarsamy/32/62073_2.png) [@Andavar\_Alagarsamy](https://discuss.ai.google.dev/u/Andavar_Alagarsamy)\
**Post date:** [August 27, 2025, 7:53am UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/1 "2025-08-27T07:53:56Z")

</div>

Through browser model respond as expecte but in API its not getting below error,  
{  
“error”: {  
“code”: 500,  
“message”: “An internal error has occurred. Please retry or report in [Troubleshooting guide &nbsp;|&nbsp; Gemini API &nbsp;|&nbsp; Google AI for Developers](https://developers.generativeai.google/guide/troubleshooting)”,  
“status”: “INTERNAL”  
}  
}

---

<div class="post-metadata">

**Author:** ![Andavar\_Alagarsamy](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/andavar_alagarsamy/32/62073_2.png) [@Andavar\_Alagarsamy](https://discuss.ai.google.dev/u/Andavar_Alagarsamy)\
**Post date:** [August 27, 2025, 8:11am UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/3 "2025-08-27T08:11:51Z")

</div>

Switched to gemini-2.5-flash model

---

<div class="post-metadata">

**Author:** ![p\_g](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/p_g/32/31907_2.png) [@p\_g](https://discuss.ai.google.dev/u/p_g)\
**Post date:** [August 27, 2025, 9:00am UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/4 "2025-08-27T09:00:25Z")

</div>

That’s not a real solution. That’s like buying a Toyota Tacoma, but the engine won’t start, so you switch to a Toyota Camry instead. They’re not the same thing 🤦‍♂️. Sure, they both get you from Point A to Point B, but there’s a big difference in what they can carry and terrain they can traverse.

Same with 2.5-Flash vs 2.5-Pro. There’s a difference in their capabilities and sometimes you really need the 2.5-Pro model.

---

<div class="post-metadata">

**Author:** ![Andavar\_Alagarsamy](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/andavar_alagarsamy/32/62073_2.png) [@Andavar\_Alagarsamy](https://discuss.ai.google.dev/u/Andavar_Alagarsamy)\
**Post date:** [August 27, 2025, 9:41am UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/6 "2025-08-27T09:41:26Z")

</div>

Agreed. I am just testing the API its weird 2.5 Pro is not responding. I will leave it to team to figure out what happened.

---

<div class="post-metadata">

**Author:** ![Mohamed\_Amine](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/mohamed_amine/32/34632_2.png) [@Mohamed\_Amine](https://discuss.ai.google.dev/u/Mohamed_Amine)\
**Post date:** [August 27, 2025, 11:12am UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/8 "2025-08-27T11:12:33Z")

</div>

im having the same problem

---

<div class="post-metadata">

**Author:** ![Kristik](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/kristik/32/31603_2.png) [@Kristik](https://discuss.ai.google.dev/u/Kristik)\
**Post date:** [August 27, 2025, 11:42am UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/9 "2025-08-27T11:42:54Z")

</div>

Same problem. 80% of requests fail with this error.

---

<div class="post-metadata">

**Author:** ![chunduriv](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@chunduriv](https://discuss.ai.google.dev/u/chunduriv)\
**Post date:** [August 27, 2025, 7:20pm UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/11 "2025-08-27T19:20:58Z")

</div>

Hi @Kristik , @Mohamed_Amine @p_g @Andavar_Alagarsamy,

Are you still experiencing this issue? If so, please provide the details of your request, which will help us debug the issue further.

Thank you!

---

<div class="post-metadata">

**Author:** ![Mohamed\_Amine](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/mohamed_amine/32/34632_2.png) [@Mohamed\_Amine](https://discuss.ai.google.dev/u/Mohamed_Amine)\
**Post date:** [August 27, 2025, 9:54pm UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/12 "2025-08-27T21:54:25Z")

</div>

We dont receive fhe empty text response from the model anymore we get model overloaded

---

<div class="post-metadata">

**Author:** ![Kristik](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/kristik/32/31603_2.png) [@Kristik](https://discuss.ai.google.dev/u/Kristik)\
**Post date:** [August 28, 2025, 10:04am UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/14 "2025-08-28T10:04:52Z")

</div>

I am still experiencing this issue. I use gemini-2.5-pro in my python script and it worked fine, but last three days almost every API request ends up being Internal Error (500).  
My friends also work with this model and they are experiencing the same issue. Gemini-2.0-flash works, but i really need 2.5-pro for my project.

---

<div class="post-metadata">

**Author:** ![vtjballeng](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/vtjballeng/32/62228_2.png) [@vtjballeng](https://discuss.ai.google.dev/u/vtjballeng)\
**Post date:** [August 28, 2025, 10:45am UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/16 "2025-08-28T10:45:59Z")

</div>

Constant failure for me at this point. Gemini 2.5 Pro has been inconsistently working for the last week, often rendering errors or not responding to user input.

✕ [API Error: {“error”:{“message”:“{\n "error": {\n "code": 500,\n "message": "An internal error has occurred. Please retry or report in  
[https://developers.generativeai.google/guide/troubleshooting\](https://developers.generativeai.google/guide/troubleshooting%5C)”,\n "status": "INTERNAL"\n }\n}\n",“code”:500,“status”:“Internal Server Error”}}]

---

<div class="post-metadata">

**Author:** ![epdevelops](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/epdevelops/32/62253_2.png) [@epdevelops](https://discuss.ai.google.dev/u/epdevelops)\
**Post date:** [August 28, 2025, 1:18pm UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/18 "2025-08-28T13:18:11Z")

</div>

Same here, using Gemini CLI:

✕ [API Error: {“error”:{“message”:“{\n "error": {\n "code": 500,\n "message": "An internal error has occurred. Please retry  
or report in [https://developers.generativeai.google/guide/troubleshooting\](https://developers.generativeai.google/guide/troubleshooting%5C)”,\n "status": "INTERNAL"\n  
}\n}\n",“code”:500,“status”:“Internal Server Error”}}]

Model: Gemini 2.5 PRO

---

<div class="post-metadata">

**Author:** ![3.14](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/3.14/32/62252_2.png) [@3.14](https://discuss.ai.google.dev/u/3.14)\
**Post date:** [August 28, 2025, 3:28pm UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/20 "2025-08-28T15:28:33Z")

</div>

The 500 error occurs almost(in my case always) exclusively on “pro” requests, while “flash” requests and all operations in ai studio function correctly. I have confirmed that this issue is not related to the gemini api library version.

---

<div class="post-metadata">

**Author:** ![Joey\_Shurtleff](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/joey_shurtleff/32/62276_2.png) [@Joey\_Shurtleff](https://discuss.ai.google.dev/u/Joey_Shurtleff)\
**Post date:** [August 28, 2025, 6:06pm UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/21 "2025-08-28T18:06:55Z")

</div>

Same here (exclusively with gemini-2.5-pro)

---

<div class="post-metadata">

**Author:** ![philogicae](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/philogicae/32/31812_2.png) [@philogicae](https://discuss.ai.google.dev/u/philogicae)\
**Post date:** [August 28, 2025, 6:27pm UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/22 "2025-08-28T18:27:16Z")

</div>

Same issue on my side, impossible to make a request to pro (no issue on all the other models).  
Account on tier 1, but still with some free credits (expiring in 2 months)

---

<div class="post-metadata">

**Author:** ![chunduriv](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@chunduriv](https://discuss.ai.google.dev/u/chunduriv)\
**Post date:** [August 28, 2025, 7:00pm UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/23 "2025-08-28T19:00:59Z")

</div>

Hi All,

I was unable to reproduce the issue on my end. Could you please provide the exact API call, including both payload and parameters that consistently generates the 500 error? This information would be invaluable in further debugging the issue.

Thank you!

---

<div class="post-metadata">

**Author:** ![Michael\_M](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/michael_m/32/32527_2.png) [@Michael\_M](https://discuss.ai.google.dev/u/Michael_M)\
**Post date:** [August 28, 2025, 7:12pm UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/24 "2025-08-28T19:12:15Z")

</div>

This error is in the Pro model

Gemini AI: {“error”:{“message”:“{\n "error": {\n "code": 500,\n "message": "An internal error has occurred. Please retry or report in [https://developers.generativeai.google/guide/troubleshooting\](https://developers.generativeai.google/guide/troubleshooting%5C)”,\n "status": "INTERNAL"\n }\n}\n",“code”:500,“status”:“Internal Server Error”}}

---

<div class="post-metadata">

**Author:** ![Mio1](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/mio1/32/31947_2.png) [@Mio1](https://discuss.ai.google.dev/u/Mio1)\
**Post date:** [August 28, 2025, 7:42pm UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/25 "2025-08-28T19:42:54Z")

</div>

It’s highly unprofessional. These errors have been going on for several days and weeks. It would be one thing to have a warning or some update about it, but we’re kept into the dark. And it’s not even the free tier, but even the paid ones who are being affected as well. With the number of people reporting it, you’d think they would at least say something, but no, we’re treated as if we are not the ones contributing to the api with our requests.

---

<div class="post-metadata">

**Author:** ![s0nai](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/s0nai/32/32327_2.png) [@s0nai](https://discuss.ai.google.dev/u/s0nai)\
**Post date:** [August 28, 2025, 7:54pm UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/26 "2025-08-28T19:54:17Z")

</div>

At this point, they’re still saying they couldn’t reproduce the issue, so perhaps they still haven’t escalated it to the development team even after several weeks?

---

<div class="post-metadata">

**Author:** ![EBS](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/ebs/32/33069_2.png) [@EBS](https://discuss.ai.google.dev/u/EBS)\
**Post date:** [August 28, 2025, 8:23pm UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/27 "2025-08-28T20:23:43Z")

</div>

It’s a real shame that we’ve had the same problems for weeks and nobody cares.

---

<div class="post-metadata">

**Author:** ![Leandro\_Ribeiro\_de\_C](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/leandro_ribeiro_de_c/32/62291_2.png) [@Leandro\_Ribeiro\_de\_C](https://discuss.ai.google.dev/u/Leandro_Ribeiro_de_C)\
**Post date:** [August 28, 2025, 8:50pm UTC](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240/28 "2025-08-28T20:50:43Z")

</div>

gemini-2.5-pro, free Tier

I’m getting the same error: '500, ‘message’: ‘An internal error has occurred.’

It started about a week ago, and now I’m only getting this type of error response. On the first request.

At first, I was getting a lot of ‘429 too many requests’ errors, then it progressed to errors like ‘The Model is Overloaded,’ and now this 500 error.

[Next page](https://discuss.ai.google.dev/t/500-internal-server-error-while-trying-with-api/100240.md?page=2)
