New projects should use the Documents API. To move an existing index, see Move to the Documents API.
create_index_for_model and served by the legacy Records API. Pinecone converts the source text you upsert and search with to vectors, using one hosted embedding model per index. To have Pinecone embed text in a document index instead, declare embed or sparse_embed on a string field. See Integrated embedding.
Dense embedding
If you want to upsert and search with source text and have Pinecone convert it to dense vectors automatically, create an index with integrated embedding as follows:- Provide a
namefor the index. - Set
cloudandregionto the cloud and region where the index should be deployed. - Set
embed.modelto one of Pinecone’s hosted embedding models. - Set
embed.field_mapto the name of the field in your source document that contains the data for embedding.
Sparse embedding
If you want to upsert and search with source text and have Pinecone convert it to sparse vectors automatically, create an index with integrated embedding as follows:- Provide a
namefor the index. - Set
cloudandregionto the cloud and region where the index should be deployed. - Set
embed.modelto one of Pinecone’s hosted sparse embedding models. - Set
embed.field_mapto the name of the field in your source document that contains the text for embedding. - If needed,
embed.read_parametersandembed.write_parameterscan be used to override the default model embedding behavior.
Wait for the index to be ready
A new index can’t accept data until itsstatus.ready field is true. See Wait for the index to be ready.