Projects
Create Project
Create a New Project
Create a new project for organizing videos and defining default transcoding, player, storage, and AI settings.
POST https://api.dyntube.com/v1/projects
Headers
| Name | Type | Description |
|---|---|---|
| Authorization | String | Bearer YOUR_API_KEY |
| Content-Type | String | application/json |
Send the request body as application/json. The example below shows the expected payload.
Request Body (key fields)
| Name | Type | Required | Description |
|---|---|---|---|
| name | String | ✅ | Project name |
| description | String | ❌ | Project description |
| parentId | String | ❌ | Parent project ID. If provided, this project becomes a sub-project of the specified parent. |
| region | String | ✅ | Region code (e.g., use-s) |
| planType | Integer | ✅ | 1 for Standard |
| options | Object | ✅ | Transcode/storage options |
| videoOptions | Object | ❌ | Default player settings for videos in this project |
| aiOptions | Object | ❌ | AI transcription and translation settings for new videos in this project |
AI Options
Use aiOptions to enable automatic captions and translations for videos uploaded to this project.
| Name | Type | Required | Description |
|---|---|---|---|
| aiOptions.originalLanguage | String | ❌ | Primary spoken language in the original videos. Defaults to en. |
| aiOptions.transcription.enabled | Boolean | ❌ | Generate captions automatically for new videos. |
| aiOptions.translations | Array | ❌ | Translation languages to generate after transcription completes. Each item should include language. |
| aiOptions.transcribeOldVideos | Boolean | ❌ | Also queue existing videos in the project for transcription. Videos that already have captions are skipped. |
For supported originalLanguage and translation language values, see AI Language Codes.
200: OK returns the project ID
javascript
NN8GgcLjTsbUgSample Request Body
Here is a sample JSON request to create a project.
json
{
"name": "My Videos",
"description": "This is a demo project",
"parentId": "",
"region": "use-s",
"planType": 1,
"options": {
"convertToHls": true,
"convertToMp4": false,
"useOriginalMp4": false,
"hlsEncrypt": false,
"bitrate240p": 0,
"bitrate360p": 0,
"bitrate540p": 0,
"bitrate720p": 0,
"bitrate1080p": 0,
"bitrate1440p": 0,
"bitrate2160p": 0,
"saveOriginalVideos": false
},
"aiOptions": {
"originalLanguage": "en",
"transcription": {
"enabled": true
},
"translations": [
{ "language": "es" },
{ "language": "fr" }
],
"transcribeOldVideos": false
}
}C#
csharp
using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
namespace CreateProject
{
class Program
{
static async Task Main(string[] args)
{
string url = "https://api.dyntube.com/v1/projects";
string bearerToken = "your_bearer_token";
var data = new
{
name = "Videos",
description = "",
parentId = "", // optional - set to a project ID to create as a sub-project
region = "usw-s",
planType = 1,
options = new
{
convertToHls = true,
convertToMp4 = false,
convertToOneMp4 = true,
useOriginalMp4 = false,
hlsEncrypt = false,
bitrate240p = 400,
bitrate360p = 1200,
bitrate540p = 1800,
bitrate720p = 3750,
bitrate1080p = 5625,
bitrate1440p = 0,
bitrate2160p = 0,
saveOriginalVideos = false
},
videoOptions = new
{
autoplay = false,
playerSkin = "solid",
controlsColor = "",
primaryColor = "",
seekButtons = false,
volumeControl = true,
preload = "auto",
fullscreenControl = true,
controls = true,
captionsOn = false,
bigPlayControl = true,
defaultQuality = "",
qualityControl = true,
speedControl = true,
fastForward = true,
volume = 1.0,
loop = false,
muted = false,
landscapeFullscreen = false,
modal = false,
resumePlayback = false,
hideLogo = false,
cast = true,
extraSecurity = false,
stickyPlayer = false,
pauseOnScroll = false,
storeAuth = false,
contextMenu = false
},
aiOptions = new
{
originalLanguage = "en",
transcription = new
{
enabled = true
},
translations = new[]
{
new { language = "es" },
new { language = "fr" }
},
transcribeOldVideos = false
}
};
using (var httpClient = new HttpClient())
{
httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", bearerToken);
var content = new StringContent(JsonSerializer.Serialize(data), Encoding.UTF8, "application/json");
var response = await httpClient.PostAsync(url, content);
if (response.IsSuccessStatusCode)
{
string projectId = await response.Content.ReadAsStringAsync();
Console.WriteLine($"Project created with ID: {projectId}");
}
else
{
Console.WriteLine("Error creating project: " + response.ReasonPhrase);
}
}
}
}
}Node.js
javascript
const axios = require('axios');
async function createProject() {
const projectData = {
name: 'My Videos',
description: 'This is a demo project',
parentId: '', // optional - set to a project ID to create as a sub-project
region: 'use-s',
planType: 1,
options: {
convertToHls: true,
convertToMp4: false,
useOriginalMp4: false,
hlsEncrypt: false,
bitrate240p: 0,
bitrate360p: 0,
bitrate540p: 0,
bitrate720p: 0,
bitrate1080p: 0,
bitrate1440p: 0,
bitrate2160p: 0,
saveOriginalVideos: false
},
aiOptions: {
originalLanguage: 'en',
transcription: {
enabled: true
},
translations: [
{ language: 'es' },
{ language: 'fr' }
],
transcribeOldVideos: false
}
};
const url = 'https://api.dyntube.com/v1/projects';
const response = await axios.post(url, projectData, {
headers: {
Authorization: 'Bearer your_bearer_token_here'
}
});
if (response.status === 200) {
console.log(`Project created with ID: ${response.data}`);
return response.data;
} else {
console.log('Project creation failed');
return null;
}
}Python
python
import requests
import json
url = "https://api.dyntube.com/v1/projects"
payload = json.dumps({
"name": "My Videos",
"description": "This is a demo project",
"parentId": "", # optional - set to a project ID to create as a sub-project
"region": "use-s",
"planType": 1,
"options": {
"convertToHls": True,
"convertToMp4": False,
"useOriginalMp4": False,
"hlsEncrypt": False,
"bitrate240p": 0,
"bitrate360p": 0,
"bitrate540p": 0,
"bitrate720p": 0,
"bitrate1080p": 0,
"bitrate1440p": 0,
"bitrate2160p": 0,
"saveOriginalVideos": False
},
"aiOptions": {
"originalLanguage": "en",
"transcription": {
"enabled": True
},
"translations": [
{ "language": "es" },
{ "language": "fr" }
],
"transcribeOldVideos": False
}
})
headers = {
'Authorization': 'Bearer your_bearer_token',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)PHP
php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.dyntube.com/v1/projects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS =>'{
"name": "My Videos",
"description": "This is a demo project",
"parentId": "",
"region": "use-s",
"planType": 1,
"options": {
"convertToHls": true,
"convertToMp4": false,
"useOriginalMp4": false,
"hlsEncrypt": false,
"bitrate240p": 0,
"bitrate360p": 0,
"bitrate540p": 0,
"bitrate720p": 0,
"bitrate1080p": 0,
"bitrate1440p": 0,
"bitrate2160p": 0,
"saveOriginalVideos": false
},
"aiOptions": {
"originalLanguage": "en",
"transcription": {
"enabled": true
},
"translations": [
{ "language": "es" },
{ "language": "fr" }
],
"transcribeOldVideos": false
}
}',
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer your_bearer_token",
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>Common Next Steps
After creating a project, most integrations continue with one of these workflows:
- Upload a video by file when the video file is available on your server.
- Upload a video by URL when DynTube should fetch the source file from a public or signed URL.
- Check video status after upload until the video is published.
- Get video details to retrieve playback URLs, embed keys, captions, and status.
- AI Language Codes if you enabled transcription or translations in aiOptions.
Something missing or wrong here? Tell us and we will correct it. New to DynTube? Start with uploading and embedding.