Pular para o conteúdo principal
POST
Guia relacionado: guia de Embeddings. Consulte o guia de Embeddings para um passo a passo com exemplos.

Autorizações

Authorization
string
header
obrigatório

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corpo

application/json
input
obrigatório

Input text to embed, encoded as a string or array of tokens.

Minimum string length: 1
model
string
obrigatório

ID of the model to use.

cache
object

Cache configuration for the request.

dimensions
integer<int64>

The number of dimensions the resulting output embeddings should have.

encoding_format
enum<string>

The format to return the embeddings in. Can be either float or base64.

Opções disponíveis:
float,
base64
fallback_on_codes
integer<int64>[] | null

HTTP status codes that trigger fallback. Defaults to [408,429,500,502,503,504,529]. Each code must be unique and between 400 and 599.

Maximum array length: 20
fallbacks
object[] | null

Array of fallback models to use if primary model fails.

load_balancer
object

Load balancer configuration for the request.

name
string

The name to display on the trace. If not specified, the default system name will be used.

orq
object

Platform extension parameters. Top-level equivalents take priority when both are set.

retry
object

Retry configuration for the request.

timeout
object

Timeout configuration to apply to the request.

user
string

A unique identifier representing your end-user.

Resposta

Returns the embedding vector.

data
object[] | null
obrigatório

List of embedding objects.

model
string
obrigatório

ID of the model used.

object
enum<string>
obrigatório

Always "list".

Opções disponíveis:
list
usage
object
obrigatório

The usage information for the request.