Skip to content
Primary navigation

Fetch a character.

client.Videos.GetCharacter(ctx, characterID) (*VideoGetCharacterResponse, error)
GET/videos/characters/{character_id}

Fetch a character.

ParametersExpand Collapse
characterID string
ReturnsExpand Collapse
type VideoGetCharacterResponse struct{…}
ID string

Identifier for the character creation cameo.

CreatedAt int64

Unix timestamp (in seconds) when the character was created.

Name string

Display name for the character.

Fetch a character.

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)
}
{
  "id": "id",
  "created_at": 0,
  "name": "name"
}
Returns Examples
{
  "id": "id",
  "created_at": 0,
  "name": "name"
}