Skip to content

Create text embeddings

POST
/v1/adapters/llm/embeddings
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 } }'
Media typeapplication/json
object
engine
string
Allowed values: open_ai azure
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

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)