Skip to main content
POST
/
video_settings_templates
/
preview
Preview video settings template
curl --request POST \
  --url https://api.beyondwords.io/v1/video_settings_templates/preview \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "logo_image_url": "<string>",
  "background_color": "<string>",
  "text_background_color": "<string>",
  "text_background_radius": 50,
  "text_color": "<string>",
  "text_secondary_color": "<string>",
  "text_highlight_color": "<string>",
  "text_highlight_secondary_color": "<string>",
  "text_highlight_background_color": "<string>",
  "text_highlight_secondary_background_color": "<string>",
  "text_highlight_background_radius": 50,
  "text_shadow": "<string>",
  "text_highlight_shadow": "<string>",
  "text_stroke": "<string>",
  "text_highlight_stroke": "<string>",
  "text_fonts": [
    "<string>"
  ],
  "text_font_size": 60,
  "text_width": 0.5,
  "text_lines": 3,
  "text_words": 2,
  "text_horizontal_offset": 123,
  "text_vertical_offset": 123,
  "waveform_color": "<string>",
  "content_image_enabled": true,
  "image_extraction_enabled": true,
  "pan_and_zoom_enabled": true,
  "audio_and_waveform_enabled": true,
  "text_captions_enabled": true,
  "cycle_time": 30500,
  "width": 123,
  "height": 123
}
'
import requests

url = "https://api.beyondwords.io/v1/video_settings_templates/preview"

payload = {
"logo_image_url": "<string>",
"background_color": "<string>",
"text_background_color": "<string>",
"text_background_radius": 50,
"text_color": "<string>",
"text_secondary_color": "<string>",
"text_highlight_color": "<string>",
"text_highlight_secondary_color": "<string>",
"text_highlight_background_color": "<string>",
"text_highlight_secondary_background_color": "<string>",
"text_highlight_background_radius": 50,
"text_shadow": "<string>",
"text_highlight_shadow": "<string>",
"text_stroke": "<string>",
"text_highlight_stroke": "<string>",
"text_fonts": ["<string>"],
"text_font_size": 60,
"text_width": 0.5,
"text_lines": 3,
"text_words": 2,
"text_horizontal_offset": 123,
"text_vertical_offset": 123,
"waveform_color": "<string>",
"content_image_enabled": True,
"image_extraction_enabled": True,
"pan_and_zoom_enabled": True,
"audio_and_waveform_enabled": True,
"text_captions_enabled": True,
"cycle_time": 30500,
"width": 123,
"height": 123
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
logo_image_url: '<string>',
background_color: '<string>',
text_background_color: '<string>',
text_background_radius: 50,
text_color: '<string>',
text_secondary_color: '<string>',
text_highlight_color: '<string>',
text_highlight_secondary_color: '<string>',
text_highlight_background_color: '<string>',
text_highlight_secondary_background_color: '<string>',
text_highlight_background_radius: 50,
text_shadow: '<string>',
text_highlight_shadow: '<string>',
text_stroke: '<string>',
text_highlight_stroke: '<string>',
text_fonts: ['<string>'],
text_font_size: 60,
text_width: 0.5,
text_lines: 3,
text_words: 2,
text_horizontal_offset: 123,
text_vertical_offset: 123,
waveform_color: '<string>',
content_image_enabled: true,
image_extraction_enabled: true,
pan_and_zoom_enabled: true,
audio_and_waveform_enabled: true,
text_captions_enabled: true,
cycle_time: 30500,
width: 123,
height: 123
})
};

fetch('https://api.beyondwords.io/v1/video_settings_templates/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.beyondwords.io/v1/video_settings_templates/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'logo_image_url' => '<string>',
'background_color' => '<string>',
'text_background_color' => '<string>',
'text_background_radius' => 50,
'text_color' => '<string>',
'text_secondary_color' => '<string>',
'text_highlight_color' => '<string>',
'text_highlight_secondary_color' => '<string>',
'text_highlight_background_color' => '<string>',
'text_highlight_secondary_background_color' => '<string>',
'text_highlight_background_radius' => 50,
'text_shadow' => '<string>',
'text_highlight_shadow' => '<string>',
'text_stroke' => '<string>',
'text_highlight_stroke' => '<string>',
'text_fonts' => [
'<string>'
],
'text_font_size' => 60,
'text_width' => 0.5,
'text_lines' => 3,
'text_words' => 2,
'text_horizontal_offset' => 123,
'text_vertical_offset' => 123,
'waveform_color' => '<string>',
'content_image_enabled' => true,
'image_extraction_enabled' => true,
'pan_and_zoom_enabled' => true,
'audio_and_waveform_enabled' => true,
'text_captions_enabled' => true,
'cycle_time' => 30500,
'width' => 123,
'height' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.beyondwords.io/v1/video_settings_templates/preview"

payload := strings.NewReader("{\n \"logo_image_url\": \"<string>\",\n \"background_color\": \"<string>\",\n \"text_background_color\": \"<string>\",\n \"text_background_radius\": 50,\n \"text_color\": \"<string>\",\n \"text_secondary_color\": \"<string>\",\n \"text_highlight_color\": \"<string>\",\n \"text_highlight_secondary_color\": \"<string>\",\n \"text_highlight_background_color\": \"<string>\",\n \"text_highlight_secondary_background_color\": \"<string>\",\n \"text_highlight_background_radius\": 50,\n \"text_shadow\": \"<string>\",\n \"text_highlight_shadow\": \"<string>\",\n \"text_stroke\": \"<string>\",\n \"text_highlight_stroke\": \"<string>\",\n \"text_fonts\": [\n \"<string>\"\n ],\n \"text_font_size\": 60,\n \"text_width\": 0.5,\n \"text_lines\": 3,\n \"text_words\": 2,\n \"text_horizontal_offset\": 123,\n \"text_vertical_offset\": 123,\n \"waveform_color\": \"<string>\",\n \"content_image_enabled\": true,\n \"image_extraction_enabled\": true,\n \"pan_and_zoom_enabled\": true,\n \"audio_and_waveform_enabled\": true,\n \"text_captions_enabled\": true,\n \"cycle_time\": 30500,\n \"width\": 123,\n \"height\": 123\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.beyondwords.io/v1/video_settings_templates/preview")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"logo_image_url\": \"<string>\",\n \"background_color\": \"<string>\",\n \"text_background_color\": \"<string>\",\n \"text_background_radius\": 50,\n \"text_color\": \"<string>\",\n \"text_secondary_color\": \"<string>\",\n \"text_highlight_color\": \"<string>\",\n \"text_highlight_secondary_color\": \"<string>\",\n \"text_highlight_background_color\": \"<string>\",\n \"text_highlight_secondary_background_color\": \"<string>\",\n \"text_highlight_background_radius\": 50,\n \"text_shadow\": \"<string>\",\n \"text_highlight_shadow\": \"<string>\",\n \"text_stroke\": \"<string>\",\n \"text_highlight_stroke\": \"<string>\",\n \"text_fonts\": [\n \"<string>\"\n ],\n \"text_font_size\": 60,\n \"text_width\": 0.5,\n \"text_lines\": 3,\n \"text_words\": 2,\n \"text_horizontal_offset\": 123,\n \"text_vertical_offset\": 123,\n \"waveform_color\": \"<string>\",\n \"content_image_enabled\": true,\n \"image_extraction_enabled\": true,\n \"pan_and_zoom_enabled\": true,\n \"audio_and_waveform_enabled\": true,\n \"text_captions_enabled\": true,\n \"cycle_time\": 30500,\n \"width\": 123,\n \"height\": 123\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.beyondwords.io/v1/video_settings_templates/preview")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"logo_image_url\": \"<string>\",\n \"background_color\": \"<string>\",\n \"text_background_color\": \"<string>\",\n \"text_background_radius\": 50,\n \"text_color\": \"<string>\",\n \"text_secondary_color\": \"<string>\",\n \"text_highlight_color\": \"<string>\",\n \"text_highlight_secondary_color\": \"<string>\",\n \"text_highlight_background_color\": \"<string>\",\n \"text_highlight_secondary_background_color\": \"<string>\",\n \"text_highlight_background_radius\": 50,\n \"text_shadow\": \"<string>\",\n \"text_highlight_shadow\": \"<string>\",\n \"text_stroke\": \"<string>\",\n \"text_highlight_stroke\": \"<string>\",\n \"text_fonts\": [\n \"<string>\"\n ],\n \"text_font_size\": 60,\n \"text_width\": 0.5,\n \"text_lines\": 3,\n \"text_words\": 2,\n \"text_horizontal_offset\": 123,\n \"text_vertical_offset\": 123,\n \"waveform_color\": \"<string>\",\n \"content_image_enabled\": true,\n \"image_extraction_enabled\": true,\n \"pan_and_zoom_enabled\": true,\n \"audio_and_waveform_enabled\": true,\n \"text_captions_enabled\": true,\n \"cycle_time\": 30500,\n \"width\": 123,\n \"height\": 123\n}"

response = http.request(request)
puts response.read_body

Authorizations

X-Api-Key
string
header
required

Body

application/json
logo_image_url
string<uri> | null

The logo that should appear in the corner of the video. Defaults to the BeyondWords logo.

Maximum string length: 2048
logo_image_position
enum<string>

The position of the logo that appears in the corner of the video.

Available options:
top-left,
top-right
background_color
string

The background color of the video when there is no image. Supports CSS colors including linear-gradient(to right, ...)

text_transform
enum<string>

Text transformation to apply to captions

Available options:
none,
uppercase,
lowercase,
titlecase
text_background_color
string

The background color to show behind text. Supports CSS colors including linear-gradient(to right, ...)

text_background_radius
number

Border radius of the text background

Required range: 0 <= x <= 100
text_color
string

The foreground color of text. Supports CSS colors including linear-gradient(to right, ...)

text_secondary_color
string | null

Color of the text captions to show on every other scene. (CSS color format)

text_highlight_color
string | null

The foreground color of text whilst the word is being read out. Supports CSS colors including linear-gradient(to right, ...)

text_highlight_secondary_color
string | null

Color of highlighted text to show on every other scene. Supports CSS colors including linear-gradient(to right, ...)

text_highlight_background_color
string

Color of the background behind the highlighted text (CSS color format, supports linear-gradient(to right, ...))

Maximum string length: 100
text_highlight_secondary_background_color
string | null

Color of the background behind the highlighted text to show on every other scene (CSS color format, supports linear-gradient(to right, ...))

Maximum string length: 100
text_highlight_background_radius
number

Border radius of the highlight text background

Required range: 0 <= x <= 100
text_shadow
string

Text shadow of non-highlighted words (CSS format, supports linear-gradient(to right, ...))

text_highlight_shadow
string | null

Text shadow of highlighted words (CSS format, supports linear-gradient(to right, ...))

text_stroke
string

Text outline of non-highlighted words (CSS format, supports linear-gradient(to right, ...) and inside/center/outside)

text_highlight_stroke
string | null

Text outline of highlighted words (CSS format, supports linear-gradient(to right, ...) and inside/center/outside)

text_fonts
string[]

A list of fonts to use. Fonts will be prioritized automatically based on glyph coverage for the text. The default fonts are built-in, but you can include remote URLs to custom fonts in .ttf or .otf format.

text_font_size
integer

Font size for text captions (30-90).

Required range: 30 <= x <= 90
text_width
number

Maximum width of text as a ratio of the frame width.

Required range: 0 <= x <= 1
text_lines
integer | null

The maximum number of lines of text to show at once. Must be between 1 and 5. If not specified, text_lines will default to landscape=4, square=5, portrait=5.

Required range: 1 <= x <= 5
text_words
integer | null

Maximum number of words to show per line

Required range: x >= 1
text_horizontal_align
enum<string>

The horizontal alignment of text lines, either 'start', 'center', or 'end'. A value of 'start' aligns the text to the left for left-to-right languages, right otherwise. A value of 'end' aligns the text to the right for left-to-right languages, left otherwise.

Available options:
start,
center,
end
text_vertical_align
enum<string>

The vertical alignment of text lines, either 'start' (top), 'center', or 'end' (bottom).

Available options:
start,
center,
end
text_horizontal_offset
number

The horizontal offset of text relative to the frame width, between -1.0 and 1.0

text_vertical_offset
number

The vertical offset of text relative to the frame height, between -1.0 and 1.0

text_animation
enum<string>

The text animation to show

Available options:
classic,
reveal,
karaoke,
pop
entrance_animation
enum<string>

The entrance animation for image and video segments

Available options:
none,
fade,
zoom-in,
zoom-out,
slide-up,
slide-down,
slide-left,
slide-right,
pop
exit_animation
enum<string>

The exit animation for image and video segments

Available options:
none,
fade,
zoom-in,
zoom-out,
slide-up,
slide-down,
slide-left,
slide-right,
pop
waveform_color
string

The color of the audio waveform bars. Supports CSS colors including linear-gradient(to right, ...)

content_image_enabled
boolean

When true, uses the content's featured image as video background

image_extraction_enabled
boolean

When true, automatically extracts images from HTML content. Alternatively, set the data-beyondwords-image='true' attribute.

pan_and_zoom_enabled
boolean

When true, applies pan and zoom effects to background images

audio_and_waveform_enabled
boolean

When true, video includes audio and animated waveform visualization

text_captions_enabled
boolean

When true, displays text captions overlaid on the video

playback_mode
enum<string>

The playback mode for images in the video. There are three available options. A value of 'cycle' will cycle through images, potentially repeating them according to cycle_time. A value of 'space-evenly' will space images evenly throughout the video without repeating them. A value of 'follow-article' will show images at the point when they appear in the article. Note that 'follow-article' is not applicable for summaries which have different text.

Available options:
cycle,
space-evenly,
follow-article
cycle_time
integer

The time in milliseconds to show each image when playback_mode is set to 'cycle'.

Required range: 1000 <= x <= 60000
width
integer
height
integer

Response

200

successful