curl --request POST \
--url https://api.creatify.ai/api/ai_shorts/preview/ \
--header 'Content-Type: application/json' \
--header 'X-API-ID: <api-key>' \
--header 'X-API-KEY: <api-key>' \
--data '{
"aspect_ratio": "9x16",
"script": "<string>",
"style": "4K realistic",
"accent": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"caption_setting": {
"style": "normal-black",
"offset": {
"x": 0,
"y": 0.4
},
"font_family": "Montserrat",
"font_size": 70,
"font_style": "font-bold",
"background_color": "<string>",
"text_color": "<string>",
"highlight_text_color": "<string>",
"max_width": 123,
"line_height": 123,
"text_shadow": "<string>",
"hidden": false
},
"background_music_url": "<string>",
"background_music_volume": 0.5,
"voiceover_volume": 0.5,
"webhook_url": "<string>"
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"failed_reason": "<string>",
"video_output": "<string>",
"preview": "<string>",
"editor_url": "<string>",
"is_hidden": true,
"progress": 123,
"credits_used": 123,
"duration": 123,
"media_job": "<string>",
"permission_type": "private",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"script": "<string>",
"aspect_ratio": "9x16",
"style": "4K realistic",
"created_from_api": true,
"caption_setting": "<any>",
"background_music_url": "<string>",
"background_music_volume": 0.5,
"voiceover_volume": 0.5,
"webhook_url": "<string>",
"user": 123,
"workspace": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accent": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
This endpoint generates a preiview of AI Shorts video before redering the final video. Generating a video preview through this endpoint costs 1 credit for every 30 seconds.
curl --request POST \
--url https://api.creatify.ai/api/ai_shorts/preview/ \
--header 'Content-Type: application/json' \
--header 'X-API-ID: <api-key>' \
--header 'X-API-KEY: <api-key>' \
--data '{
"aspect_ratio": "9x16",
"script": "<string>",
"style": "4K realistic",
"accent": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"caption_setting": {
"style": "normal-black",
"offset": {
"x": 0,
"y": 0.4
},
"font_family": "Montserrat",
"font_size": 70,
"font_style": "font-bold",
"background_color": "<string>",
"text_color": "<string>",
"highlight_text_color": "<string>",
"max_width": 123,
"line_height": 123,
"text_shadow": "<string>",
"hidden": false
},
"background_music_url": "<string>",
"background_music_volume": 0.5,
"voiceover_volume": 0.5,
"webhook_url": "<string>"
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"failed_reason": "<string>",
"video_output": "<string>",
"preview": "<string>",
"editor_url": "<string>",
"is_hidden": true,
"progress": 123,
"credits_used": 123,
"duration": 123,
"media_job": "<string>",
"permission_type": "private",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"script": "<string>",
"aspect_ratio": "9x16",
"style": "4K realistic",
"created_from_api": true,
"caption_setting": "<any>",
"background_music_url": "<string>",
"background_music_volume": 0.5,
"voiceover_volume": 0.5,
"webhook_url": "<string>",
"user": 123,
"workspace": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accent": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
import requests
url = "https://api.creatify.ai/api/ai_shorts/preview/"
payload = {
"script": "Meet the Tesla Model X, where cutting-edge technology meets unparalleled performance. Designed with luxury and comfort in mind, the Model X offers a driving experience like no other.",
"aspect_ratio": "9x16",
"style": "4K realistic"
}
headers = {
"X-API-ID": "<your-x-api-id>",
"X-API-KEY": "<your-x-api-key>",
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
id
of the AI Shorts video. Then you can check the preview status of your video by sending a GET request to Get AI Shorts video by id endpoint.
import requests
url = "https://api.creatify.ai/api/ai_shorts/{id}/"
headers = {
"X-API-ID": "<your-x-api-id>",
"X-API-KEY": "<your-x-api-key>"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
preview
field. Then you can render the video by sending a POST request to Render a AI Shorts video endpoint.
import requests
url = "https://api.creatify.ai/api/ai_shorts/{id}/render/"
payload = {}
headers = {
"X-API-ID": "<your-x-api-id>",
"X-API-KEY": "<your-x-api-key>",
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
import requests
url = "https://api.creatify.ai/api/ai_shorts/{id}/"
headers = {
"X-API-ID": "<your-x-api-id>",
"X-API-KEY": "<your-x-api-key>"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
status
to be done
when finished. Meanwhile you can find the video output in video_output
field.API ID, from your settings page.
API Key, from your settings page.
The response is of type object
.