Guides & Tutorials
Last updated
Last updated
Below are some practical examples showcasing how ShortGenius’s endpoints can be combined to build powerful AI-driven workflows. Each guide walks you through a common use case step by step.
Use Case: You have a short script or educational text and want to turn it into an interactive quiz video.
Step 1: Prepare Your Script
You have a script that looks like this (simplified):
"Water is essential for all living organisms. Humans should drink about 2 liters a day..."
Step 2: Convert into Scenes (Optional)
You can first test how the script would be split into scenes by using POST /videos/drafts/script
. While not strictly necessary for a quiz, it’s helpful to see a standard draft.
curl --request POST \
--url "https://shortgenius.com/api/v1/videos/drafts/script" \
--header "Authorization: Bearer YOUR_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"script": "Water is essential for all living organisms. Humans should drink about 2 liters a day..."
}'
Step 3: Draft a Quiz Video
Now, use POST /videos/drafts/quiz
to create a quiz:
curl --request POST \
--url "https://shortgenius.com/api/v1/videos/drafts/quiz" \
--header "Authorization: Bearer YOUR_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"topic": "Hydration Best Practices",
"locale": "en-US"
This returns quiz-specific data:
{
"title": "Test Your Water Knowledge",
"caption": "Are you a water expert?",
"quiz": {
"questions": [...],
"results": {...}
}
}
Step 4: Create the Final Quiz Video
When you’re satisfied with the quiz questions, pass them to POST /videos
:
curl --request POST \
--url "https://shortgenius.com/api/v1/videos" \
--header "Authorization: Bearer YOUR_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"content_type": "Quiz",
"locale": "en-US",
ShortGenius will generate an interactive quiz video, ready to share or schedule.
Use Case: You want an AI-generated video summarizing current events on a particular topic.
Step 1: Draft a News Video
Use POST /videos/drafts/news
to fetch recent headlines and create scenes:
curl --request POST \
--url "https://shortgenius.com/api/v1/videos/drafts/news" \
--header "Authorization: Bearer YOUR_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"topic": "Latest Tech News",
"locale": "en-US"
Step 2: Review Scenes
Check the returned scenes
array, which might have headlines and short text for each scene.
If you see something you don’t like, you can edit the scene content, or omit certain headlines.
Step 3: Finalize Video
Send the edited scenes
to POST /videos
:
ShortGenius will generate and (optionally) publish your tech news video.
Use Case: You need to generate multiple videos (e.g., an educational series) with minimal manual effort.
Step 1: Generate Video Topics
Start by using POST /videos/topics
to generate a list of potential video titles:
curl --request POST \
--url "https://shortgenius.com/api/v1/videos/topics" \
--header "Authorization: Bearer YOUR_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"parent_topic": "Mental Health",
"locale": "en-US",
This returns about 10 related topics you can use.
Step 2: Draft Each Topic
Loop through each topic and POST /videos/drafts
to create a draft script. Pseudocode:
const topics = [
/* from the /videos/topics response */
]
for (const t of topics) {
const draft = await fetch('https://shortgenius.com/api/v1/videos/drafts', {
Step 3: Create Final Videos
Once each draft is confirmed, send them to POST /videos
with your connection IDs to automatically schedule.
Optionally, store the video IDs for tracking or later reference.
Use Case: You want to create custom AI-generated images and place them into specific scenes for a more visually appealing video.
Step 1: Generate an Image
Use POST /images
:
curl --request POST \
--url "https://shortgenius.com/api/v1/images" \
--header "Authorization: Bearer YOUR_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"prompt": "A majestic snowy mountain under a sunrise",
"aspect_ratio": "9:16",
"wait_for_generation": true
}'
Step 2: Retrieve the Image ID
In the response, you’ll see an id
and (if ready) a url
:
{
"id": "b2f08f0c-xxxx-xxxx-xxxx-ab8a88d12222",
"url": "https://cdn.shortgenius.com/images/b2f08f0c.jpg",
...
}
Step 3: Attach Image to a Video Scene
When drafting a video or creating a final video, reference the newly generated image. Here’s an example:
Now your scene uses the custom AI image (first_image_id
) and still generates a second image automatically.
These guides demonstrate how ShortGenius’s various endpoints work together to create dynamic, AI-driven content. Whether you’re making quiz-style videos, summarizing news, generating images, or scheduling a content series, ShortGenius has you covered.
Happy Building!
{
"scenes": [
{
"title": "Mountain Scene",
"caption": "This mountain stands tall at sunrise.",
"first_image_id": "b2f08f0c-xxxx-xxxx-xxxx-ab8a88d12222",
"second_image_description": "A hiker standing at the peak"
}
]
}
curl --request POST \
--url "https://shortgenius.com/api/v1/videos" \
--header "Authorization: Bearer YOUR_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"content_type": "News",
"locale": "en-US",
"connection_ids": ["<CONNECTION-ID>"],
"title": "Weekly Tech Recap",
"caption": "Your quick update on the latest in technology",
"scenes": [
{
"title": "Apple Releases New Device",
"caption": "Apple announces new product line..."
},
...
]
}'