JavaScript
Embeddings
Create embeddings
POST
JavaScript
Authorizations
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
Response
Successful response
Embeddings response returned by the model
The object type, which is always "list".
Available options:
list The name of the model used to generate the embedding.
Usage metrics for the completion, embeddings,transcription or translation request
Examples:
{
"completion_tokens": 260,
"completion_tokens_after_first_per_sec": 422.79282728043336,
"completion_tokens_after_first_per_sec_first_ten": 423.6108998455803,
"completion_tokens_after_first_per_sec_graph": 423.6108998455803,
"completion_tokens_per_sec": 314.53312043711406,
"completion_tokens_details": { "reasoning_tokens": 55 },
"end_time": 1776189309.02061,
"is_last_response": true,
"prompt_tokens": 90,
"prompt_tokens_details": { "cached_tokens": 0 },
"start_time": 1776189308.193988,
"stop_reason": "stop",
"time_to_first_token": 0.21402883529663086,
"time_to_first_token_graph": 0.2102978229522705,
"total_latency": 0.8266220092773438,
"total_tokens": 350,
"total_tokens_per_sec": 423.40996981919204
}{ "prompt_tokens": 43, "total_tokens": 393 }The list of embeddings generated by the model.

