Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/samuraigpt/text-to-video-api

Text to Video API generation documentation
https://github.com/samuraigpt/text-to-video-api

ai-video-generator image-to-video image-to-video-generation sora-ai sora-video-ai stable-diffusion text-to-image text-to-video text-to-video-api text-to-video-generation video-diffusion video-diffusion-model video-editing video-generation

Last synced: 6 days ago
JSON representation

Text to Video API generation documentation

Awesome Lists containing this project

README

        

# Text To Video API

### Youtube tutorial -> https://youtu.be/LDBnlO3PDBY

### Medium article -> https://medium.com/@anilmatcha/text-to-video-api-in-python-ai-video-automation-tutorial-561b49241d70

### Steps

To generate a video from text, here are the steps involved

1. Generate an API key from https://viral.vadoo.tv/profile
2. Setup a webhook url at https://viral.vadoo.tv/profile to received generated video metadata

### Python code

Install requests library to send a post request

```pip install requests```

Use the below code to generate a video, the download url of generated video will be sent to the webhook setup
Topic, voice, theme, language and duration are optional but can be customized. More info about these are available here https://docs.vadoo.tv/docs/category/guide

```
import requests

# Replace 'YOUR_API_KEY' with your actual API key
API_KEY = 'YOUR_API_KEY'
url = 'https://viralapi.vadoo.tv/api/generate_video'

# Define the request headers
headers = {
'X-API-KEY': API_KEY,
'Content-Type': 'application/json'
}

# Define the request body parameters
data = {
'topic': 'Random AI Story', # Optional: specify your topic or leave it as the default
'voice': 'Charlie', # Optional: specify the voice or leave it as the default
'theme': 'Hormozi_1', # Optional: specify the theme or leave it as the default
'language': 'English', # Optional: specify the language or leave it as the default
'duration': '30-60' # Optional: specify the duration or leave it as the default
}

# Make the POST request to generate the video
response = requests.post(url, headers=headers, json=data)

# Check if the request was successful
if response.status_code == 200:
response_data = response.json()
print(f"Video ID: {response_data['vid']}")
else:
print(f"Failed to generate video. Status code: {response.status_code}")
print(response.text)
```

Link to app [Text to Video API](https://www.vadoo.tv/text-to-video-api)