MP4 of an animated diagram
curl --request GET \
--url https://app.diagramkit.ai/api/v1/diagrams/{id}/animation.mp4 \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.diagramkit.ai/api/v1/diagrams/{id}/animation.mp4"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.diagramkit.ai/api/v1/diagrams/{id}/animation.mp4', 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://app.diagramkit.ai/api/v1/diagrams/{id}/animation.mp4",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.diagramkit.ai/api/v1/diagrams/{id}/animation.mp4"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.diagramkit.ai/api/v1/diagrams/{id}/animation.mp4")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.diagramkit.ai/api/v1/diagrams/{id}/animation.mp4")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"error": {
"type": "<string>",
"message": "<string>",
"issues": [
"<string>"
]
}
}Downloads
MP4 of an animated diagram
GET
/
diagrams
/
{id}
/
animation.mp4
MP4 of an animated diagram
curl --request GET \
--url https://app.diagramkit.ai/api/v1/diagrams/{id}/animation.mp4 \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.diagramkit.ai/api/v1/diagrams/{id}/animation.mp4"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.diagramkit.ai/api/v1/diagrams/{id}/animation.mp4', 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://app.diagramkit.ai/api/v1/diagrams/{id}/animation.mp4",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.diagramkit.ai/api/v1/diagrams/{id}/animation.mp4"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.diagramkit.ai/api/v1/diagrams/{id}/animation.mp4")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.diagramkit.ai/api/v1/diagrams/{id}/animation.mp4")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"error": {
"type": "<string>",
"message": "<string>",
"issues": [
"<string>"
]
}
}Authorizations
An API key (aid_…) from Settings › API.
Path Parameters
Query Parameters
Resolution and frame rate.
Available options:
low, medium, high The frame the animation is fitted into. Left out, the frame of the diagram's preset (ad square, social portrait, blog, data_story and explainer_video landscape), or chat.
Available options:
chat, square, portrait, story, landscape, wide One page of a multi-page diagram. Left out, every page plays in order in one video; a long set's still pages hold for less so it fits (at least 1.5 seconds), and one too long even so is refused with 422 too_long, saying how many pages fit.
Required range:
1 <= x <= 100Response
The file.
The response is of type file.