Create a character from an uploaded video.
client.Videos.NewCharacter(ctx, body) (*VideoNewCharacterResponse, error)
POST/videos/characters
Create a character from an uploaded video.
package main
import (
"bytes"
"context"
"fmt"
"io"
"github.com/openai/openai-go"
"github.com/openai/openai-go/option"
)
func main() {
client := openai.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Videos.NewCharacter(context.TODO(), openai.VideoNewCharacterParams{
Name: "x",
Video: io.Reader(bytes.NewBuffer([]byte("Example data"))),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.ID)
}
{
"id": "id",
"created_at": 0,
"name": "name"
}Returns Examples
{
"id": "id",
"created_at": 0,
"name": "name"
}