Skip to main content
Pinecone Docs

Search documentation

Type to search this documentation.

On this pageOverview

Generate vectors

curl
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: 2026-04" \
  -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."}
      ]
  }'
curl
{
  "data": [
    {
      "values": [
        0.04925537109375,
        -0.01313018798828125,
        -0.0112762451171875,
        ...
      ]
    }, 
    ...
  ],
  "model": "llama-text-embed-v2",
  "usage": {
    "total_tokens": 130
  }
}

POST /embed

  • X-Pinecone-Api-Version (header, string, required) — Required date-based version header
  • model (body, string, required) — The model to use for embedding generation.
  • parameters (body, object) — Additional model-specific parameters. Refer to the model guide for available model parameters.
  • inputs (body, object[], required) — List of inputs to generate embeddings for.
  • 200 — OK
  • 400 — Bad request. The request body included invalid request parameters.
  • 401 — Unauthorized. Possible causes: Invalid API key.
  • 500 — Internal server error.
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu