# StorageVideosCaptionsApi

All URIs are relative to *https://admin-api.connected.dev*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**deleteVideoCaption**](#deletevideocaption) | **DELETE** /videos/{videoId}/captions/{language} | Delete a video\&#39;s caption track|
|[**downloadVideoCaption**](#downloadvideocaption) | **GET** /videos/{videoId}/captions/{language}/download | Download a video\&#39;s caption file|
|[**generateVideoCaptions**](#generatevideocaptions) | **POST** /videos/{videoId}/captions/{language}/generate | Auto-generate captions for a video|
|[**getVideoCaptions**](#getvideocaptions) | **GET** /videos/{videoId}/captions | List a video\&#39;s captions|
|[**uploadVideoCaptions**](#uploadvideocaptions) | **PUT** /videos/{videoId}/captions/{language} | Upload a caption file for a video|

# **deleteVideoCaption**
> CreateAccountInvitations200Response deleteVideoCaption()

Deletes the caption track for the given language from a video on Cloudflare Stream; requires the update and read permissions on the storage module.

### Example

```typescript
import {
    StorageVideosCaptionsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new StorageVideosCaptionsApi(configuration);

let videoId: string; //The video identifier (default to undefined)
let language: string; //The language identifier (default to undefined)

const { status, data } = await apiInstance.deleteVideoCaption(
    videoId,
    language
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **videoId** | [**string**] | The video identifier | defaults to undefined|
| **language** | [**string**] | The language identifier | defaults to undefined|


### Return type

**CreateAccountInvitations200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **downloadVideoCaption**
> SyncAccounts200Response downloadVideoCaption()

Fetches the caption track for the given language as a WebVTT (.vtt) file for a video; requires the read permission on the storage module.

### Example

```typescript
import {
    StorageVideosCaptionsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new StorageVideosCaptionsApi(configuration);

let videoId: string; //The video identifier (default to undefined)
let language: string; //The language identifier (default to undefined)

const { status, data } = await apiInstance.downloadVideoCaption(
    videoId,
    language
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **videoId** | [**string**] | The video identifier | defaults to undefined|
| **language** | [**string**] | The language identifier | defaults to undefined|


### Return type

**SyncAccounts200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **generateVideoCaptions**
> UploadVideoCaptions200Response generateVideoCaptions()

Triggers AI speech-to-text caption generation for a video in the given BCP 47 language (one of cs, nl, en, fr, de, it, ja, ko, pl, pt, ru, es); requires the update and read permissions on the storage module.

### Example

```typescript
import {
    StorageVideosCaptionsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new StorageVideosCaptionsApi(configuration);

let videoId: string; //The video identifier (default to undefined)
let language: string; //The language identifier (default to undefined)

const { status, data } = await apiInstance.generateVideoCaptions(
    videoId,
    language
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **videoId** | [**string**] | The video identifier | defaults to undefined|
| **language** | [**string**] | The language identifier | defaults to undefined|


### Return type

**UploadVideoCaptions200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getVideoCaptions**
> GetVideoCaptions200Response getVideoCaptions()

Returns a paginated list of caption/subtitle tracks uploaded or generated for the given video, with support for search and ordering; requires \"read\" permission on \"storage\".

### Example

```typescript
import {
    StorageVideosCaptionsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new StorageVideosCaptionsApi(configuration);

let videoId: string; //The video identifier (default to undefined)
let page: number; //Page number (optional) (default to 1)
let pageSize: number; //Number of items per page (optional) (default to 25)
let orderBy: string; //Field to order by (optional) (default to undefined)
let search: string; //Search query (optional) (default to undefined)

const { status, data } = await apiInstance.getVideoCaptions(
    videoId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **videoId** | [**string**] | The video identifier | defaults to undefined|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **pageSize** | [**number**] | Number of items per page | (optional) defaults to 25|
| **orderBy** | [**string**] | Field to order by | (optional) defaults to undefined|
| **search** | [**string**] | Search query | (optional) defaults to undefined|


### Return type

**GetVideoCaptions200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **uploadVideoCaptions**
> UploadVideoCaptions200Response uploadVideoCaptions(uploadVideoCaptionsRequest)

Uploads a WebVTT caption file (as base64 or a data URI) for a video in the given language, creating or replacing the caption track on Cloudflare Stream; requires the update and read permissions on the storage module.

### Example

```typescript
import {
    StorageVideosCaptionsApi,
    Configuration,
    UploadVideoCaptionsRequest
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new StorageVideosCaptionsApi(configuration);

let videoId: string; //The video identifier (default to undefined)
let language: string; //The language identifier (default to undefined)
let uploadVideoCaptionsRequest: UploadVideoCaptionsRequest; //

const { status, data } = await apiInstance.uploadVideoCaptions(
    videoId,
    language,
    uploadVideoCaptionsRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **uploadVideoCaptionsRequest** | **UploadVideoCaptionsRequest**|  | |
| **videoId** | [**string**] | The video identifier | defaults to undefined|
| **language** | [**string**] | The language identifier | defaults to undefined|


### Return type

**UploadVideoCaptions200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

