Fetch a character.
client.Videos.GetCharacter(ctx, characterID) (*VideoGetCharacterResponse, error)
get /videos/characters/{character_id}
Fetch a character.
Parameters
characterID string
Returns
-
type VideoGetCharacterResponse struct{…}-
ID stringIdentifier for the character creation cameo.
-
CreatedAt int64Unix timestamp (in seconds) when the character was created.
-
Name stringDisplay name for the character.
-
Example
package main
import (
"context"
"fmt"
"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.GetCharacter(context.TODO(), "char_123")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.ID)
}
Response
{
"id": "id",
"created_at": 0,
"name": "name"
}