YandexGPT API, REST: Embeddings.Embedding
Written by
Updated at October 17, 2024
RPC method to obtain embeddings for input text data.
HTTP request
POST https://llm.api.cloud.yandex.net/llm/v1alpha/embedding
Body parameters
{
"embeddingType": "string",
"model": "string",
"text": "string"
}
Represents a request to obtain embeddings for text data.
Field |
Description |
embeddingType |
enum (EmbeddingType) The type of embedding to be generated.
|
model |
string The name or identifier of the model to be used for embedding. Possible value for now: |
text |
string The input text for which the embedding is requested. |
Response
HTTP Code: 200 - OK
{
"embedding": [
"string"
],
"numTokens": "string"
}
Represents a response containing embeddings for input text data.
Field |
Description |
embedding[] |
string A repeated list of double values representing the embedding. |
numTokens |
string (int64) The number of tokens in the input text. |