Official API client for AiTube.at
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.
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
.
To install the package, run the following command:
npm install @aitube/client
Note: to overridethe AiTube API URL, set this env var: AITUBE_URL
import {
createClap,
editClapDialogues,
editClapEntities,
editClapMusic,
editClapSounds,
editClapStory,
editClapStoryboards,
editClapVideos,
exportClapToVideo,
defaultAitubeHostname,
defaultClapWidth,
defaultClapHeight,
defaultExportFormat,
aitubeUrl,
aitubeApiVersion,
aitubeApiUrl,
ClapEntityPrompt,
SupportedExportFormat,
applyClapCompletion,
} from '@aitube/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
})
The hostname can be overriden by defining the AITUBE_URL
environment variable.
eg:
AITUBE_URL=http://localhost:3000
Install Bun
Run the following commands:
bun install
bun run build
To publish:
bun run build
bun run build:declaration
bun run publish
We welcome contributions! Please feel free to submit a pull request.
This package is under the MIT License. See LICENSE
file for more details.