Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

SambaNova API key, sent as a bearer token in the Authorization header (Authorization: Bearer <key>). Default authentication scheme used by the SambaNova SDK across every OpenAI compatible endpoint.

Body

application/json

Texts to embed and parameters

embeddings request object

model
required

The model ID to use See available models

input
required

The string that will be turned into an embedding.

encoding_format
enum<string> | null
default:float

The format to return the embeddings in. Can be either float or base64. Omitted from the request when not set.

Available options:
float,
base64

Response

Successful response

Embeddings response returned by the model

object
enum<string>
required

The object type, which is always "list".

Available options:
list
model
string
required

The name of the model used to generate the embedding.

usage
Usage · object | null
required

Usage metrics for the completion, embeddings,transcription or translation request

Examples:
data
Embedding · object[]
required

The list of embeddings generated by the model.