File size: 2,084 Bytes
68f0d00
0394237
 
 
 
 
 
5563f7a
0394237
 
 
5563f7a
 
 
 
 
 
0394237
 
 
 
 
68f0d00
0394237
 
 
 
cf82634
 
0394237
8587111
 
 
c046d6a
2ccb8b7
 
7e697b3
8587111
 
c046d6a
 
 
 
 
 
 
 
 
d91347c
3dd03bf
68f0d00
0394237
c85d498
0394237
c85d498
5563f7a
3d92052
c85d498
5563f7a
 
c85d498
 
3d92052
c85d498
 
5563f7a
c85d498
 
 
3d92052
c85d498
 
5563f7a
 
 
 
2ccb8b7
5563f7a
 
 
 
2ccb8b7
0394237
 
 
 
 
 
 
 
 
 
 
 
 
 
428a256
 
 
 
 
 
 
 
 
 
0394237
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# @aitube/api-client

*Official API client for AiTube.at*

## ATTENTION

AiTube is currently in heavy development, and for the moment
the API client is reserved for *private use* (it is used by AI Stories Factory).

We are sorry for any inconvenience this might cause.

## Caveats

The official domain for AiTube is `aitube.at`, however right now
the Hugging Face Space is not configured to use this as a domain,
so we need to perform all API calls to `jbilcke-hf-ai-tube.hf.space`.

## Installation

To install the package, run the following command:

```bash
npm install @aitube/api-client
```

## Getting Started

Note: to overridethe AiTube API URL, set this env var: `AITUBE_URL`

```typescript
import {
  createClap,
  editClapDialogues,
  editClapEntities,
  editClapMusic,
  editClapSounds,
  editClapStory,
  editClapStoryboards,
  editClapVideos,
  exportClapToVideo,
  defaultAitubeHostname,
  defaultClapWidth,
  defaultClapHeight,
  defaultExportFormat,
  aitubeUrl,
  aitubeApiVersion,
  aitubeApiUrl,
  ClapEntityPrompt,
  SupportedExportFormat,
  applyClapCompletion,
 } from '@aitube/api-client'

const ultraSecret = "ultra secret token unavailable to common mortals"

const basicClap = await createClap({
  prompt: "story about a dog",
  turbo: false,
  token: ultraSecret
})

const illustratedClap = await editClapStoryboards({
  clap: basicClap,
  turbo: false,
  token: ultraSecret
})

const mp4VideoFile = await exportClapToVideo({
  clap: illustratedClap,
  format: "mp4",
  turbo: false,
  token: ultraSecret
})
```

## Customizing the server

The hostname can be overriden by defining the `AITUBE_URL` environment variable.

eg:

```bash
AITUBE_URL=http://localhost:3000
```

## Build Instructions

Install [Bun](https://bun.sh/)

Run the following commands:

```bash
bun install

bun run build
```

To publish:

```bash
bun run build

bun run build:declaration

bun run publish
```

## Contributing

We welcome contributions! Please feel free to submit a pull request.

## License

This package is under the MIT License. See `LICENSE` file for more details.