> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.voicecheap.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Translation Status

> Check the status of a translation project and retrieve results

# Get Translation Status

Retrieve the current status of a translation project. Use this endpoint to poll for progress and get the translated video URL when processing is complete.

## Request

### Headers

<ParamField header="x-api-key" type="string" required>
  Your VoiceCheap API key. Get one from [app.voicecheap.ai/page-api](https://app.voicecheap.ai/page-api).
</ParamField>

### Path Parameters

<ParamField path="projectId" type="string" required>
  The unique identifier of the translation project returned from the [Start Translation](/docs/api-reference/translate) endpoint.
</ParamField>

## Response

The response structure varies based on the translation status.

### Common Fields

<ResponseField name="projectId" type="string" required>
  The unique identifier of the project
</ResponseField>

<ResponseField name="projectName" type="string" required>
  The name of the project
</ResponseField>

<ResponseField name="originalVideoUrl" type="string" required>
  URL to the original uploaded video/audio file
</ResponseField>

<ResponseField name="originalLanguage" type="string" required>
  The detected or specified original language
</ResponseField>

<ResponseField name="targetLanguage" type="string" required>
  The target language for translation
</ResponseField>

<ResponseField name="duration" type="number" required>
  Duration of the content in seconds
</ResponseField>

<ResponseField name="createdAt" type="number" required>
  Unix timestamp when the project was created
</ResponseField>

<ResponseField name="workId" type="string">
  Translation work identifier for the currently reported translated version.
</ResponseField>

<ResponseField name="translatedVersionId" type="string">
  Translated version identifier for the currently reported translated version.
</ResponseField>

<ResponseField name="actualProgressStep" type="string">
  Current project step. During creation/transcription this reflects those steps (e.g. `downloading_content`, `content_validation`,
  `transcription_processing`). Once dubbing starts, it may switch to the active dubbing step (e.g. `smart_sync`, `audio_assembling`) so `status:
      processing` does not pair with `actualProgressStep: done`.
</ResponseField>

<ResponseField name="translationAndTranscriptionProgress" type="number">
  Approximate progress percentage for project creation/transcription (0-100)
</ResponseField>

<ResponseField name="dubbingStep" type="string">
  Current dubbing step for the target language (e.g. `smart_sync`, `audio_enhancement`, `video_upload`)
</ResponseField>

<ResponseField name="dubbingProgress" type="number">
  Approximate progress percentage for dubbing (0-100)
</ResponseField>

<ResponseField name="status" type="string" required>
  Current status of the translation: `processing`, `success`, or `failed`
</ResponseField>

### Lip Sync Fields

When lip-sync was requested, the response includes an additional `lipSync` object:

<ResponseField name="lipSync" type="object">
  Lip-sync status and output details (only present when lip-sync was requested)

  <Expandable title="lipSync properties">
    <ResponseField name="lipSync.jobId" type="string">
      Lip-sync job identifier
    </ResponseField>

    <ResponseField name="lipSync.status" type="string">
      Lip-sync status: `PENDING`, `PROCESSING`, `COMPLETED`, `FAILED`, `REJECTED`, or `CANCELED`
    </ResponseField>

    <ResponseField name="lipSync.videoUrl" type="string">
      URL of the lip-synced video. Use this URL for the final lip-synced output when `lipSync.status` is `COMPLETED`.
    </ResponseField>

    <ResponseField name="lipSync.errorMessage" type="string">
      Error details if lip-sync failed
    </ResponseField>

    <ResponseField name="lipSync.type" type="string">
      Lip-sync mode: `standard`, `pro`, or `pro_2`. `POST /v1/translate` can request `standard` or `pro` with `lipsyncPro`.
    </ResponseField>

    <ResponseField name="lipSync.createdAt" type="string">
      ISO timestamp when the lip-sync attempt was created.
    </ResponseField>

    <ResponseField name="lipSync.requestedAt" type="string">
      ISO timestamp when the lip-sync attempt was requested, when available.
    </ResponseField>

    <ResponseField name="lipSync.completedAt" type="string">
      ISO timestamp when lip-sync completed, when available.
    </ResponseField>

    <ResponseField name="lipSync.failedAt" type="string">
      ISO timestamp when lip-sync failed, when available.
    </ResponseField>

    <ResponseField name="lipSync.timedOutAt" type="string">
      ISO timestamp when lip-sync timed out, when available.
    </ResponseField>

    <ResponseField name="lipSync.activeSpeakerDetectionEnabled" type="boolean">
      Whether active speaker detection was enabled for this lip-sync attempt.
    </ResponseField>
  </Expandable>
</ResponseField>

<Info>
  When lip-sync is requested, the translation stays in `processing` until `lipSync.status` is `COMPLETED`. If lip-sync fails, the status becomes
  `failed` and the `error.code` is `LIPSYNC_FAILED`. When lip-sync succeeds, read the lip-synced asset from `lipSync.videoUrl`; `translatedVideoUrl`
  is the translated video output before the lip-sync overlay.
</Info>

<Tip>Use `GET /v1/projects/{projectId}` when you need the full translated version history or complete lip-sync history.</Tip>

### Success Response Fields

When `status` is `success`, the following additional fields are included:

<ResponseField name="translatedVideoUrl" type="string">
  URL to download the translated video file
</ResponseField>

<ResponseField name="translatedAudioUrl" type="string">
  URL to download the translated audio file separately
</ResponseField>

### Failed Response Fields

When `status` is `failed`, the following additional field is included:

<ResponseField name="error" type="object">
  Error details

  <Expandable title="error properties">
    <ResponseField name="error.code" type="string">
      Machine-readable error code
    </ResponseField>

    <ResponseField name="error.message" type="string">
      Human-readable error description
    </ResponseField>
  </Expandable>
</ResponseField>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.voicecheap.ai/v1/translate/abc123-def456-ghi789/status" \
    -H "x-api-key: vc_your-api-key"
  ```

  ```typescript TypeScript theme={null}
  type TranslationStatus = 'processing' | 'success' | 'failed';

  interface TranslationStatusBase {
    projectId: string;
    projectName: string;
    originalVideoUrl: string;
    originalLanguage: string;
    targetLanguage: string;
    duration: number;
    createdAt: number;
    workId?: string;
    translatedVersionId?: string;
    actualProgressStep?: string;
    translationAndTranscriptionProgress?: number;
    dubbingStep?: string;
    dubbingProgress?: number;
    lipSync?: {
      jobId: string;
      status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'REJECTED' | 'CANCELED';
      videoUrl: string;
      errorMessage: string | null;
      type: 'standard' | 'pro' | 'pro_2';
      createdAt?: string;
      requestedAt?: string;
      completedAt?: string;
      failedAt?: string;
      timedOutAt?: string;
      activeSpeakerDetectionEnabled?: boolean;
    };
  }

  interface TranslationStatusProcessing extends TranslationStatusBase {
    status: 'processing';
  }

  interface TranslationStatusSuccess extends TranslationStatusBase {
    status: 'success';
    translatedVideoUrl: string;
    translatedAudioUrl: string;
  }

  interface TranslationStatusFailed extends TranslationStatusBase {
    status: 'failed';
    error: {
      code: string;
      message: string;
    };
  }

  type TranslationStatusResponse = TranslationStatusProcessing | TranslationStatusSuccess | TranslationStatusFailed;

  async function getTranslationStatus(projectId: string): Promise<TranslationStatusResponse> {
    const response = await fetch(`https://api.voicecheap.ai/v1/translate/${projectId}/status`, {
      method: 'GET',
      headers: {
        'x-api-key': 'vc_your-api-key',
      },
    });

    if (!response.ok) {
      const error = await response.json();
      throw new Error(error.message || 'Failed to get status');
    }

    return response.json();
  }

  // Polling function with typed response handling
  async function pollUntilComplete(projectId: string, intervalMs: number = 10000): Promise<TranslationStatusSuccess> {
    while (true) {
      const status = await getTranslationStatus(projectId);

      if (status.status === 'success') {
        return status;
      }

      if (status.status === 'failed') {
        throw new Error(`Translation failed: ${status.error.message}`);
      }

      console.log('Still processing...');
      await new Promise((resolve) => setTimeout(resolve, intervalMs));
    }
  }

  // Usage
  try {
    const result = await pollUntilComplete('abc123-def456-ghi789');
    console.log('Translated video:', result.translatedVideoUrl);
    console.log('Translated audio:', result.translatedAudioUrl);
  } catch (error) {
    console.error('Error:', error);
  }
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.voicecheap.ai/v1/translate/abc123-def456-ghi789/status', {
    method: 'GET',
    headers: {
      'x-api-key': 'vc_your-api-key',
    },
  });

  const status = await response.json();

  if (status.status === 'success') {
    console.log('Translated video:', status.translatedVideoUrl);
  } else if (status.status === 'processing') {
    console.log('Still processing...');
  } else if (status.status === 'failed') {
    console.error('Translation failed:', status.error.message);
  }
  ```

  ```python Python theme={null}
  import requests
  import time

  headers = {'x-api-key': 'vc_your-api-key'}
  project_id = 'abc123-def456-ghi789'

  # Poll until complete
  while True:
      response = requests.get(
          f'https://api.voicecheap.ai/v1/translate/{project_id}/status',
          headers=headers
      )
      status = response.json()

      if status['status'] == 'success':
          print(f"Translated video: {status['translatedVideoUrl']}")
          print(f"Translated audio: {status['translatedAudioUrl']}")
          break
      elif status['status'] == 'failed':
          print(f"Translation failed: {status['error']['message']}")
          break
      else:
          print("Still processing...")
          time.sleep(10)  # Wait 10 seconds before polling again
  ```

  ```php PHP theme={null}
  <?php
  $apiKey = 'vc_your-api-key';
  $projectId = 'abc123-def456-ghi789';

  $curl = curl_init();

  curl_setopt_array($curl, [
      CURLOPT_URL => "https://api.voicecheap.ai/v1/translate/{$projectId}/status",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => [
          "x-api-key: {$apiKey}"
      ]
  ]);

  $response = curl_exec($curl);
  $status = json_decode($response, true);

  switch ($status['status']) {
      case 'success':
          echo "Translated video: " . $status['translatedVideoUrl'] . "\n";
          echo "Translated audio: " . $status['translatedAudioUrl'];
          break;
      case 'processing':
          echo "Still processing...";
          break;
      case 'failed':
          echo "Failed: " . $status['error']['message'];
          break;
  }
  ```
</CodeGroup>

## Response Examples

### Processing Status

```json theme={null}
{
  "projectId": "abc123-def456-ghi789",
  "projectName": "My Spanish Translation",
  "originalVideoUrl": "https://storage.voicecheap.ai/...",
  "originalLanguage": "en",
  "targetLanguage": "spanish",
  "duration": 125.5,
  "createdAt": 1702234567890,
  "actualProgressStep": "downloading_content",
  "translationAndTranscriptionProgress": 11,
  "dubbingStep": "smart_sync",
  "dubbingProgress": 30,
  "status": "processing"
}
```

### Processing Status (Lip Sync Requested)

```json theme={null}
{
  "projectId": "abc123-def456-ghi789",
  "projectName": "My Spanish Translation",
  "originalVideoUrl": "https://storage.voicecheap.ai/...",
  "originalLanguage": "en",
  "targetLanguage": "spanish",
  "duration": 125.5,
  "createdAt": 1702234567890,
  "actualProgressStep": "finalizing",
  "translationAndTranscriptionProgress": 95,
  "dubbingStep": "video_upload",
  "dubbingProgress": 95,
  "status": "processing",
  "lipSync": {
    "jobId": "syncjob_123",
    "status": "PROCESSING",
    "videoUrl": "",
    "errorMessage": null,
    "type": "standard"
  }
}
```

### Success Status

```json theme={null}
{
  "projectId": "abc123-def456-ghi789",
  "projectName": "My Spanish Translation",
  "originalVideoUrl": "https://storage.voicecheap.ai/...",
  "originalLanguage": "en",
  "targetLanguage": "spanish",
  "duration": 125.5,
  "createdAt": 1702234567890,
  "status": "success",
  "translatedVideoUrl": "https://storage.voicecheap.ai/translated/...",
  "translatedAudioUrl": "https://storage.voicecheap.ai/audio/..."
}
```

### Success Status (Lip Sync Completed)

```json theme={null}
{
  "projectId": "abc123-def456-ghi789",
  "projectName": "My Spanish Translation",
  "originalVideoUrl": "https://storage.voicecheap.ai/...",
  "originalLanguage": "en",
  "targetLanguage": "spanish",
  "duration": 125.5,
  "createdAt": 1702234567890,
  "actualProgressStep": "done",
  "dubbingStep": "done",
  "dubbingProgress": 100,
  "status": "success",
  "translatedVideoUrl": "https://storage.voicecheap.ai/translated/...",
  "translatedAudioUrl": "https://storage.voicecheap.ai/audio/...",
  "lipSync": {
    "jobId": "syncjob_123",
    "status": "COMPLETED",
    "videoUrl": "https://storage.voicecheap.ai/lipsync/...",
    "errorMessage": null,
    "type": "pro"
  }
}
```

### Failed Status

```json theme={null}
{
  "projectId": "abc123-def456-ghi789",
  "projectName": "My Spanish Translation",
  "originalVideoUrl": "https://storage.voicecheap.ai/...",
  "originalLanguage": "en",
  "targetLanguage": "spanish",
  "duration": 125.5,
  "createdAt": 1702234567890,
  "status": "failed",
  "error": {
    "code": "TRANSCRIPTION_FAILED",
    "message": "Could not transcribe the audio. Please ensure the audio quality is sufficient."
  }
}
```

## Polling Best Practices

<Info>
  **Recommended polling interval:** 10-30 seconds

  Translation time varies based on video length and complexity. For a typical 2-minute video, expect 2-5 minutes of processing time.
</Info>

<Warning>
  **Rate Limit:** 30 requests per minute

  Avoid polling more frequently than once every 2 seconds to stay within rate limits.
</Warning>

## Errors

| Status | Code                  | Description                                       |
| ------ | --------------------- | ------------------------------------------------- |
| 401    | `INVALID_API_KEY`     | The provided API key is invalid                   |
| 403    | `FORBIDDEN`           | You don't have access to this project             |
| 404    | `PROJECT_NOT_FOUND`   | The specified project does not exist              |
| 429    | `RATE_LIMIT_EXCEEDED` | Too many requests (limit: 30 requests per minute) |
