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

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

const embedding = await client.ai.embeddings.retrieve('task_id');

console.log(embedding.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
)
embedding = client.ai.embeddings.retrieve(
"task_id",
)
print(embedding.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"),
)
embedding, err := client.AI.Embeddings.Get(context.TODO(), "task_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", embedding.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.EmbeddingRetrieveParams;
import com.telnyx.sdk.models.ai.embeddings.EmbeddingRetrieveResponse;

public final class Main {
private Main() {}

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

EmbeddingRetrieveResponse embedding = client.ai().embeddings().retrieve("task_id");
}
}
require "telnyx"

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

embedding = telnyx.ai.embeddings.retrieve("task_id")

puts(embedding)
<?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 {
$embedding = $client->ai->embeddings->retrieve('task_id');

var_dump($embedding);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx ai:embeddings retrieve \
--api-key 'My API Key' \
--task-id task_id
curl --request GET \
--url https://api.telnyx.com/v2/ai/embeddings/{task_id} \
--header 'Authorization: Bearer <token>'
{
  "data": {
    "task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "task_name": "<string>",
    "created_at": "<string>",
    "finished_at": "<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.

Path Parameters

task_id
string
required

Unique identifier of the task.

Response

Successful Response

data
object
required