Create text embeddings
POST
/v1/adapters/llm/embeddings
const url = 'https://example.com/v1/adapters/llm/embeddings';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"engine":"open_ai","provider":"example","model":"example","input":["example"],"metadata":{"call_sid":"example","campaign_sid":"example","scenario_sid":"example","node_id":"example","account_sid":"example","target":"example","source":"example","is_test":true}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/adapters/llm/embeddings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "engine": "open_ai", "provider": "example", "model": "example", "input": [ "example" ], "metadata": { "call_sid": "example", "campaign_sid": "example", "scenario_sid": "example", "node_id": "example", "account_sid": "example", "target": "example", "source": "example", "is_test": true } }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
engine
string
provider
string
model
required
string
input
required
Array<string>
metadata
object
call_sid
string
campaign_sid
string
scenario_sid
string
node_id
string
account_sid
string
target
Entity|intent|fallback|streaming
string
source
Hermes|bff|ss|ids
string
is_test
boolean
Responses
Section titled “Responses”Created
Media typeapplication/json
object
embeddings
required
Array<Array<number>>
Examplegenerated
{ "embeddings": [ [ 1 ] ]}Invalid request body or parameters
Media typeapplication/json
Canonical structured error emitted by the chat completion, chat stream and
embeddings handlers (the shared errorResponse helper). code is an
application error code (0 when unset); status mirrors the HTTP status.
object
name
required
string
message
required
string
code
required
integer
status
required
integer
Examplegenerated
{ "name": "example", "message": "example", "code": 1, "status": 1}Unauthorized
Forbidden
Bad gateway (upstream adapter error)