PINECONE_API_KEY="YOUR_API_KEY"
curl https://api.pinecone.io/embed \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2025-10" \
-d '{
"model": "llama-text-embed-v2",
"parameters": {
"input_type": "passage",
"truncate": "END"
},
"inputs": [
{"text": "Apple is a popular fruit known for its sweetness and crisp texture."},
{"text": "The tech company Apple is known for its innovative products like the iPhone."},
{"text": "Many people enjoy eating apples as a healthy snack."},
{"text": "Apple Inc. has revolutionized the tech industry with its sleek designs and user-friendly interfaces."},
{"text": "An apple a day keeps the doctor away, as the saying goes."},
{"text": "Apple Computer Company was founded on April 1, 1976, by Steve Jobs, Steve Wozniak, and Ronald Wayne as a partnership."}
]
}'
{
"data": [
{
"values": [
0.04925537109375,
-0.01313018798828125,
-0.0112762451171875,
...
]
},
...
],
"model": "llama-text-embed-v2",
"usage": {
"total_tokens": 130
}
}
Embed
Generate vectors
Generate vector embeddings for input data. This endpoint uses Pinecone’s hosted embedding models.
POST
/
embed
PINECONE_API_KEY="YOUR_API_KEY"
curl https://api.pinecone.io/embed \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2025-10" \
-d '{
"model": "llama-text-embed-v2",
"parameters": {
"input_type": "passage",
"truncate": "END"
},
"inputs": [
{"text": "Apple is a popular fruit known for its sweetness and crisp texture."},
{"text": "The tech company Apple is known for its innovative products like the iPhone."},
{"text": "Many people enjoy eating apples as a healthy snack."},
{"text": "Apple Inc. has revolutionized the tech industry with its sleek designs and user-friendly interfaces."},
{"text": "An apple a day keeps the doctor away, as the saying goes."},
{"text": "Apple Computer Company was founded on April 1, 1976, by Steve Jobs, Steve Wozniak, and Ronald Wayne as a partnership."}
]
}'
{
"data": [
{
"values": [
0.04925537109375,
-0.01313018798828125,
-0.0112762451171875,
...
]
},
...
],
"model": "llama-text-embed-v2",
"usage": {
"total_tokens": 130
}
}
PINECONE_API_KEY="YOUR_API_KEY"
curl https://api.pinecone.io/embed \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2025-10" \
-d '{
"model": "llama-text-embed-v2",
"parameters": {
"input_type": "passage",
"truncate": "END"
},
"inputs": [
{"text": "Apple is a popular fruit known for its sweetness and crisp texture."},
{"text": "The tech company Apple is known for its innovative products like the iPhone."},
{"text": "Many people enjoy eating apples as a healthy snack."},
{"text": "Apple Inc. has revolutionized the tech industry with its sleek designs and user-friendly interfaces."},
{"text": "An apple a day keeps the doctor away, as the saying goes."},
{"text": "Apple Computer Company was founded on April 1, 1976, by Steve Jobs, Steve Wozniak, and Ronald Wayne as a partnership."}
]
}'
{
"data": [
{
"values": [
0.04925537109375,
-0.01313018798828125,
-0.0112762451171875,
...
]
},
...
],
"model": "llama-text-embed-v2",
"usage": {
"total_tokens": 130
}
}
Authorizations
Headers
Required date-based version header
Body
application/json
Generate embeddings for inputs.
List of inputs to generate embeddings for.
Show child attributes
Show child attributes
Additional model-specific parameters. Refer to the model guide for available model parameters.
Example:
{
"input_type": "passage",
"truncate": "END"
}Response
OK
Embeddings generated for the input.
The model used to generate the embeddings
Example:
"multilingual-e5-large"
Indicates whether the response data contains 'dense' or 'sparse' embeddings.
Example:
"dense"
The embeddings generated for the inputs.
A dense embedding of a single input
- Dense embedding
- Sparse embedding
Show child attributes
Show child attributes
Usage statistics for the model inference.
Show child attributes
Show child attributes
Was this page helpful?
⌘I