GuideChat Models

ChatGPT Embeddings

Guide to the ChatGPT Embeddings API: turn text into vector representations for semantic search and clustering, with embedding object fields and a JSON example.

Embeddings

Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.

Related guide: Embeddings

The Embedding Object

Represents an embedding vector returned by the embedding endpoint.

index/integer

The index of the embedding in the list of embeddings.

embedding/array

The embedding vector, which is a list of floats. The length of the vector depends on the model, as listed in the embedding guide.

object/string The object type, which is always "embedding".

{
  "object": "embedding",
  "embedding": [
    0.0023064255,
    -0.009327292,
    .... (1536 floats total for ada-002)
    -0.0028842222,
  ],
  "index": 0
}

On this page