Skip to main content
POST
/
ai
/
embeddings
/
url
JavaScript
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"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
url
string
required

The URL of the webpage to embed

bucket_name
string
required

Name of the bucket to store the embeddings. This bucket must already exist.

Response

Successful Response

data
object
required