Create direct Upload
curl -X POST "https://api.videograph.ai/video/services/api/v1/uploads" \
-H "Content-Type: application/json" \
-H "Content-Type: example_string" \
-H "Accept: example_string" \
-H "Authorization: Basic YOUR_CREDENTIALS" \
-d '{
"file_name": "John Doe",
"timeout": 42,
"cors_origin": "example_string",
"content": {
"title": "example_string",
"description": "example_string",
"watermark": [
{
"url": "example_string",
"x_pos": "example_string",
"y_pos": "example_string",
"x_margin": "example_string",
"y_margin": "example_string",
"x_align": "left",
"y_align": "top",
"width": "example_string",
"height": "example_string",
"opacity": "New York"
}
],
"subtitle": [
{
"url": "example_string",
"name": "John Doe",
"language_code": "example_string",
"support_closed_captions": true
}
],
"tags": [
"example_string"
],
"metadata": [
{
"key": "example_string",
"value": "example_string"
}
],
"playback_policy": [
"public"
],
"mp4_support": true,
"save_original_copy": true
}
}'
import requests
import json
url = "https://api.videograph.ai/video/services/api/v1/uploads"
headers = {
"Content-Type": "example_string",
"Accept": "example_string",
"Authorization": "Basic YOUR_CREDENTIALS"
}
data = {
"file_name": "John Doe",
"timeout": 42,
"cors_origin": "example_string",
"content": {
"title": "example_string",
"description": "example_string",
"watermark": [
{
"url": "example_string",
"x_pos": "example_string",
"y_pos": "example_string",
"x_margin": "example_string",
"y_margin": "example_string",
"x_align": "left",
"y_align": "top",
"width": "example_string",
"height": "example_string",
"opacity": "New York"
}
],
"subtitle": [
{
"url": "example_string",
"name": "John Doe",
"language_code": "example_string",
"support_closed_captions": true
}
],
"tags": [
"example_string"
],
"metadata": [
{
"key": "example_string",
"value": "example_string"
}
],
"playback_policy": [
"public"
],
"mp4_support": true,
"save_original_copy": true
}
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.videograph.ai/video/services/api/v1/uploads", {
method: "POST",
headers: {
"Content-Type": "example_string",
"Accept": "example_string",
"Authorization": "Basic YOUR_CREDENTIALS"
},
body: JSON.stringify({
"file_name": "John Doe",
"timeout": 42,
"cors_origin": "example_string",
"content": {
"title": "example_string",
"description": "example_string",
"watermark": [
{
"url": "example_string",
"x_pos": "example_string",
"y_pos": "example_string",
"x_margin": "example_string",
"y_margin": "example_string",
"x_align": "left",
"y_align": "top",
"width": "example_string",
"height": "example_string",
"opacity": "New York"
}
],
"subtitle": [
{
"url": "example_string",
"name": "John Doe",
"language_code": "example_string",
"support_closed_captions": true
}
],
"tags": [
"example_string"
],
"metadata": [
{
"key": "example_string",
"value": "example_string"
}
],
"playback_policy": [
"public"
],
"mp4_support": true,
"save_original_copy": true
}
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"file_name": "John Doe",
"timeout": 42,
"cors_origin": "example_string",
"content": {
"title": "example_string",
"description": "example_string",
"watermark": [
{
"url": "example_string",
"x_pos": "example_string",
"y_pos": "example_string",
"x_margin": "example_string",
"y_margin": "example_string",
"x_align": "left",
"y_align": "top",
"width": "example_string",
"height": "example_string",
"opacity": "New York"
}
],
"subtitle": [
{
"url": "example_string",
"name": "John Doe",
"language_code": "example_string",
"support_closed_captions": true
}
],
"tags": [
"example_string"
],
"metadata": [
{
"key": "example_string",
"value": "example_string"
}
],
"playback_policy": [
"public"
],
"mp4_support": true,
"save_original_copy": true
}
}`)
req, err := http.NewRequest("POST", "https://api.videograph.ai/video/services/api/v1/uploads", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Content-Type", "example_string")
req.Header.Set("Accept", "example_string")
req.Header.Set("Authorization", "Basic YOUR_CREDENTIALS")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.videograph.ai/video/services/api/v1/uploads')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Content-Type'] = 'example_string'
request['Accept'] = 'example_string'
request['Authorization'] = 'Basic YOUR_CREDENTIALS'
request.body = '{
"file_name": "John Doe",
"timeout": 42,
"cors_origin": "example_string",
"content": {
"title": "example_string",
"description": "example_string",
"watermark": [
{
"url": "example_string",
"x_pos": "example_string",
"y_pos": "example_string",
"x_margin": "example_string",
"y_margin": "example_string",
"x_align": "left",
"y_align": "top",
"width": "example_string",
"height": "example_string",
"opacity": "New York"
}
],
"subtitle": [
{
"url": "example_string",
"name": "John Doe",
"language_code": "example_string",
"support_closed_captions": true
}
],
"tags": [
"example_string"
],
"metadata": [
{
"key": "example_string",
"value": "example_string"
}
],
"playback_policy": [
"public"
],
"mp4_support": true,
"save_original_copy": true
}
}'
response = http.request(request)
puts response.body
{
"id": "zd01Pe2bNpYhxbrwYABgFE01twZdtv4M00kts2i02GhbGjc",
"url": "https://yupptv-metadata.s3.ap-southeast-1.amazonaws.com/phani/config.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220310T110243Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3599&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20220310%2Fap-southeast-1%2Fs3%2Faws4_request&X-Amz-Signature=4aa631e30076814c2555b2024b8634064df7c185f5aada4a80ee5ce40411f6a1",
"cors_origin": "https://example.com/",
"timeout": 3600,
"status": "Waiting"
}
/video/services/api/v1/uploads
Target server for requests. Edit to use your own host.
Username for basic authentication
Password for basic authentication
The media type of the request body
Name of the file
Timeout of the file in seconds
Cors origin ex - Allowed domain
Content description
Request Preview
Response
Response will appear here after sending the request
Authentication
Basic authentication credentials. Provide username and password encoded in Base64 format: Basic base64(username:password)
Headers
Body
Name of the file
Timeout of the file in seconds
Cors origin ex - Allowed domain
Content description
Provide a title for your content.
Describe your content.
Add watermark image on video content
Provide source url of the image to be used as watermark.
X-axis position in pixels ex-10px
Y-axis position in pixels ex-10px
X-axis margin in pixel or percentage ex-10px/10%
Y-axis margin in pixel or percentage ex-10px/10%
X-axis alignment, allowed values left/center/right
Y-axis alignment, allowed values top/middle/bottom
Width of the image in pixel or percentage ex-10px/10%
height of the image in pixel or percentage ex-10px/10%
Control opacity of the watermark image, mentioned it in percentage ex-90%
Add Subtitles to video content
Provide source url of Subtitle file. Supported formats include SRT & VTT.
Name of subtitle ex-English US
Mention Language code ex-en_US
Does your subtitle support closed captions (CC), allowed values true/false
Content metadata as key value pairs
The constant that defines the data set ex-color
A variable whihc belongs to the data set ex-blue
Playback policies. Allowed are public, signed or both
Is MP4 generation supported
Is original copy to be saved
Responses
Created