curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"videoUrl": "https://img.ayrshare.com/random/landscape5.mp4"}' \
-X POST https://api.ayrshare.com/api/generate/transcription
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/generate/transcription", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({
videoUrl: "https://img.ayrshare.com/random/landscape5.mp4", // required
}),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {'videoUrl': 'https://img.ayrshare.com/random/landscape5.mp4'}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.post('https://api.ayrshare.com/api/generate/transcription',
json=payload,
headers=headers)
print(r.json())
<?php
$curl = curl_init();
$data = array (
"videoUrl" => "https://img.ayrshare.com/random/landscape5.mp4"
);
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.ayrshare.com/api/generate/transcription',
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 => http_build_query($data),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer API_KEY',
'Accept-Encoding: gzip'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{
"status": "success",
"transcript": "This is your last chance. After this, there is no turning back. You take the blue pill the story ends you wake up in your bed and believe whatever you want to be. You take the red pill you stay in Wonderland. And I show you how deep the rabbit hole goes.",
"transcriptArray": [
"This is your last chance.",
"After this, there is no turning back.",
"You take the blue pill the story ends you wake up in your bed and believe whatever you want to be. You take the red pill you stay in Wonderland.",
"And I show you how deep the rabbit hole goes."
],
"videoTitle": "Choose Wisely: Blue Pill or Red Pill Adventure Awaits!",
"wordCount": 52
}
Generate
Transcrire une vidéo
Fournissez une transcription et un titre d’un fichier vidéo à l’aide de l’IA
POST
/
generate
/
transcription
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"videoUrl": "https://img.ayrshare.com/random/landscape5.mp4"}' \
-X POST https://api.ayrshare.com/api/generate/transcription
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/generate/transcription", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({
videoUrl: "https://img.ayrshare.com/random/landscape5.mp4", // required
}),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {'videoUrl': 'https://img.ayrshare.com/random/landscape5.mp4'}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.post('https://api.ayrshare.com/api/generate/transcription',
json=payload,
headers=headers)
print(r.json())
<?php
$curl = curl_init();
$data = array (
"videoUrl" => "https://img.ayrshare.com/random/landscape5.mp4"
);
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.ayrshare.com/api/generate/transcription',
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 => http_build_query($data),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer API_KEY',
'Accept-Encoding: gzip'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{
"status": "success",
"transcript": "This is your last chance. After this, there is no turning back. You take the blue pill the story ends you wake up in your bed and believe whatever you want to be. You take the red pill you stay in Wonderland. And I show you how deep the rabbit hole goes.",
"transcriptArray": [
"This is your last chance.",
"After this, there is no turning back.",
"You take the blue pill the story ends you wake up in your bed and believe whatever you want to be. You take the red pill you stay in Wonderland.",
"And I show you how deep the rabbit hole goes."
],
"videoTitle": "Choose Wisely: Blue Pill or Red Pill Adventure Awaits!",
"wordCount": 52
}
Générez une transcription et un titre d’un fichier vidéo à l’aide de l’IA.
Cette transcription peut ensuite être utilisée dans /generate/post pour créer un résumé sur les réseaux sociaux de la vidéo.
Pour YouTube, qui nécessite un titre, le titre généré peut être utilisé.
La vidéo doit avoir été préalablement téléchargée sur Ayrshare avec /media.
Les vidéos non hébergées par Ayrshare seront rejetées.La taille maximale du fichier vidéo est de 500 Go et la durée maximale est de 10 minutes.
Guide de transcription vidéo
Paramètres d’en-tête
Paramètres du corps
URL vidéo encodée en URL. La vidéo doit être hébergée par Ayrshare.
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"videoUrl": "https://img.ayrshare.com/random/landscape5.mp4"}' \
-X POST https://api.ayrshare.com/api/generate/transcription
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/generate/transcription", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({
videoUrl: "https://img.ayrshare.com/random/landscape5.mp4", // required
}),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {'videoUrl': 'https://img.ayrshare.com/random/landscape5.mp4'}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.post('https://api.ayrshare.com/api/generate/transcription',
json=payload,
headers=headers)
print(r.json())
<?php
$curl = curl_init();
$data = array (
"videoUrl" => "https://img.ayrshare.com/random/landscape5.mp4"
);
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.ayrshare.com/api/generate/transcription',
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 => http_build_query($data),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer API_KEY',
'Accept-Encoding: gzip'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{
"status": "success",
"transcript": "This is your last chance. After this, there is no turning back. You take the blue pill the story ends you wake up in your bed and believe whatever you want to be. You take the red pill you stay in Wonderland. And I show you how deep the rabbit hole goes.",
"transcriptArray": [
"This is your last chance.",
"After this, there is no turning back.",
"You take the blue pill the story ends you wake up in your bed and believe whatever you want to be. You take the red pill you stay in Wonderland.",
"And I show you how deep the rabbit hole goes."
],
"videoTitle": "Choose Wisely: Blue Pill or Red Pill Adventure Awaits!",
"wordCount": 52
}
⌘I
