POST
/
embed
from pinecone import Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

a = pc.inference.embed(
    model="multilingual-e5-large",
    inputs=["The quick brown fox jumps over the lazy dog"],
    parameters={
        "input_type": "passage",
        "truncate": "END"
    }
)
EmbeddingsList(
  model='multilingual-e5-large',
  data=[
    {'values': [0.02117919921875, -0.0093994140625, ..., -0.0384521484375, 0.016326904296875]}
  ],
  usage={'total_tokens': 16}
)

This feature is in public preview and is not recommended for production usage.

To use the Inference API with the Python client, upgrade the client and install the pinecone-plugin-inference package as follows:

pip install --upgrade \
    pinecone-client \
    pinecone-plugin-inference
from pinecone import Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

a = pc.inference.embed(
    model="multilingual-e5-large",
    inputs=["The quick brown fox jumps over the lazy dog"],
    parameters={
        "input_type": "passage",
        "truncate": "END"
    }
)
EmbeddingsList(
  model='multilingual-e5-large',
  data=[
    {'values': [0.02117919921875, -0.0093994140625, ..., -0.0384521484375, 0.016326904296875]}
  ],
  usage={'total_tokens': 16}
)

Authorizations

Api-Key
string
headerrequired

An API Key is required to call Pinecone APIs. Get yours from the console.

Body

application/json
model
string
required
parameters
object

Model-specific parameters.

inputs
object[]
required

Response

200 - application/json
model
string
data
object[]
usage
object

Usage statistics for model inference including any instruction prefixes