Managed vector database for semantic search and retrieval-augmented generation. Use it to create indexes, generate embeddings and rerank results with Pinecone Inference, and upsert/query/fetch/delete vectors with metadata filtering. Unlike a general datastore, Pinecone is purpose-built for low-latency similarity search over high-dimensional embeddings at scale.
11 endpoints available through Lava’s AI Gateway. See the Pinecone API docs for full documentation.
This provider requires your own credentials — connect your API key or OAuth account before use.
Endpoints
List all indexes in the project
GET https://api.pinecone.io/indexes — Free
const data = await lava . gateway ( 'https://api.pinecone.io/indexes' , { method: 'GET' });
curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.pinecone.io%2Findexes" \
-H "Authorization: Bearer $LAVA_SECRET_KEY "
Create a serverless index. dimension must match your embedding model (e.g. 1024 for multilingual-e5-large).
POST https://api.pinecone.io/indexes — Free
const data = await lava . gateway ( 'https://api.pinecone.io/indexes' , {
body: {
"name" : "my-index" ,
"dimension" : 1024 ,
"metric" : "cosine" ,
"spec" : {
"serverless" : {
"cloud" : "aws" ,
"region" : "us-east-1"
}
}
},
});
curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.pinecone.io%2Findexes" \
-H "Authorization: Bearer $LAVA_SECRET_KEY " \
-H "Content-Type: application/json" \
-d '{"name":"my-index","dimension":1024,"metric":"cosine","spec":{"serverless":{"cloud":"aws","region":"us-east-1"}}}'
Describe an index by name. Returns the host for data-plane requests (upsert/query/fetch/delete) on that index.
GET https://api.pinecone.io/indexes/my-index — Free
const data = await lava . gateway ( 'https://api.pinecone.io/indexes/my-index' , { method: 'GET' });
curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.pinecone.io%2Findexes%2Fmy-index" \
-H "Authorization: Bearer $LAVA_SECRET_KEY "
Delete an index by name
DELETE https://api.pinecone.io/indexes/my-index — Free
const data = await lava . gateway ( 'https://api.pinecone.io/indexes/my-index' , { method: 'DELETE' });
curl -X DELETE "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.pinecone.io%2Findexes%2Fmy-index" \
-H "Authorization: Bearer $LAVA_SECRET_KEY " \
-H "Content-Type: application/json"
Generate embeddings for input text with a hosted Pinecone model (e.g. multilingual-e5-large, llama-text-embed-v2)
POST https://api.pinecone.io/embed — Free
const data = await lava . gateway ( 'https://api.pinecone.io/embed' , {
body: {
"model" : "multilingual-e5-large" ,
"parameters" : {
"input_type" : "passage" ,
"truncate" : "END"
},
"inputs" : [
{
"text" : "The quick brown fox"
}
]
},
});
curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.pinecone.io%2Fembed" \
-H "Authorization: Bearer $LAVA_SECRET_KEY " \
-H "Content-Type: application/json" \
-d '{"model":"multilingual-e5-large","parameters":{"input_type":"passage","truncate":"END"},"inputs":[{"text":"The quick brown fox"}]}'
Rerank documents against a query with a hosted reranking model (e.g. bge-reranker-v2-m3)
POST https://api.pinecone.io/rerank — Free
const data = await lava . gateway ( 'https://api.pinecone.io/rerank' , {
body: {
"model" : "bge-reranker-v2-m3" ,
"query" : "what is a vector database" ,
"top_n" : 2 ,
"documents" : [
{
"id" : "1" ,
"text" : "Pinecone is a vector database"
},
{
"id" : "2" ,
"text" : "A fox is an animal"
}
]
},
});
curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.pinecone.io%2Frerank" \
-H "Authorization: Bearer $LAVA_SECRET_KEY " \
-H "Content-Type: application/json" \
-d '{"model":"bge-reranker-v2-m3","query":"what is a vector database","top_n":2,"documents":[{"id":"1","text":"Pinecone is a vector database"},{"id":"2","text":"A fox is an animal"}]}'
Upsert vectors into a namespace. Target the index host from describe-index. values length must match the index dimension.
POST https://my-index-abc123.svc.aped-4627-b74a.pinecone.io/vectors/upsert — Free
const data = await lava . gateway ( 'https://my-index-abc123.svc.aped-4627-b74a.pinecone.io/vectors/upsert' , {
body: {
"namespace" : "ns1" ,
"vectors" : [
{
"id" : "v1" ,
"values" : [
0.1 ,
0.2 ,
0.3
],
"metadata" : {
"text" : "hello"
}
}
]
},
});
curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fmy-index-abc123.svc.aped-4627-b74a.pinecone.io%2Fvectors%2Fupsert" \
-H "Authorization: Bearer $LAVA_SECRET_KEY " \
-H "Content-Type: application/json" \
-d '{"namespace":"ns1","vectors":[{"id":"v1","values":[0.1,0.2,0.3],"metadata":{"text":"hello"}}]}'
POST https://my-index-abc123.svc.aped-4627-b74a.pinecone.io/query — Free
const data = await lava . gateway ( 'https://my-index-abc123.svc.aped-4627-b74a.pinecone.io/query' , {
body: {
"namespace" : "ns1" ,
"vector" : [
0.1 ,
0.2 ,
0.3
],
"topK" : 3 ,
"includeMetadata" : true ,
"includeValues" : false
},
});
curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fmy-index-abc123.svc.aped-4627-b74a.pinecone.io%2Fquery" \
-H "Authorization: Bearer $LAVA_SECRET_KEY " \
-H "Content-Type: application/json" \
-d '{"namespace":"ns1","vector":[0.1,0.2,0.3],"topK":3,"includeMetadata":true,"includeValues":false}'
Fetch vectors by id from a namespace. Target the index host from describe-index. Pass ids and namespace as query params.
GET https://my-index-abc123.svc.aped-4627-b74a.pinecone.io/vectors/fetch?ids=v1&namespace=ns1 — Free
const data = await lava . gateway ( 'https://my-index-abc123.svc.aped-4627-b74a.pinecone.io/vectors/fetch?ids=v1&namespace=ns1' , { method: 'GET' });
curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fmy-index-abc123.svc.aped-4627-b74a.pinecone.io%2Fvectors%2Ffetch%3Fids%3Dv1%26namespace%3Dns1" \
-H "Authorization: Bearer $LAVA_SECRET_KEY "
POST https://my-index-abc123.svc.aped-4627-b74a.pinecone.io/vectors/delete — Free
const data = await lava . gateway ( 'https://my-index-abc123.svc.aped-4627-b74a.pinecone.io/vectors/delete' , { body: { "namespace" : "ns1" , "ids" : [ "v1" , "v2" ]} });
curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fmy-index-abc123.svc.aped-4627-b74a.pinecone.io%2Fvectors%2Fdelete" \
-H "Authorization: Bearer $LAVA_SECRET_KEY " \
-H "Content-Type: application/json" \
-d '{"namespace":"ns1","ids":["v1","v2"]}'
Get vector counts and fullness per namespace for an index. Target the index host from describe-index.
POST https://my-index-abc123.svc.aped-4627-b74a.pinecone.io/describe_index_stats — Free
const data = await lava . gateway ( 'https://my-index-abc123.svc.aped-4627-b74a.pinecone.io/describe_index_stats' , { body: {} });
curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fmy-index-abc123.svc.aped-4627-b74a.pinecone.io%2Fdescribe_index_stats" \
-H "Authorization: Bearer $LAVA_SECRET_KEY " \
-H "Content-Type: application/json" \
-d '{}'
Next Steps
All Providers Browse all supported AI providers
Forward Proxy Learn how to construct proxy URLs and authenticate requests