Mint a single-use upload token for a file
curl --request POST \
--url https://www.api.vook.ai/api/v1/uploads/init \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.api.vook.ai/api/v1/uploads/init"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.api.vook.ai/api/v1/uploads/init', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.api.vook.ai/api/v1/uploads/init",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.api.vook.ai/api/v1/uploads/init"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.api.vook.ai/api/v1/uploads/init")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.api.vook.ai/api/v1/uploads/init")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"upload_url": "https://ingress.vook.ai/upload",
"upload_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_at": "2024-01-15T10:30:00.000Z"
}Uploads (API v1)
Mint a single-use upload token for a file
POST
/
api
/
v1
/
uploads
/
init
Mint a single-use upload token for a file
curl --request POST \
--url https://www.api.vook.ai/api/v1/uploads/init \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.api.vook.ai/api/v1/uploads/init"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.api.vook.ai/api/v1/uploads/init', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.api.vook.ai/api/v1/uploads/init",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.api.vook.ai/api/v1/uploads/init"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.api.vook.ai/api/v1/uploads/init")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.api.vook.ai/api/v1/uploads/init")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"upload_url": "https://ingress.vook.ai/upload",
"upload_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_at": "2024-01-15T10:30:00.000Z"
}Authorizations
Your Vook API key (mint one from the web app).
Response
201 - application/json
Where to upload the file, a short-lived token, and its expiry
Absolute URL to POST the file to, as multipart/form-data with a single chunk field. Send the token as Authorization: Bearer <upload_token>. This is a different host from the API. Always use the value returned here rather than hardcoding it.
Example:
"https://ingress.vook.ai/upload"
Short-lived token scoped to this upload session. Send as Authorization: Bearer <upload_token> to upload_url with the file, then pass it again when you create the transcription job.
Example:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
When the upload token expires. Start the upload before this instant; an upload already in flight is not interrupted.
Example:
"2024-01-15T10:30:00.000Z"