Hello Pinecone community,
I’m working on a Next.js application with the Hugging Face transformers library to generate embeddings for PDF/text files, which I then upsert into a Pinecone index. However, I’m encountering a 404 error that indicates Pinecone can’t locate my index. The error is similar to:
[Error [PineconeNotFoundError]: A call to https://index-two-jjor2qo.svc.aped-4627-b74a.pinecone.io/indexes returned HTTP status 404.]
Below are the details:
• Project & Index Setup :
• My Pinecone project is named “Default.”
• The index is called index-two, with 1024 dimensions, cosine metric.
• In the Pinecone dashboard, the environment/region is shown as us-east-1, but the subdomain has aped-4627-b74a.
• API Key & Code :
• In my .env, I have:
PINECONE_API_KEY=pcsk_****************************************
(copied from the Pinecone “API Keys” tab for the Default project). I’ve confirmed that the API key I’m using belongs to the same Pinecone “Default” project where my indexes reside, yet I still receive a 404 for both index-one and index-two.
My code (simplified) is:
const client = new Pinecone({
apiKey: process.env.PINECONE_API_KEY!,
controllerHostUrl: "https://index-two-jjor2qo.svc.aped-4627-b74a.pinecone.io",
});
const indexes = await client.listIndexes();
console.log("Indexes I see:", indexes);
const index = client.index("index-two");
await index.namespace("testspace").upsert([...]);
• Troubleshooting Steps :
-
Confirmed spelling of index-two matches the dashboard.
-
Verified @pinecone-database/pinecone is updated in my Next.js project.
-
Created a new API key in the same Default project, replaced the old one, still 404.
-
Tried logging all indexes (listIndexes()) — the 404 triggers before it prints anything.
-
Double-checked no leftover references to a different index name.
-
Encounter the same 404 if I try index-one or index-two.
• Request for Guidance :
• Am I using the correct environment/subdomain for these indexes?
• Are there any known region mismatches with aped-4627-b74a vs. us-east-1?
• Is there any other reason Pinecone would return 404 on /indexes for indexes that appear in the dashboard?
I am not posting my actual API key here, but it starts with pcsk_ and is directly from the Default project containing my indexes. Any guidance on how to resolve the “not found” error and ensure Pinecone recognizes my indexes would be greatly appreciated.
Thank you!