Skip to main content
POST
/
ai
/
embeddings
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const embeddingResponse = await client.ai.embeddings.create({ bucket_name: 'bucket_name' });

console.log(embeddingResponse.data);
{
  "data": {
    "task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "task_name": "<string>",
    "status": "<string>",
    "created_at": "<string>",
    "finished_at": "<string>",
    "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
bucket_name
string
required
document_chunk_size
integer
default:1024
document_chunk_overlap_size
integer
default:512
embedding_model
enum<string>
default:thenlper/gte-large

Supported models to vectorize and embed documents.

Available options:
thenlper/gte-large,
intfloat/multilingual-e5-large
loader
enum<string>
default:default

Supported types of custom document loaders for embeddings.

Available options:
default,
intercom

Response

Successful Response

data
object
required