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

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

const embeddings = await client.ai.embeddings.list();

console.log(embeddings.data);
import os
from telnyx import Telnyx

client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
embeddings = client.ai.embeddings.list()
print(embeddings.data)
package main

import (
"context"
"fmt"

"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)

func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
embeddings, err := client.AI.Embeddings.List(context.TODO(), telnyx.AIEmbeddingListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", embeddings.Data)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.ai.embeddings.EmbeddingListParams;
import com.telnyx.sdk.models.ai.embeddings.EmbeddingListResponse;

public final class Main {
private Main() {}

public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();

EmbeddingListResponse embeddings = client.ai().embeddings().list();
}
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

embeddings = telnyx.ai.embeddings.list

puts(embeddings)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');

try {
$embeddings = $client->ai->embeddings->list(status: ['string']);

var_dump($embeddings);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx ai:embeddings list \
--api-key 'My API Key'
curl --request GET \
--url https://api.telnyx.com/v2/ai/embeddings \
--header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "user_id": "<string>",
      "task_id": "<string>",
      "task_name": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "finished_at": "2023-11-07T05:31:56Z",
      "bucket": "<string>"
    }
  ]
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

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

Query Parameters

status
string[]

List of task statuses i.e. status=queued&status=processing

Response

Successful Response

data
BackgroundTasksQueryResponse · object[]
required