IMAGE
youtube-thumbnail
1280×720px
YouTube A vs B Comparison
Split-screen comparison thumbnail for versus or review videos.
Use Cases
- Product comparison reviews
- Before and after videos
- Software vs software reviews
- Two-sided debate topics
Tags
youtube
thumbnail
comparison
versus
split-screen
review
1280x720
Template Variables
| Variable | Type | Default | Description |
|---|---|---|---|
| left_label | string | Option A | Left side label |
| right_label | string | Option B | Right side label |
| left_image_url | url | https://picsum.photos/seed/vs-left/640/720 | Left side image URL |
| right_image_url | url | https://picsum.photos/seed/vs-right/640/720 | Right side image URL |
| left_color | color | #2563eb | Left side accent colour |
| right_color | color | #dc2626 | Right side accent colour |
| title | string | Which is Better? | Title above the split |
API Example
POST to
https://image.toolkitapi.io/v1/image/from-template
with your template URL and variable values.
curl -X POST "https://image.toolkitapi.io/v1/image/from-template" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"template_url": "https://toolkitapi.io/static/templates/image/yt-versus.html", "variables": {"left_label": "Option A", "right_label": "Option B", "left_image_url": "https://picsum.photos/seed/vs-left/640/720", "right_image_url": "https://picsum.photos/seed/vs-right/640/720", "left_color": "#2563eb", "right_color": "#dc2626", "title": "Which is Better?"}, "width": 1280, "height": 720, "format": "png"}'
import httpx, base64
resp = httpx.post(
"https://image.toolkitapi.io/v1/image/from-template",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"template_url": "https://toolkitapi.io/static/templates/image/yt-versus.html",
"variables": {
"left_label": "Option A",
"right_label": "Option B",
"left_image_url": "https://picsum.photos/seed/vs-left/640/720",
"right_image_url": "https://picsum.photos/seed/vs-right/640/720",
"left_color": "#2563eb",
"right_color": "#dc2626",
"title": "Which is Better?"
},
"width": 1280,
"height": 720,
"format": "png"
},
)
image_bytes = base64.b64decode(resp.json()["image"])
with open("result.png", "wb") as f:
f.write(image_bytes)
const response = await fetch("https://image.toolkitapi.io/v1/image/from-template", {
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"template_url": "https://toolkitapi.io/static/templates/image/yt-versus.html",
"variables": {
"left_label": "Option A",
"right_label": "Option B",
"left_image_url": "https://picsum.photos/seed/vs-left/640/720",
"right_image_url": "https://picsum.photos/seed/vs-right/640/720",
"left_color": "#2563eb",
"right_color": "#dc2626",
"title": "Which is Better?"
},
"width": 1280,
"height": 720,
"format": "png"
}),
});
const data = await response.json();
// data.image is a base64-encoded PNG
$body = @{
template_url = "https://toolkitapi.io/static/templates/image/yt-versus.html"
variables = {
"left_label": "Option A",
"right_label": "Option B",
"left_image_url": "https://picsum.photos/seed/vs-left/640/720",
"right_image_url": "https://picsum.photos/seed/vs-right/640/720",
"left_color": "#2563eb",
"right_color": "#dc2626",
"title": "Which is Better?"
}
width = 1280
height = 720
format = "png"
} | ConvertTo-Json -Depth 5
Invoke-RestMethod -Method POST `
-Uri "https://image.toolkitapi.io/v1/image/from-template" `
-Headers @{"X-API-Key" = "YOUR_API_KEY"} `
-ContentType "application/json" `
-Body $body