TypeScript client
import { OctosparkClient } from '@octospark/sdk'
const client = new OctosparkClient({
token: process.env.OCTOSPARK_TOKEN
})
const response = await client.slideshows.saveSlideshowProject({
teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
contentItemId: process.env.OCTOSPARK_CONTENT_ITEM_ID ?? "contentItemId",
body: {},
})import os
from octospark_sdk import OctosparkClient
client = OctosparkClient(token=os.environ["OCTOSPARK_TOKEN"])
response = client.slideshows.save_slideshow_project(
teamId=os.environ.get("OCTOSPARK_TEAM_ID", "teamId"),
contentItemId=os.environ.get("OCTOSPARK_CONTENT_ITEM_ID", "contentItemId"),
body={}
)octospark slideshows save-slideshow-project \
--request '{"path":{"teamId":"teamId","contentItemId":"contentItemId"},"body":{}}'use reqwest::Client;
use std::env;
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new();
let base_url = env::var("OCTOSPARK_API_URL").unwrap_or_else(|_| "https://api.octospark.ai".to_string());
let team_id = env::var("OCTOSPARK_TEAM_ID").unwrap_or_else(|_| "teamId".to_string());
let content_item_id = env::var("OCTOSPARK_CONTENT_ITEM_ID").unwrap_or_else(|_| "contentItemId".to_string());
let url = format!("{}/v1/teams/{}/content/slideshows/{}/project", base_url.trim_end_matches('/'), team_id, content_item_id);
let token = env::var("OCTOSPARK_TOKEN").expect("OCTOSPARK_TOKEN");
let mut request = client.put(url).bearer_auth(token);
request = request.json(&serde_json::json!({}));
let response = request.send().await?;
println!("{}", response.text().await?);
Ok(())
}import 'dart:convert';
import 'dart:io';
import 'package:http/http.dart' as http;
Future<void> main() async {
final baseUrl = Platform.environment['OCTOSPARK_API_URL'] ?? 'https://api.octospark.ai';
final token = Platform.environment['OCTOSPARK_TOKEN'];
final teamId = Platform.environment['OCTOSPARK_TEAM_ID'] ?? 'teamId';
final contentItemId = Platform.environment['OCTOSPARK_CONTENT_ITEM_ID'] ?? 'contentItemId';
final url = '${baseUrl.replaceFirst(RegExp(r'/$'), '')}/v1/teams/$teamId/content/slideshows/$contentItemId/project';
final uri = Uri.parse(url);
final headers = {
'Authorization': 'Bearer $token',
'Content-Type': 'application/json',
};
final response = await http.put(
uri,
headers: headers,
body: jsonEncode({}),
);
print(response.body);
}curl --request PUT \
--url https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"expectedRevision": 123,
"project": {
"schemaVersion": 1,
"artifactKind": "slideshow",
"runtime": {
"rendererVersion": "<string>",
"remotionVersion": "<string>",
"reactVersion": "<string>",
"platform": "linux-arm64",
"entryPoint": "<string>",
"dependencyAllowlistVersion": "<string>"
},
"sourceFiles": [
{
"path": "<string>",
"contents": "<string>",
"sha256": "<string>"
}
],
"output": {
"width": 123,
"height": 123,
"fps": 30
},
"slides": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"durationFrames": 9000,
"posterFrame": 1,
"assetBindingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"textElements": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"position": {
"x": 0,
"y": 0,
"width": 50000.5,
"height": 50000.5,
"rotation": 0
},
"styleId": "<string>",
"overrides": {
"fontWeight": 500,
"fontSize": 259,
"lineHeight": 2.25,
"letterSpacing": 32,
"fill": "<string>",
"strokeColor": "<string>",
"strokeWidth": 16,
"shadowColor": "<string>",
"shadowBlur": 64,
"shadowOffsetX": 0,
"shadowOffsetY": 0,
"panelColor": "<string>",
"panelOpacity": 0.5,
"padding": 128,
"borderRadius": 128,
"italic": true,
"opacity": 0.5,
"maxWidth": 2048.5
}
}
],
"backgroundBindingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"embeddedText": [
{
"text": "<string>"
}
]
}
],
"styles": {},
"assetBindings": {},
"styleContext": {
"renderTokens": {},
"references": [
{
"sourceId": "<string>",
"label": "<string>",
"sha256": "<string>"
}
]
}
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'expectedRevision' => 123,
'project' => [
'schemaVersion' => 1,
'artifactKind' => 'slideshow',
'runtime' => [
'rendererVersion' => '<string>',
'remotionVersion' => '<string>',
'reactVersion' => '<string>',
'platform' => 'linux-arm64',
'entryPoint' => '<string>',
'dependencyAllowlistVersion' => '<string>'
],
'sourceFiles' => [
[
'path' => '<string>',
'contents' => '<string>',
'sha256' => '<string>'
]
],
'output' => [
'width' => 123,
'height' => 123,
'fps' => 30
],
'slides' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'durationFrames' => 9000,
'posterFrame' => 1,
'assetBindingIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'textElements' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'text' => '<string>',
'position' => [
'x' => 0,
'y' => 0,
'width' => 50000.5,
'height' => 50000.5,
'rotation' => 0
],
'styleId' => '<string>',
'overrides' => [
'fontWeight' => 500,
'fontSize' => 259,
'lineHeight' => 2.25,
'letterSpacing' => 32,
'fill' => '<string>',
'strokeColor' => '<string>',
'strokeWidth' => 16,
'shadowColor' => '<string>',
'shadowBlur' => 64,
'shadowOffsetX' => 0,
'shadowOffsetY' => 0,
'panelColor' => '<string>',
'panelOpacity' => 0.5,
'padding' => 128,
'borderRadius' => 128,
'italic' => true,
'opacity' => 0.5,
'maxWidth' => 2048.5
]
]
],
'backgroundBindingId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'embeddedText' => [
[
'text' => '<string>'
]
]
]
],
'styles' => [
],
'assetBindings' => [
],
'styleContext' => [
'renderTokens' => [
],
'references' => [
[
'sourceId' => '<string>',
'label' => '<string>',
'sha256' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"idempotency-key: <idempotency-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-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project"
payload := strings.NewReader("{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project")
.header("idempotency-key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body$headers=@{}
$headers.Add("idempotency-key", "<idempotency-key>")
$headers.Add("Authorization", "Bearer <token>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"expectedRevision": 123,
"project": {
"schemaVersion": 1,
"artifactKind": "slideshow",
"runtime": {
"rendererVersion": "<string>",
"remotionVersion": "<string>",
"reactVersion": "<string>",
"platform": "linux-arm64",
"entryPoint": "<string>",
"dependencyAllowlistVersion": "<string>"
},
"sourceFiles": [
{
"path": "<string>",
"contents": "<string>",
"sha256": "<string>"
}
],
"output": {
"width": 123,
"height": 123,
"fps": 30
},
"slides": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"durationFrames": 9000,
"posterFrame": 1,
"assetBindingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"textElements": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"position": {
"x": 0,
"y": 0,
"width": 50000.5,
"height": 50000.5,
"rotation": 0
},
"styleId": "<string>",
"overrides": {
"fontWeight": 500,
"fontSize": 259,
"lineHeight": 2.25,
"letterSpacing": 32,
"fill": "<string>",
"strokeColor": "<string>",
"strokeWidth": 16,
"shadowColor": "<string>",
"shadowBlur": 64,
"shadowOffsetX": 0,
"shadowOffsetY": 0,
"panelColor": "<string>",
"panelOpacity": 0.5,
"padding": 128,
"borderRadius": 128,
"italic": true,
"opacity": 0.5,
"maxWidth": 2048.5
}
}
],
"backgroundBindingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"embeddedText": [
{
"text": "<string>"
}
]
}
],
"styles": {},
"assetBindings": {},
"styleContext": {
"renderTokens": {},
"references": [
{
"sourceId": "<string>",
"label": "<string>",
"sha256": "<string>"
}
]
}
}
}'import Foundation
let parameters = [
"expectedRevision": 123,
"project": [
"schemaVersion": 1,
"artifactKind": "slideshow",
"runtime": [
"rendererVersion": "<string>",
"remotionVersion": "<string>",
"reactVersion": "<string>",
"platform": "linux-arm64",
"entryPoint": "<string>",
"dependencyAllowlistVersion": "<string>"
],
"sourceFiles": [
[
"path": "<string>",
"contents": "<string>",
"sha256": "<string>"
]
],
"output": [
"width": 123,
"height": 123,
"fps": 30
],
"slides": [
[
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"durationFrames": 9000,
"posterFrame": 1,
"assetBindingIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"textElements": [
[
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"position": [
"x": 0,
"y": 0,
"width": 50000.5,
"height": 50000.5,
"rotation": 0
],
"styleId": "<string>",
"overrides": [
"fontWeight": 500,
"fontSize": 259,
"lineHeight": 2.25,
"letterSpacing": 32,
"fill": "<string>",
"strokeColor": "<string>",
"strokeWidth": 16,
"shadowColor": "<string>",
"shadowBlur": 64,
"shadowOffsetX": 0,
"shadowOffsetY": 0,
"panelColor": "<string>",
"panelOpacity": 0.5,
"padding": 128,
"borderRadius": 128,
"italic": true,
"opacity": 0.5,
"maxWidth": 2048.5
]
]
],
"backgroundBindingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"embeddedText": [["text": "<string>"]]
]
],
"styles": [],
"assetBindings": [],
"styleContext": [
"renderTokens": [],
"references": [
[
"sourceId": "<string>",
"label": "<string>",
"sha256": "<string>"
]
]
]
]
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project")!
var request = URLRequest(url: url)
request.httpMethod = "PUT"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))using RestSharp;
var options = new RestClientOptions("https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("idempotency-key", "<idempotency-key>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("idempotency-key", "<idempotency-key>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "idempotency-key: <idempotency-key>");
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}");
CURLcode ret = curl_easy_perform(hnd);CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "idempotency-key: <idempotency-key>");
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}");
CURLcode ret = curl_easy_perform(hnd);val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}")
val request = Request.Builder()
.url("https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project")
.put(body)
.addHeader("idempotency-key", "<idempotency-key>")
.addHeader("Authorization", "Bearer <token>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute(){
"slideshow": {
"contentItemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceContentItemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "<string>",
"payloadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 123,
"creativeHash": "<string>",
"currentCreativeHash": "<string>",
"renderedCreativeHash": "<string>",
"renderFresh": true,
"activeRun": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
},
"latestRun": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"errorCode": "<string>",
"diagnostics": "<string>"
},
"latestRenderJob": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
},
"project": {
"schemaVersion": 1,
"artifactKind": "slideshow",
"runtime": {
"rendererVersion": "<string>",
"remotionVersion": "<string>",
"reactVersion": "<string>",
"platform": "linux-arm64",
"entryPoint": "<string>",
"dependencyAllowlistVersion": "<string>"
},
"sourceFiles": [
{
"path": "<string>",
"contents": "<string>",
"sha256": "<string>"
}
],
"output": {
"aspectRatio": "4:5",
"width": 123,
"height": 123,
"fps": 30
},
"slides": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"durationFrames": 9000,
"posterFrame": 1,
"assetBindingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"textElements": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "hook",
"text": "<string>",
"position": {
"x": 0,
"y": 0,
"width": 50000.5,
"height": 50000.5,
"rotation": 0
},
"styleId": "<string>",
"overrides": {
"fontFamily": "TikTok Display",
"fontWeight": 500,
"fontSize": 259,
"lineHeight": 2.25,
"letterSpacing": 32,
"fill": "<string>",
"strokeColor": "<string>",
"strokeWidth": 16,
"shadowColor": "<string>",
"shadowBlur": 64,
"shadowOffsetX": 0,
"shadowOffsetY": 0,
"panelColor": "<string>",
"panelOpacity": 0.5,
"padding": 128,
"borderRadius": 128,
"textAlign": "left",
"verticalAlign": "top",
"italic": true,
"opacity": 0.5,
"maxWidth": 2048.5
}
}
],
"backgroundBindingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"backgroundPresentation": {
"fit": "cover",
"focalPoint": {
"x": 0.5,
"y": 0.5
},
"overlay": {
"color": "<string>",
"opacity": 0.5
}
},
"embeddedText": [
{
"role": "hook",
"text": "<string>"
}
]
}
],
"styles": {},
"assetBindings": {},
"styleContext": {
"renderTokens": {},
"references": [
{
"source": "team_asset",
"sourceId": "<string>",
"label": "<string>",
"sha256": "<string>"
}
]
}
},
"assetRefs": [
"<unknown>"
],
"links": {
"self": "<string>",
"revisions": "<string>",
"latestRenderJob": "<string>"
},
"browserPreviewUrl": "<string>",
"previewCreativeHash": "<string>"
},
"revision": {
"contentItemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payloadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 123,
"kind": "root",
"creativeHash": "<string>",
"reversesRevision": 123,
"artifactRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actorType": "<string>",
"actorUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"commands": [
"<unknown>"
]
}
}{
"issues": [
{
"_tag": "Pointer",
"path": [
"<string>"
],
"message": "<string>"
}
],
"message": "<string>",
"_tag": "HttpApiDecodeError"
}{
"message": "<string>",
"_tag": "Unauthorized"
}{
"message": "<string>",
"_tag": "PaymentRequired"
}{
"message": "<string>",
"_tag": "Forbidden"
}{
"message": "<string>",
"_tag": "NotFound"
}{
"message": "<string>",
"_tag": "Conflict",
"code": "<string>",
"currentRevision": 123
}{
"message": "<string>",
"code": "<string>",
"_tag": "UnprocessableEntity"
}{
"message": "<string>",
"_tag": "TooManyRequests",
"code": "<string>",
"retryAfterSeconds": 123
}{
"message": "<string>",
"_tag": "InternalError"
}Slideshows
Save slideshow project
Commit a complete slideshow project as the next revision. The project document is the unit of truth: send the whole edited project with the expectedRevision it was based on, and the request is refused if another edit or agent run has already advanced the slideshow. Pass an Idempotency-Key so a retry replays the first result instead of committing twice.
PUT
/
v1
/
teams
/
{teamId}
/
content
/
slideshows
/
{contentItemId}
/
project
TypeScript client
import { OctosparkClient } from '@octospark/sdk'
const client = new OctosparkClient({
token: process.env.OCTOSPARK_TOKEN
})
const response = await client.slideshows.saveSlideshowProject({
teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
contentItemId: process.env.OCTOSPARK_CONTENT_ITEM_ID ?? "contentItemId",
body: {},
})import os
from octospark_sdk import OctosparkClient
client = OctosparkClient(token=os.environ["OCTOSPARK_TOKEN"])
response = client.slideshows.save_slideshow_project(
teamId=os.environ.get("OCTOSPARK_TEAM_ID", "teamId"),
contentItemId=os.environ.get("OCTOSPARK_CONTENT_ITEM_ID", "contentItemId"),
body={}
)octospark slideshows save-slideshow-project \
--request '{"path":{"teamId":"teamId","contentItemId":"contentItemId"},"body":{}}'use reqwest::Client;
use std::env;
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new();
let base_url = env::var("OCTOSPARK_API_URL").unwrap_or_else(|_| "https://api.octospark.ai".to_string());
let team_id = env::var("OCTOSPARK_TEAM_ID").unwrap_or_else(|_| "teamId".to_string());
let content_item_id = env::var("OCTOSPARK_CONTENT_ITEM_ID").unwrap_or_else(|_| "contentItemId".to_string());
let url = format!("{}/v1/teams/{}/content/slideshows/{}/project", base_url.trim_end_matches('/'), team_id, content_item_id);
let token = env::var("OCTOSPARK_TOKEN").expect("OCTOSPARK_TOKEN");
let mut request = client.put(url).bearer_auth(token);
request = request.json(&serde_json::json!({}));
let response = request.send().await?;
println!("{}", response.text().await?);
Ok(())
}import 'dart:convert';
import 'dart:io';
import 'package:http/http.dart' as http;
Future<void> main() async {
final baseUrl = Platform.environment['OCTOSPARK_API_URL'] ?? 'https://api.octospark.ai';
final token = Platform.environment['OCTOSPARK_TOKEN'];
final teamId = Platform.environment['OCTOSPARK_TEAM_ID'] ?? 'teamId';
final contentItemId = Platform.environment['OCTOSPARK_CONTENT_ITEM_ID'] ?? 'contentItemId';
final url = '${baseUrl.replaceFirst(RegExp(r'/$'), '')}/v1/teams/$teamId/content/slideshows/$contentItemId/project';
final uri = Uri.parse(url);
final headers = {
'Authorization': 'Bearer $token',
'Content-Type': 'application/json',
};
final response = await http.put(
uri,
headers: headers,
body: jsonEncode({}),
);
print(response.body);
}curl --request PUT \
--url https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"expectedRevision": 123,
"project": {
"schemaVersion": 1,
"artifactKind": "slideshow",
"runtime": {
"rendererVersion": "<string>",
"remotionVersion": "<string>",
"reactVersion": "<string>",
"platform": "linux-arm64",
"entryPoint": "<string>",
"dependencyAllowlistVersion": "<string>"
},
"sourceFiles": [
{
"path": "<string>",
"contents": "<string>",
"sha256": "<string>"
}
],
"output": {
"width": 123,
"height": 123,
"fps": 30
},
"slides": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"durationFrames": 9000,
"posterFrame": 1,
"assetBindingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"textElements": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"position": {
"x": 0,
"y": 0,
"width": 50000.5,
"height": 50000.5,
"rotation": 0
},
"styleId": "<string>",
"overrides": {
"fontWeight": 500,
"fontSize": 259,
"lineHeight": 2.25,
"letterSpacing": 32,
"fill": "<string>",
"strokeColor": "<string>",
"strokeWidth": 16,
"shadowColor": "<string>",
"shadowBlur": 64,
"shadowOffsetX": 0,
"shadowOffsetY": 0,
"panelColor": "<string>",
"panelOpacity": 0.5,
"padding": 128,
"borderRadius": 128,
"italic": true,
"opacity": 0.5,
"maxWidth": 2048.5
}
}
],
"backgroundBindingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"embeddedText": [
{
"text": "<string>"
}
]
}
],
"styles": {},
"assetBindings": {},
"styleContext": {
"renderTokens": {},
"references": [
{
"sourceId": "<string>",
"label": "<string>",
"sha256": "<string>"
}
]
}
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'expectedRevision' => 123,
'project' => [
'schemaVersion' => 1,
'artifactKind' => 'slideshow',
'runtime' => [
'rendererVersion' => '<string>',
'remotionVersion' => '<string>',
'reactVersion' => '<string>',
'platform' => 'linux-arm64',
'entryPoint' => '<string>',
'dependencyAllowlistVersion' => '<string>'
],
'sourceFiles' => [
[
'path' => '<string>',
'contents' => '<string>',
'sha256' => '<string>'
]
],
'output' => [
'width' => 123,
'height' => 123,
'fps' => 30
],
'slides' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'durationFrames' => 9000,
'posterFrame' => 1,
'assetBindingIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'textElements' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'text' => '<string>',
'position' => [
'x' => 0,
'y' => 0,
'width' => 50000.5,
'height' => 50000.5,
'rotation' => 0
],
'styleId' => '<string>',
'overrides' => [
'fontWeight' => 500,
'fontSize' => 259,
'lineHeight' => 2.25,
'letterSpacing' => 32,
'fill' => '<string>',
'strokeColor' => '<string>',
'strokeWidth' => 16,
'shadowColor' => '<string>',
'shadowBlur' => 64,
'shadowOffsetX' => 0,
'shadowOffsetY' => 0,
'panelColor' => '<string>',
'panelOpacity' => 0.5,
'padding' => 128,
'borderRadius' => 128,
'italic' => true,
'opacity' => 0.5,
'maxWidth' => 2048.5
]
]
],
'backgroundBindingId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'embeddedText' => [
[
'text' => '<string>'
]
]
]
],
'styles' => [
],
'assetBindings' => [
],
'styleContext' => [
'renderTokens' => [
],
'references' => [
[
'sourceId' => '<string>',
'label' => '<string>',
'sha256' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"idempotency-key: <idempotency-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-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project"
payload := strings.NewReader("{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project")
.header("idempotency-key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body$headers=@{}
$headers.Add("idempotency-key", "<idempotency-key>")
$headers.Add("Authorization", "Bearer <token>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"expectedRevision": 123,
"project": {
"schemaVersion": 1,
"artifactKind": "slideshow",
"runtime": {
"rendererVersion": "<string>",
"remotionVersion": "<string>",
"reactVersion": "<string>",
"platform": "linux-arm64",
"entryPoint": "<string>",
"dependencyAllowlistVersion": "<string>"
},
"sourceFiles": [
{
"path": "<string>",
"contents": "<string>",
"sha256": "<string>"
}
],
"output": {
"width": 123,
"height": 123,
"fps": 30
},
"slides": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"durationFrames": 9000,
"posterFrame": 1,
"assetBindingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"textElements": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"position": {
"x": 0,
"y": 0,
"width": 50000.5,
"height": 50000.5,
"rotation": 0
},
"styleId": "<string>",
"overrides": {
"fontWeight": 500,
"fontSize": 259,
"lineHeight": 2.25,
"letterSpacing": 32,
"fill": "<string>",
"strokeColor": "<string>",
"strokeWidth": 16,
"shadowColor": "<string>",
"shadowBlur": 64,
"shadowOffsetX": 0,
"shadowOffsetY": 0,
"panelColor": "<string>",
"panelOpacity": 0.5,
"padding": 128,
"borderRadius": 128,
"italic": true,
"opacity": 0.5,
"maxWidth": 2048.5
}
}
],
"backgroundBindingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"embeddedText": [
{
"text": "<string>"
}
]
}
],
"styles": {},
"assetBindings": {},
"styleContext": {
"renderTokens": {},
"references": [
{
"sourceId": "<string>",
"label": "<string>",
"sha256": "<string>"
}
]
}
}
}'import Foundation
let parameters = [
"expectedRevision": 123,
"project": [
"schemaVersion": 1,
"artifactKind": "slideshow",
"runtime": [
"rendererVersion": "<string>",
"remotionVersion": "<string>",
"reactVersion": "<string>",
"platform": "linux-arm64",
"entryPoint": "<string>",
"dependencyAllowlistVersion": "<string>"
],
"sourceFiles": [
[
"path": "<string>",
"contents": "<string>",
"sha256": "<string>"
]
],
"output": [
"width": 123,
"height": 123,
"fps": 30
],
"slides": [
[
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"durationFrames": 9000,
"posterFrame": 1,
"assetBindingIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"textElements": [
[
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"position": [
"x": 0,
"y": 0,
"width": 50000.5,
"height": 50000.5,
"rotation": 0
],
"styleId": "<string>",
"overrides": [
"fontWeight": 500,
"fontSize": 259,
"lineHeight": 2.25,
"letterSpacing": 32,
"fill": "<string>",
"strokeColor": "<string>",
"strokeWidth": 16,
"shadowColor": "<string>",
"shadowBlur": 64,
"shadowOffsetX": 0,
"shadowOffsetY": 0,
"panelColor": "<string>",
"panelOpacity": 0.5,
"padding": 128,
"borderRadius": 128,
"italic": true,
"opacity": 0.5,
"maxWidth": 2048.5
]
]
],
"backgroundBindingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"embeddedText": [["text": "<string>"]]
]
],
"styles": [],
"assetBindings": [],
"styleContext": [
"renderTokens": [],
"references": [
[
"sourceId": "<string>",
"label": "<string>",
"sha256": "<string>"
]
]
]
]
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project")!
var request = URLRequest(url: url)
request.httpMethod = "PUT"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))using RestSharp;
var options = new RestClientOptions("https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("idempotency-key", "<idempotency-key>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("idempotency-key", "<idempotency-key>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "idempotency-key: <idempotency-key>");
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}");
CURLcode ret = curl_easy_perform(hnd);CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "idempotency-key: <idempotency-key>");
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}");
CURLcode ret = curl_easy_perform(hnd);val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"expectedRevision\": 123,\n \"project\": {\n \"schemaVersion\": 1,\n \"artifactKind\": \"slideshow\",\n \"runtime\": {\n \"rendererVersion\": \"<string>\",\n \"remotionVersion\": \"<string>\",\n \"reactVersion\": \"<string>\",\n \"platform\": \"linux-arm64\",\n \"entryPoint\": \"<string>\",\n \"dependencyAllowlistVersion\": \"<string>\"\n },\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"contents\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ],\n \"output\": {\n \"width\": 123,\n \"height\": 123,\n \"fps\": 30\n },\n \"slides\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"durationFrames\": 9000,\n \"posterFrame\": 1,\n \"assetBindingIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"textElements\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"position\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 50000.5,\n \"height\": 50000.5,\n \"rotation\": 0\n },\n \"styleId\": \"<string>\",\n \"overrides\": {\n \"fontWeight\": 500,\n \"fontSize\": 259,\n \"lineHeight\": 2.25,\n \"letterSpacing\": 32,\n \"fill\": \"<string>\",\n \"strokeColor\": \"<string>\",\n \"strokeWidth\": 16,\n \"shadowColor\": \"<string>\",\n \"shadowBlur\": 64,\n \"shadowOffsetX\": 0,\n \"shadowOffsetY\": 0,\n \"panelColor\": \"<string>\",\n \"panelOpacity\": 0.5,\n \"padding\": 128,\n \"borderRadius\": 128,\n \"italic\": true,\n \"opacity\": 0.5,\n \"maxWidth\": 2048.5\n }\n }\n ],\n \"backgroundBindingId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"embeddedText\": [\n {\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"styles\": {},\n \"assetBindings\": {},\n \"styleContext\": {\n \"renderTokens\": {},\n \"references\": [\n {\n \"sourceId\": \"<string>\",\n \"label\": \"<string>\",\n \"sha256\": \"<string>\"\n }\n ]\n }\n }\n}")
val request = Request.Builder()
.url("https://api-staging.octospark.ai/v1/teams/{teamId}/content/slideshows/{contentItemId}/project")
.put(body)
.addHeader("idempotency-key", "<idempotency-key>")
.addHeader("Authorization", "Bearer <token>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute(){
"slideshow": {
"contentItemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceContentItemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "<string>",
"payloadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 123,
"creativeHash": "<string>",
"currentCreativeHash": "<string>",
"renderedCreativeHash": "<string>",
"renderFresh": true,
"activeRun": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
},
"latestRun": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"errorCode": "<string>",
"diagnostics": "<string>"
},
"latestRenderJob": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
},
"project": {
"schemaVersion": 1,
"artifactKind": "slideshow",
"runtime": {
"rendererVersion": "<string>",
"remotionVersion": "<string>",
"reactVersion": "<string>",
"platform": "linux-arm64",
"entryPoint": "<string>",
"dependencyAllowlistVersion": "<string>"
},
"sourceFiles": [
{
"path": "<string>",
"contents": "<string>",
"sha256": "<string>"
}
],
"output": {
"aspectRatio": "4:5",
"width": 123,
"height": 123,
"fps": 30
},
"slides": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"durationFrames": 9000,
"posterFrame": 1,
"assetBindingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"textElements": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "hook",
"text": "<string>",
"position": {
"x": 0,
"y": 0,
"width": 50000.5,
"height": 50000.5,
"rotation": 0
},
"styleId": "<string>",
"overrides": {
"fontFamily": "TikTok Display",
"fontWeight": 500,
"fontSize": 259,
"lineHeight": 2.25,
"letterSpacing": 32,
"fill": "<string>",
"strokeColor": "<string>",
"strokeWidth": 16,
"shadowColor": "<string>",
"shadowBlur": 64,
"shadowOffsetX": 0,
"shadowOffsetY": 0,
"panelColor": "<string>",
"panelOpacity": 0.5,
"padding": 128,
"borderRadius": 128,
"textAlign": "left",
"verticalAlign": "top",
"italic": true,
"opacity": 0.5,
"maxWidth": 2048.5
}
}
],
"backgroundBindingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"backgroundPresentation": {
"fit": "cover",
"focalPoint": {
"x": 0.5,
"y": 0.5
},
"overlay": {
"color": "<string>",
"opacity": 0.5
}
},
"embeddedText": [
{
"role": "hook",
"text": "<string>"
}
]
}
],
"styles": {},
"assetBindings": {},
"styleContext": {
"renderTokens": {},
"references": [
{
"source": "team_asset",
"sourceId": "<string>",
"label": "<string>",
"sha256": "<string>"
}
]
}
},
"assetRefs": [
"<unknown>"
],
"links": {
"self": "<string>",
"revisions": "<string>",
"latestRenderJob": "<string>"
},
"browserPreviewUrl": "<string>",
"previewCreativeHash": "<string>"
},
"revision": {
"contentItemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payloadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 123,
"kind": "root",
"creativeHash": "<string>",
"reversesRevision": 123,
"artifactRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actorType": "<string>",
"actorUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"commands": [
"<unknown>"
]
}
}{
"issues": [
{
"_tag": "Pointer",
"path": [
"<string>"
],
"message": "<string>"
}
],
"message": "<string>",
"_tag": "HttpApiDecodeError"
}{
"message": "<string>",
"_tag": "Unauthorized"
}{
"message": "<string>",
"_tag": "PaymentRequired"
}{
"message": "<string>",
"_tag": "Forbidden"
}{
"message": "<string>",
"_tag": "NotFound"
}{
"message": "<string>",
"_tag": "Conflict",
"code": "<string>",
"currentRevision": 123
}{
"message": "<string>",
"code": "<string>",
"_tag": "UnprocessableEntity"
}{
"message": "<string>",
"_tag": "TooManyRequests",
"code": "<string>",
"retryAfterSeconds": 123
}{
"message": "<string>",
"_tag": "InternalError"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
a string at most 200 character(s) long
Required string length:
1 - 200Path Parameters
Team (workspace) id (UUID). Discover ids via the list teams endpoint or the agent context.
Slideshow content item id (UUID), as returned by createSlideshow, createSlideshowGeneration, or listSlideshows.
Pattern:
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Body
application/json