import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const embeddingResponse = await client.ai.embeddings.url({ bucket_name: 'bucket_name', url: 'url' });
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"
}
}Embed website content from a specified URL, including child pages up to 5 levels deep within the same domain. The process crawls and loads content from the main URL and its linked pages into a Telnyx Cloud Storage bucket. As soon as each webpage is added to the bucket, its content is immediately processed for embeddings, that can be used for similarity search and clustering.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const embeddingResponse = await client.ai.embeddings.url({ bucket_name: 'bucket_name', url: 'url' });
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"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Was this page helpful?