Create a transcription
Creates a new transcription from an audio or video file.
curl -X POST "https://api.fetchmedia.io/v1/transcribe" \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{
"file_url": "https://www3.cde.ca.gov/download/rod/big_buck_bunny.mp4",
"webhook": "https://example.com/webhook"
}'
import requests
import json
url = "https://api.fetchmedia.io/v1/transcribe"
headers = {
"Content-Type": "application/json",
"X-API-KEY": "YOUR_API_KEY"
}
data = {
"file_url": "https://www3.cde.ca.gov/download/rod/big_buck_bunny.mp4",
"webhook": "https://example.com/webhook"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.fetchmedia.io/v1/transcribe", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-KEY": "YOUR_API_KEY"
},
body: JSON.stringify({
"file_url": "https://www3.cde.ca.gov/download/rod/big_buck_bunny.mp4",
"webhook": "https://example.com/webhook"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"file_url": "https://www3.cde.ca.gov/download/rod/big_buck_bunny.mp4",
"webhook": "https://example.com/webhook"
}`)
req, err := http.NewRequest("POST", "https://api.fetchmedia.io/v1/transcribe", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-KEY", "YOUR_API_KEY")
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.fetchmedia.io/v1/transcribe')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-KEY'] = 'YOUR_API_KEY'
request.body = '{
"file_url": "https://www3.cde.ca.gov/download/rod/big_buck_bunny.mp4",
"webhook": "https://example.com/webhook"
}'
response = http.request(request)
puts response.body
{
"transcribe_id": "123e4567-e89b-12d3-a456-426614174000"
}
{
"error": "Unprocessable Entity",
"message": "The request was well-formed but contains semantic errors",
"code": 422,
"details": [
{
"field": "password",
"message": "Password must be at least 8 characters long"
}
]
}
/transcribe
Target server for requests. Edit to use your own host.
API key (sent in header)
API key (sent in query)
The media type of the request body
The file to transcribe. Mutually exclusive with file_url.
The URL of the file to transcribe. Mutually exclusive with file.
The webhook to send the payload once the transcription is completed.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
API Key for authentication. Provide your API key in the query.
Body
The URL of the file to transcribe. Mutually exclusive with file.
The webhook to send the payload once the transcription is completed.