go/resources/videos/methods/get_character/index.md +0 −62 deleted
File Deleted View Diff
1## Fetch a character.
2
3`client.Videos.GetCharacter(ctx, characterID) (*VideoGetCharacterResponse, error)`
4
5**get** `/videos/characters/{character_id}`
6
7Fetch a character.
8
9### Parameters
10
11- `characterID string`
12
13### Returns
14
15- `type VideoGetCharacterResponse struct{…}`
16
17 - `ID string`
18
19 Identifier for the character creation cameo.
20
21 - `CreatedAt int64`
22
23 Unix timestamp (in seconds) when the character was created.
24
25 - `Name string`
26
27 Display name for the character.
28
29### Example
30
31```go
32package main
33
34import (
35 "context"
36 "fmt"
37
38 "github.com/openai/openai-go"
39 "github.com/openai/openai-go/option"
40)
41
42func main() {
43 client := openai.NewClient(
44 option.WithAPIKey("My API Key"),
45 )
46 response, err := client.Videos.GetCharacter(context.TODO(), "char_123")
47 if err != nil {
48 panic(err.Error())
49 }
50 fmt.Printf("%+v\n", response.ID)
51}
52```
53
54#### Response
55
56```json
57{
58 "id": "id",
59 "created_at": 0,
60 "name": "name"
61}
62```