Captions
Download SpecRetrieve a caption
Retrieve a caption for a video in a specific language.
apiKey
videoId
string
required
The unique identifier for the video you want captions for.
- Example
- "vi4k0jvEUuaTdRAEjQ4Prklg"
language
string
required
A valid BCP 47 language representation
- Example
- "en"
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/CaptionsApi.md#get
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/CaptionsApi.md#get
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want captions for.
const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation
const caption = await client.captions.get(videoId, language);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/CaptionsApi.md#get
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique identifier for the video you want captions for.
= # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation
# example passing only required values which don't have defaults set
# Show a caption
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/CaptionsApi.md#get
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/CaptionsApi.md#get
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class getExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var videoId = vi4k0jvEUuaTdRAEjQ4Prklg; // string | The unique identifier for the video you want captions for.
var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation
var apiCaptionsInstance = apiInstance.Captions();
try
{
// Show a caption
Caption result = apiCaptionsInstance.get(videoId, language);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CaptionsApi.get: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/CaptionsAPI.md#get
Response
Success
Not Found
default
boolean
Whether you will have subtitles or not. True for yes you will have subtitles, false for no you will not have subtitles.
- Default
- false
- Example
- false
src
string
srclang
string
uri
string
name
string
status
int
title
string
type
string
Upload a caption
Upload a VTT file to add captions to your video. More information can be found here
apiKey
videoId
string
required
The unique identifier for the video you want to add a caption to.
- Example
- "vi4k0jvEUuaTdRAEjQ4Prklg"
language
string
required
A valid BCP 47 language representation.
- Example
- "en"
file
string
binary
required
The video text track (VTT) you want to upload.
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/CaptionsApi.md#upload
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/CaptionsApi.md#upload
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want to add a caption to.
const language = 'en'; // A valid BCP 47 language representation.
const file = './en.vtt'; // The video text track (VTT) you want to upload.
const caption = await client.captions.upload(videoId, language, file);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/CaptionsApi.md#upload
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique identifier for the video you want to add a caption to.
= # str | A valid BCP 47 language representation.
= # file_type | The video text track (VTT) you want to upload.
# example passing only required values which don't have defaults set
# Upload a caption
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/CaptionsApi.md#upload
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/CaptionsApi.md#upload
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class uploadExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var videoId = vi4k0jvEUuaTdRAEjQ4Prklg; // string | The unique identifier for the video you want to add a caption to.
var language = en; // string | A valid BCP 47 language representation.
var file = BINARY_DATA_HERE; // System.IO.Stream | The video text track (VTT) you want to upload.
var apiCaptionsInstance = apiInstance.Captions();
try
{
// Upload a caption
Caption result = apiCaptionsInstance.upload(videoId, language, file);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CaptionsApi.upload: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/CaptionsAPI.md#upload
Response
Success
Bad Request
Not Found
default
boolean
Whether you will have subtitles or not. True for yes you will have subtitles, false for no you will not have subtitles.
- Default
- false
- Example
- false
src
string
srclang
string
uri
string
name
string
The name of the parameter that caused the error.
problems
array[object (BadRequest)]
Returns any additional problems in the request in an array of objects.
BadRequest
object (BadRequest)
name
string
The name of the parameter that caused the error.
status
int
The HTTP status code.
title
string
A description of the error that occurred.
type
string
A link to the error documentation.
status
int
The HTTP status code.
title
string
A description of the error that occurred.
type
string
A link to the error documentation.
name
string
status
int
title
string
type
string
Delete a caption
Delete a caption in a specific language by by video id.
apiKey
videoId
string
required
The unique identifier for the video you want to delete a caption from.
- Example
- "vi4k0jvEUuaTdRAEjQ4Prklgc"
language
string
required
A valid BCP 47 language representation.
- Example
- "en"
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/CaptionsApi.md#delete
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/CaptionsApi.md#delete
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklgc'; // The unique identifier for the video you want to delete a caption from.
const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
await client.captions.delete(videoId, language);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/CaptionsApi.md#delete
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique identifier for the video you want to delete a caption from.
= # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
# example passing only required values which don't have defaults set
# Delete a caption
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/CaptionsApi.md#delete
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/CaptionsApi.md#delete
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class deleteExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var videoId = vi4k0jvEUuaTdRAEjQ4Prklgc; // string | The unique identifier for the video you want to delete a caption from.
var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
var apiCaptionsInstance = apiInstance.Captions();
try
{
// Delete a caption
apiCaptionsInstance.delete(videoId, language);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CaptionsApi.delete: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/CaptionsAPI.md#delete
Response
No Content
Empty response
Not Found
No schema
name
string
status
int
title
string
type
string
apiKey
videoId
string
required
The unique identifier for the video you want to have automatic captions for.
- Example
- "vi4k0jvEUuaTdRAEjQ4Prklg"
language
string
required
A valid BCP 47 language representation.
- Example
- "en"
default
boolean
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/CaptionsApi.md#update
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/CaptionsApi.md#update
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want to have automatic captions for.
const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
const captionsUpdatePayload = {
_default: true,
};
const caption = await client.captions.update(videoId, language, captionsUpdatePayload);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/CaptionsApi.md#update
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique identifier for the video you want to have automatic captions for.
= # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
= # CaptionsUpdatePayload |
# example passing only required values which don't have defaults set
# Update caption
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/CaptionsApi.md#update
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/CaptionsApi.md#update
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class updateExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var videoId = vi4k0jvEUuaTdRAEjQ4Prklg; // string | The unique identifier for the video you want to have automatic captions for.
var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
var captionsUpdatePayload = new CaptionsUpdatePayload(); // CaptionsUpdatePayload |
var apiCaptionsInstance = apiInstance.Captions();
try
{
// Update caption
Caption result = apiCaptionsInstance.update(videoId, language, captionsUpdatePayload);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CaptionsApi.update: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/CaptionsAPI.md#update
Response
Success
Bad Request
Not Found
default
boolean
Whether you will have subtitles or not. True for yes you will have subtitles, false for no you will not have subtitles.
- Default
- false
- Example
- false
src
string
srclang
string
uri
string
name
string
The name of the parameter that caused the error.
problems
array[object (BadRequest)]
Returns any additional problems in the request in an array of objects.
BadRequest
object (BadRequest)
name
string
The name of the parameter that caused the error.
status
int
The HTTP status code.
title
string
A description of the error that occurred.
type
string
A link to the error documentation.
status
int
The HTTP status code.
title
string
A description of the error that occurred.
type
string
A link to the error documentation.
name
string
status
int
title
string
type
string
List video captions
Retrieve a list of available captions by video id.
apiKey
videoId
string
required
The unique identifier for the video you want to retrieve a list of captions for.
- Example
- "vi4k0jvEUuaTdRAEjQ4Prklg"
currentPage
int
Choose the number of search results to return per page. Minimum value: 1
- Default
- 1
- Example
- 2
pageSize
int
Results per page. Allowed values 1-100, default is 25.
- Default
- 25
- Example
- 30
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/CaptionsApi.md#list
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/CaptionsApi.md#list
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const captions = await client.captions.list({
videoId 'vi4k0jvEUuaTdRAEjQ4Prklg', // The unique identifier for the video you want to retrieve a list of captions for.
currentPage: 2, // Choose the number of search results to return per page. Minimum value: 1
pageSize: 30, // Results per page. Allowed values 1-100, default is 25.
);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/CaptionsApi.md#list
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique identifier for the video you want captions for.
= # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation
# example passing only required values which don't have defaults set
# Show a caption
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/CaptionsApi.md#list
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/CaptionsApi.md#list
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class getExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var videoId = vi4k0jvEUuaTdRAEjQ4Prklg; // string | The unique identifier for the video you want captions for.
var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation
var apiCaptionsInstance = apiInstance.Captions();
try
{
// Show a caption
Caption result = apiCaptionsInstance.get(videoId, language);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CaptionsApi.get: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/CaptionsAPI.md#list
Response
Success
Not Found
data
array[object (Caption)]
required
Caption
object (Caption)
default
boolean
Whether you will have subtitles or not. True for yes you will have subtitles, false for no you will not have subtitles.
- Default
- false
- Example
- false
src
string
srclang
string
uri
string
pagination
object (pagination)
required
- Example
- { "currentPage": 3, "currentPageItems": 20, "itemsTotal": 123, "links": { "first": { "rel": "first", "uri": "/videos/search?currentPage=1&pageSize=20" }, "last": { "rel": "last", "uri": "/videos/search?currentPage=6&pageSize=20" }, "next": { "rel": "next", "uri": "/videos/search?currentPage=4&pageSize=20" }, "previous": { "rel": "previous", "uri": "/videos/search?currentPage=2&pageSize=20" } }, "pageSize": 20, "pagesTotal": 7 }
currentPage
int
The current page index.
currentPageItems
int
The number of items on the current page.
itemsTotal
int
Total number of items that exist.
links
array[object (PaginationLink)]
required
PaginationLink
object (PaginationLink)
rel
string
uri
string
uri
pageSize
int
Maximum number of item per page.
pagesTotal
int
Number of items listed in the current page.
name
string
status
int
title
string
type
string
Was this page helpful?