Rendley docs

Motion graphics

Create animated clips from a text description. Generates lower thirds, title cards, intros and transitions without opening an animation tool.

#Generate motion graphics

Start a project-scoped motion-graphics generation and return its API job ID. Motion graphics are project content and are not added to the workspace Library.

POSThttps://api.rendley.com/v1/ai/generate-motion-graphics

Don't have one? Create an API key

Body
imagesoptionalobject[]
const res = await fetch("https://api.rendley.com/v1/ai/generate-motion-graphics", {
  method: "POST",
  headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({
    "project_id": "<project_id>",
    "prompt": "<prompt>"
  }),
});
const { data } = await res.json();
curl -X POST "https://api.rendley.com/v1/ai/generate-motion-graphics" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "<project_id>",
    "prompt": "<prompt>"
  }'
import requests

res = requests.post(
    "https://api.rendley.com/v1/ai/generate-motion-graphics",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "project_id": "<project_id>",
        "prompt": "<prompt>"
    },
)
data = res.json()["data"]
$ch = curl_init("https://api.rendley.com/v1/ai/generate-motion-graphics");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["project_id" => "<project_id>", "prompt" => "<prompt>"]));

$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];
package main

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

func main() {
	body := bytes.NewBufferString(`{
  "project_id": "<project_id>",
  "prompt": "<prompt>"
}`)
	req, _ := http.NewRequest("POST", "https://api.rendley.com/v1/ai/generate-motion-graphics", body)
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	b, _ := io.ReadAll(res.Body)
	fmt.Println(string(b))
}
require "net/http"
require "json"

uri = URI("https://api.rendley.com/v1/ai/generate-motion-graphics")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = { project_id: "<project_id>", prompt: "<prompt>" }.to_json

res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]

Response

{
  "data": {
    "job_id": "d97241f2-e1e4-4651-b078-8663fc35c584"
  }
}

#Calculate motion-graphics generation cost

Return the fixed credit cost for a motion-graphics generation.

POSThttps://api.rendley.com/v1/ai/generate-motion-graphics/cost

Don't have one? Create an API key

const res = await fetch("https://api.rendley.com/v1/ai/generate-motion-graphics/cost", {
  method: "POST",
  headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const { data } = await res.json();
curl -X POST "https://api.rendley.com/v1/ai/generate-motion-graphics/cost" \
  -H "Authorization: Bearer YOUR_API_KEY"
import requests

res = requests.post(
    "https://api.rendley.com/v1/ai/generate-motion-graphics/cost",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()["data"]
$ch = curl_init("https://api.rendley.com/v1/ai/generate-motion-graphics/cost");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY"]);

$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];
package main

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

func main() {
	req, _ := http.NewRequest("POST", "https://api.rendley.com/v1/ai/generate-motion-graphics/cost", nil)
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	b, _ := io.ReadAll(res.Body)
	fmt.Println(string(b))
}
require "net/http"
require "json"

uri = URI("https://api.rendley.com/v1/ai/generate-motion-graphics/cost")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"

res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]

Response

{
  "data": 0
}