# Generate vectors

```shell curl theme={null}
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."}
      ]
  }'
```

```json curl theme={null}
{
  "data": [
    {
      "values": [
        0.04925537109375,
        -0.01313018798828125,
        -0.0112762451171875,
        ...
      ]
    }, 
    ...
  ],
  "model": "llama-text-embed-v2",
  "usage": {
    "total_tokens": 130
  }
}
```

`POST /embed`

:::code-group
```bash title="cURL"
curl --request POST \
  --url https://api.pinecone.io/embed \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "multilingual-e5-large",
  "parameters": {
    "input_type": "passage",
    "truncate": "END"
  },
  "inputs": [
    {
      "text": "The quick brown fox jumps over the lazy dog."
    }
  ]
}'
```

```json title="200"
{
  "model": "multilingual-e5-large",
  "vector_type": "dense",
  "data": [
    {
      "values": [
        0.1,
        0.2,
        0.3
      ],
      "vector_type": null
    }
  ],
  "usage": {
    "total_tokens": 205
  }
}
```
:::

## Authorizations

- `Authorization` (header, string, required) — Bearer authentication header of the form `Bearer <token>`.

## Headers

- `X-Pinecone-Api-Version` (header, string, required) — Required date-based version header

## Body

- `model` (body, string, required) — The [model](/guides/index-data-create-an-index#embedding-models) to use for embedding generation.
- `parameters` (body, object) — Additional model-specific parameters. Refer to the [model guide](/guides/index-data-create-an-index#embedding-models) for available model parameters.
- `inputs` (body, object\[], required) — List of inputs to generate embeddings for.

## Response

- `200` — OK
- `400` — Bad request. The request body included invalid request parameters.
- `401` — Unauthorized. Possible causes: Invalid API key.
- `500` — Internal server error.

## Related pages

- [Generate vectors](./inference-2026-04-generate-embeddings.md)
- [Generate vectors](./inference-2025-04-generate-embeddings.md)
- [Generate vectors](./inference-2025-01-generate-embeddings.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
