Gcp-starter region: us-central-1 not found"

I am trying to create an index programmatically. Checked the pinecone’s documentation from here.

This is my code:

from pinecone import ServerlessSpec

pc.create_index(
    name="quickstart",
    dimension=8,
    metric="cosine",
    spec=ServerlessSpec(
        cloud='gcp-starter', 
        region='us-central-1'
    ) 
) 

I am on starter plan but it’s not executing. It’s giving me this error:

HTTP response body: {"error":{"code":"NOT_FOUND","message":"Resource cloud: gcp-starter region: us-central-1 not found"},"status":404}

Tried checking this page as well but didn’t work.

1 Like

I found the answer. For starter plans, we can’t create serverless indices.

We should be using this code snippet and use pods:

from pinecone import Pinecone, PodSpec

pc = Pinecone(api_key="YOUR_API_KEY")

pc.create_index(
  name="starter-index",
  dimension=1536,
  metric="cosine",
  spec=PodSpec(
    environment="gcp-starter"
  )
)
1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.