Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
const response = await fetch("https://api.mocra.io/observe", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR API KEY>",
"Content-Type": "application/json",
"Accept": "application/json",
},
body: JSON.stringify({
videoUrl: "<YOUR VIDEO URL>",
customCriteria: [],
removeCriteria: [],
}),
});
const result = await response.json();
console.log(result);
curl --request POST \
--url https://api.mocra.io/observe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"videoUrl": "<string>",
"customCriteria": [
{
"criterionName": "<string>",
"criterionDescription": "<string>"
}
],
"removeCriteria": []
}
'import requests
url = "https://api.mocra.io/observe"
payload = {
"videoUrl": "<string>",
"customCriteria": [
{
"criterionName": "<string>",
"criterionDescription": "<string>"
}
],
"removeCriteria": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mocra.io/observe",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'videoUrl' => '<string>',
'customCriteria' => [
[
'criterionName' => '<string>',
'criterionDescription' => '<string>'
]
],
'removeCriteria' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.mocra.io/observe"
payload := strings.NewReader("{\n \"videoUrl\": \"<string>\",\n \"customCriteria\": [\n {\n \"criterionName\": \"<string>\",\n \"criterionDescription\": \"<string>\"\n }\n ],\n \"removeCriteria\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.mocra.io/observe")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"videoUrl\": \"<string>\",\n \"customCriteria\": [\n {\n \"criterionName\": \"<string>\",\n \"criterionDescription\": \"<string>\"\n }\n ],\n \"removeCriteria\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mocra.io/observe")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"videoUrl\": \"<string>\",\n \"customCriteria\": [\n {\n \"criterionName\": \"<string>\",\n \"criterionDescription\": \"<string>\"\n }\n ],\n \"removeCriteria\": []\n}"
response = http.request(request)
puts response.read_body{
"severity": 50.5,
"criteria": [
{
"name": "<string>",
"score": 50.5
}
]
}{
"message": "<string>"
}Analyzes the current video and gives it a score of how well it fulfills the criteria.
const response = await fetch("https://api.mocra.io/observe", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR API KEY>",
"Content-Type": "application/json",
"Accept": "application/json",
},
body: JSON.stringify({
videoUrl: "<YOUR VIDEO URL>",
customCriteria: [],
removeCriteria: [],
}),
});
const result = await response.json();
console.log(result);
curl --request POST \
--url https://api.mocra.io/observe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"videoUrl": "<string>",
"customCriteria": [
{
"criterionName": "<string>",
"criterionDescription": "<string>"
}
],
"removeCriteria": []
}
'import requests
url = "https://api.mocra.io/observe"
payload = {
"videoUrl": "<string>",
"customCriteria": [
{
"criterionName": "<string>",
"criterionDescription": "<string>"
}
],
"removeCriteria": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mocra.io/observe",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'videoUrl' => '<string>',
'customCriteria' => [
[
'criterionName' => '<string>',
'criterionDescription' => '<string>'
]
],
'removeCriteria' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.mocra.io/observe"
payload := strings.NewReader("{\n \"videoUrl\": \"<string>\",\n \"customCriteria\": [\n {\n \"criterionName\": \"<string>\",\n \"criterionDescription\": \"<string>\"\n }\n ],\n \"removeCriteria\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.mocra.io/observe")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"videoUrl\": \"<string>\",\n \"customCriteria\": [\n {\n \"criterionName\": \"<string>\",\n \"criterionDescription\": \"<string>\"\n }\n ],\n \"removeCriteria\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mocra.io/observe")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"videoUrl\": \"<string>\",\n \"customCriteria\": [\n {\n \"criterionName\": \"<string>\",\n \"criterionDescription\": \"<string>\"\n }\n ],\n \"removeCriteria\": []\n}"
response = http.request(request)
puts response.read_body{
"severity": 50.5,
"criteria": [
{
"name": "<string>",
"score": 50.5
}
]
}{
"message": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Request body detailing what URL and criteria to use for the analysis.
URL of the video to analyze.
A list of extra custom criteria to be analyzed.
Show child attributes
A list of names of default criteria that should not be used for this analysis
UNNATURAL PHYSICS, MORPHING, FLICKERING, ARTIFACTING, TEXT ISSUES Score of the given video with the specified criteria.
