Getting 404 error when trying inference.embed

I am new to the nodejs sdk. I am trying access the embedding endpoint so I can create a vector. Here is the code I am using.

// Initialize Pinecone API client
const data = [
    {
      id: "1",
      text: "some text",
    },
  ];

const pineConeClient = new Pinecone({
apiKey: process.env.PINECONE_apiKey,
});
const model = "text-embedding-ada-002";
const embeddings = await pineConeClient.inference.embed(
      model,
      data.map((d) => d.text),
      { inputType: "passage", truncate: "END" }
    );

When I run this code, I get the following error: PineconeNotFoundError: A call to https://api.pinecone.io/embed returned HTTP status 404.

As I understand this, I DO NOT have to specify my index as this end point has nothing to do where my index is located, in my case, us-west-2. I am not sure what to do, this error seems to be out of my control. package version “@pinecone-database/pinecone”: “^4.0.0”,

Any advice would be great full.
Brad

@bradley thanks for reaching out. Pinecone’s embedding endpoint only supports models we host. Right now we host a single text embedding model multilingual-e5-large

I got confused because when I created the index, via the dashboard, I was allowed to choose other models. So I assumed that it was a valid model.

Thanks that fixed the issue.

Brad

Sorry for the confusion. We’ll take another look at that!