> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an embedding task's status

> Check the status of a current embedding task. Will be one of the following:
- `queued` - Task is waiting to be picked up by a worker
- `processing` - The embedding task is running
- `success` - Task completed successfully and the bucket is embedded
- `failure` - Task failed and no files were embedded successfully
- `partial_success` - Some files were embedded successfully, but at least one failed



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/ai/analytics.yml get /ai/embeddings/{task_id}
openapi: 3.1.0
info:
  title: Telnyx AI Analytics API
  version: 2.0.0
  description: API for AI conversations, insights, embeddings, and clusters.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /ai/embeddings/{task_id}:
    get:
      tags:
        - Embeddings
      summary: Get an embedding task's status
      description: >-
        Check the status of a current embedding task. Will be one of the
        following:

        - `queued` - Task is waiting to be picked up by a worker

        - `processing` - The embedding task is running

        - `success` - Task completed successfully and the bucket is embedded

        - `failure` - Task failed and no files were embedded successfully

        - `partial_success` - Some files were embedded successfully, but at
        least one failed
      operationId: GetEmbeddingTask
      parameters:
        - required: true
          schema:
            type: string
            title: Task Id
          name: task_id
          in: path
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskStatusResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            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);
        - lang: Python
          source: |-
            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)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tembedding, err := client.AI.Embeddings.Get(context.TODO(), \"task_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", embedding.Data)\n}\n"
        - lang: Java
          source: >-
            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");
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

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

            puts(embedding)
        - lang: PHP
          source: >-
            <?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();
            }
        - lang: CLI
          source: |-
            telnyx ai:embeddings retrieve \
              --api-key 'My API Key' \
              --task-id task_id
components:
  schemas:
    TaskStatusResponse:
      properties:
        data:
          type: object
          properties:
            task_id:
              type: string
              format: uuid
              title: Task ID
            task_name:
              type: string
              title: Task Name
            status:
              $ref: '#/components/schemas/BackgroundTaskStatus'
            created_at:
              type: string
              title: Created At
            finished_at:
              type: string
              title: Finished At
      type: object
      required:
        - data
      title: TaskStatusResponse
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    BackgroundTaskStatus:
      type: string
      enum:
        - queued
        - processing
        - success
        - failure
        - partial_success
      title: BackgroundTaskStatus
      description: Status of an embeddings task.
    ValidationError:
      title: ValidationError
      required:
        - loc
        - msg
        - type
      type: object
      properties:
        loc:
          title: Location
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````