# Google Studio Api Key problem 

**URL:** <https://forum.weaviate.io/t/google-studio-api-key-problem/21991>\
**Category:** Support\
**Created:** [September 23, 2025, 6:24pm UTC](https://forum.weaviate.io/t/google-studio-api-key-problem/21991 "2025-09-23T18:24:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zakaryae\_Bennani](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/zakaryae_bennani/32/7666_2.png) [@Zakaryae\_Bennani](https://forum.weaviate.io/u/Zakaryae_Bennani)\
**Post date:** [September 23, 2025, 6:24pm UTC](https://forum.weaviate.io/t/google-studio-api-key-problem/21991/1 "2025-09-23T18:24:06Z")

</div>

Tried with this setup  
import weaviate

from weaviate.classes.init import Auth

import os

jinaai\_key = os.getenv(“JINAAI\_APIKEY”)

studio\_key = os.getenv(“GOOGLE\_APIKEY”)

weaviate\_url = os.getenv(“WEAVIATE\_URL”)

weaviate\_key = os.getenv(“WEAVIATE\_API\_KEY”)

headers = {

```
"X-Goog-Studio-Api-Key": studio_key,

"X-JinaAI-Api-Key": jinaai_key,

```

}

client = weaviate.connect\_to\_weaviate\_cloud(

```
cluster_url=weaviate_url,

auth_credentials=Auth.api_key(weaviate_key),

headers=headers

```

)

print(client.is\_ready())  
And got a problem while inserting :  
{‘message’: ‘Failed to send all objects in a batch of 7’, ‘error’: “WeaviateInsertManyAllFailedError(‘Every object failed during insertion. Here is the set of all errors: Google API Key: no api key found neither in request header: X-Palm-Api-Key or X-Goog-Api-Key or X-Goog-Vertex-Api-Key or X-Goog-Studio-Api-Key nor in environment variable under PALM\_APIKEY or GOOGLE\_APIKEY’)”}  
what should I do ?

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [September 24, 2025, 6:22am UTC](https://forum.weaviate.io/t/google-studio-api-key-problem/21991/2 "2025-09-24T06:22:23Z")

</div>

Good morning @Zakaryae_Bennani,

Welcome to our community, it’s lovely to have you here with us.

Could you please let me know which version of Weaviate DB you’re using?

Additionally, could you share your vectorizer settings for the collection?

Best regards,

Mohamed Shahin  
Weaviate Support Engineer  
(Ireland, UTC±00:00/+01:00)

---

<div class="post-metadata">

**Author:** ![Zakaryae\_Bennani](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/zakaryae_bennani/32/7666_2.png) [@Zakaryae\_Bennani](https://forum.weaviate.io/u/Zakaryae_Bennani)\
**Post date:** [September 24, 2025, 9:04am UTC](https://forum.weaviate.io/t/google-studio-api-key-problem/21991/3 "2025-09-24T09:04:43Z")

</div>

Good morning @Shahin ,

Thank you for your reply and your kind welcome, my Weaviate version is 1.32.9.

Besides, here you are my vectorizer settings:

```python
vector_config = [

    Configure.Vectors.text2vec_google(

                name="vector", 

                source_properties=['formatted_page'],

                vectorize_collection_name = False,

                model="text-multilingual-embedding-002",

                project_id=os.getenv("GOOGLE_CLOUD_PROJECT"),

                vector_index_config=Configure.VectorIndex.hnsw(),

                )

            ]
# While creating the collection:
    collection = client.collections.create(

            name='cri_collection',

            vector_config=vector_config,
            
            #the rest of the conf.........

)

```

Best regards,

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [September 24, 2025, 10:12am UTC](https://forum.weaviate.io/t/google-studio-api-key-problem/21991/4 "2025-09-24T10:12:23Z")

</div>

I’ve tested this using the exact same setup as yours with my Google API key, and it works fine on my side.

Could you try checking whether your headers are actually being passed by printing them out with:

```auto
from weaviate.classes.init import Auth
import os, weaviate

studio_key = "<My_TEST_Data>"
weaviate_url = "<My_TEST_Data>"
weaviate_key = "<My_TEST_Data>"

headers = {
    "X-Goog-Studio-Api-Key": studio_key,
}

client = weaviate.connect_to_weaviate_cloud(
    cluster_url=weaviate_url,
    auth_credentials=Auth.api_key(weaviate_key),
    headers=headers
)

ready = client.is_ready()
server_version = client.get_meta()["version"]
client_version = weaviate. __version__
live = client.is_live()
connected = client.is_connected()

print(f"Weaviate Ready: {ready}")
print(f"Weaviate Client Version: {client_version}")
print(f"Weaviate Server Version: {server_version}")
print("Headers passed:")
print(client._connection._headers)

```

If the headers don’t print, or API appears to be missing, then the issue is on your end somewhere.

Best regards,

Mohamed Shahin  
Weaviate Support Engineer  
(Ireland, UTC±00:00/+01:00)

---

<div class="post-metadata">

**Author:** ![Zakaryae\_Bennani](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/zakaryae_bennani/32/7666_2.png) [@Zakaryae\_Bennani](https://forum.weaviate.io/u/Zakaryae_Bennani)\
**Post date:** [September 24, 2025, 6:22pm UTC](https://forum.weaviate.io/t/google-studio-api-key-problem/21991/5 "2025-09-24T18:22:32Z")

</div>

The problem occurs while inserting the data in the database.

```python
            for chunk_obj in tqdm(chunk_objs_list, desc=f"Processing {json_file}"):
                    uuid = generate_uuid5(chunk_obj)
                    batch.add_object(
                        properties=chunk_obj,
                        uuid=uuid,
                    )
the error:
{'message': 'Failed to send all objects in a batch of 5', 'error': "WeaviateInsertManyAllFailedError('Every object failed during insertion. Here is the set of all errors: Google API Key: no api key found neither in request header: X-Palm-Api-Key or X-Goog-Api-Key or X-Goog-Vertex-Api-Key or X-Goog-Studio-Api-Key nor in environment variable under PALM_APIKEY or GOOGLE_APIKEY')"}
{'message': 'Failed to send 5 objects in a batch of 5. Please inspect client.batch.failed_objects or collection.batch.failed_objects for the failed objects.'}

```

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [September 25, 2025, 10:16am UTC](https://forum.weaviate.io/t/google-studio-api-key-problem/21991/6 "2025-09-25T10:16:27Z")

</div>

I understand. I’m checking with you whether the headers are being passed correctly when you connect to the Weaviate client with the cluster.

On my side, I’m able to ingest data with the Google vectorizer and can’t reproduce the issue, so something unusual is happening. I’m trying to narrow it down from your end.

---

<div class="post-metadata">

**Author:** ![Zakaryae\_Bennani](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/zakaryae_bennani/32/7666_2.png) [@Zakaryae\_Bennani](https://forum.weaviate.io/u/Zakaryae_Bennani)\
**Post date:** [September 25, 2025, 12:23pm UTC](https://forum.weaviate.io/t/google-studio-api-key-problem/21991/7 "2025-09-25T12:23:08Z")

</div>

all right, I got you, I will try with the provided code and share the results

---

<div class="post-metadata">

**Author:** ![Zakaryae\_Bennani](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/zakaryae_bennani/32/7666_2.png) [@Zakaryae\_Bennani](https://forum.weaviate.io/u/Zakaryae_Bennani)\
**Post date:** [September 25, 2025, 1:32pm UTC](https://forum.weaviate.io/t/google-studio-api-key-problem/21991/8 "2025-09-25T13:32:49Z")

</div>

Hello, I tried with the code and all the headers are being passed correctly :

Weaviate Ready: True

Weaviate Client Version: 4.16.10

Weaviate Server Version: 1.32.9

Headers passed:

{

‘content-type’: ‘application/json’,

‘X-Weaviate-Cluster-URL’: ‘the key is successfully passed’,

‘X-Weaviate-Api-Key’: ‘the key is successfully passed’,

‘x-goog-studio-api-key’: ‘the key is successfully passed’,

‘x-jinaai-api-key’:‘the key is successfully passed’,

‘authorization’: 'Bearer MDdvWlVUZHdY………’

}

Best regards.

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [September 26, 2025, 3:17pm UTC](https://forum.weaviate.io/t/google-studio-api-key-problem/21991/9 "2025-09-26T15:17:21Z")

</div>

That’s unusual. Are you running Weaviate locally or in our cloud?

If it’s a local deployment, could you share the full files of ingesting and creating schema (take our your keys - I will add mine from testing evn) and deployment setup with me? If it’s on our cloud, I can access it internally. I’ll mirror everything exactly as you have it, including the deployment.
