Gemini Deep Research Agent API error

"I am currently testing the Gemini Deep Research Agent API. I encountered the following error while running the sample code provided on the API website. Could you explain the cause?

-–error log--------------------------------------------------------------------------------------------------------------------

PS D:\gemini> python .\interactions_api_test.py

D:\gemini\interactions_api_test.py:167: UserWarning: Interactions usage is experimental and may change in future versions.

interaction = client.interactions.create(

Traceback (most recent call last):

File “D:\gemini\interactions_api_test.py”, line 234, in

deep_research3()

File “D:\gemini\interactions_api_test.py”, line 167, in deep_research3

interaction = client.interactions.create(

              ^^^^^^^^^^^^^^^^^^^^^^^^^^^

File “C:\Python\Python312\Lib\site-packages\google\genai\_interactions\_utils\_utils.py”, line 298, in wrapper

return func(\*args, \*\*kwargs)

       ^^^^^^^^^^^^^^^^^^^^^

File “C:\Python\Python312\Lib\site-packages\google\genai\_interactions\resources\interactions.py”, line 416, in create

return self.\_post(

       ^^^^^^^^^^^

File “C:\Python\Python312\Lib\site-packages\google\genai\_interactions\_base_client.py”, line 1301, in post

return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))

                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File “C:\Python\Python312\Lib\site-packages\google\genai\_interactions\_base_client.py”, line 1088, in request

raise self.\_make_status_error_from_response(err.response) from None

google.genai._interactions.BadRequestError: Error code: 400 - {‘error’: {‘message’: ‘There was a problem processing your request. You will not be charged.’, ‘code’: ‘invalid_request’}}

5 Likes

I get the same result using the curl sample from the docs:

curl -X POST "https://generativelanguage.googleapis.com/v1alpha/interactions" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-d '{
    "input": "Research the history of Google TPUs.",
    "agent": "deep-research-pro-preview-12-2025",
    "background": true
}'

{"error":{"message":"There was a problem processing your request. You will not be charged.","code":"invalid_request"}}% 
2 Likes

Same here! If someone could get back to us on this that would be great!

I have the same problem. If someone solves it, I will be very happy.)

It looks like the api has come to life.

2 Likes

@Taeyoung_Kim1 I tried to reproduce this using the example Python code. It ran fine. If you keep getting the error, my best advice is to update your SDK client.

@amine-3shake I tried the latest rest example code. That also worked fine, but note it now has /v1beta/, whereas your code has /v1alpha/.