Create a character from an uploaded video.
client.videos.createCharacter(VideoCreateCharacterParams { name, video } body, RequestOptionsoptions?): VideoCreateCharacterResponse { id, created_at, name }
POST/videos/characters
Create a character from an uploaded video.
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});
const response = await client.videos.createCharacter({
name: 'x',
video: fs.createReadStream('path/to/file'),
});
console.log(response.id);{
"id": "id",
"created_at": 0,
"name": "name"
}Returns Examples
{
"id": "id",
"created_at": 0,
"name": "name"
}