Skip to main content
POST
/
api
/
v1
/
transcriptions
Create a new transcription request
curl --request POST \
  --url https://{subdomain}.mihu.ai/api/v1/transcriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'voice_file=<string>' \
  --form voice_url=https://example.com/audio.mp3 \
  --form possible_language=en \
  --form 'possible_conversation=Customer support call' \
  --form reference_id=CALL-12345 \
  --form 'customer_voice_url=<string>' \
  --form email=agent@example.com \
  --form 'customer_phone=+1234567890' \
  --form customer_email=customer@example.com \
  --form webhook_url=https://example.com/webhook \
  --form webhook_header_token=token123 \
  --form qa_agent_uuid=153580ac-af27-4c77-aa59-02e9f9b8fe1a \
  --form coaching_agent_uuid=6d4adde3-8fb0-4893-87e1-83f950723f4e \
  --form voice_file.0='@example-file' \
  --form voice_file.1='@example-file'
import requests

url = "https://{subdomain}.mihu.ai/api/v1/transcriptions"

files = {
"voice_file.0": ("example-file", open("example-file", "rb")),
"voice_file.1": ("example-file", open("example-file", "rb"))
}
payload = {
"voice_file": "<string>",
"voice_url": "https://example.com/audio.mp3",
"possible_language": "en",
"possible_conversation": "Customer support call",
"reference_id": "CALL-12345",
"customer_voice_url": "<string>",
"email": "agent@example.com",
"customer_phone": "+1234567890",
"customer_email": "customer@example.com",
"webhook_url": "https://example.com/webhook",
"webhook_header_token": "token123",
"qa_agent_uuid": "153580ac-af27-4c77-aa59-02e9f9b8fe1a",
"coaching_agent_uuid": "6d4adde3-8fb0-4893-87e1-83f950723f4e"
}
headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.text)
const form = new FormData();
form.append('voice_file', '<string>');
form.append('voice_url', 'https://example.com/audio.mp3');
form.append('possible_language', 'en');
form.append('possible_conversation', 'Customer support call');
form.append('reference_id', 'CALL-12345');
form.append('customer_voice_url', '<string>');
form.append('email', 'agent@example.com');
form.append('customer_phone', '+1234567890');
form.append('customer_email', 'customer@example.com');
form.append('webhook_url', 'https://example.com/webhook');
form.append('webhook_header_token', 'token123');
form.append('qa_agent_uuid', '153580ac-af27-4c77-aa59-02e9f9b8fe1a');
form.append('coaching_agent_uuid', '6d4adde3-8fb0-4893-87e1-83f950723f4e');
form.append('voice_file.0', '{
"fileName": "example-file"
}');
form.append('voice_file.1', '{
"fileName": "example-file"
}');

const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

options.body = form;

fetch('https://{subdomain}.mihu.ai/api/v1/transcriptions', 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://{subdomain}.mihu.ai/api/v1/transcriptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_url\"\r\n\r\nhttps://example.com/audio.mp3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"possible_language\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"possible_conversation\"\r\n\r\nCustomer support call\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_id\"\r\n\r\nCALL-12345\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_voice_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\nagent@example.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_phone\"\r\n\r\n+1234567890\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_email\"\r\n\r\ncustomer@example.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://example.com/webhook\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_header_token\"\r\n\r\ntoken123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"qa_agent_uuid\"\r\n\r\n153580ac-af27-4c77-aa59-02e9f9b8fe1a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"coaching_agent_uuid\"\r\n\r\n6d4adde3-8fb0-4893-87e1-83f950723f4e\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);

$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://{subdomain}.mihu.ai/api/v1/transcriptions"

payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_url\"\r\n\r\nhttps://example.com/audio.mp3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"possible_language\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"possible_conversation\"\r\n\r\nCustomer support call\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_id\"\r\n\r\nCALL-12345\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_voice_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\nagent@example.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_phone\"\r\n\r\n+1234567890\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_email\"\r\n\r\ncustomer@example.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://example.com/webhook\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_header_token\"\r\n\r\ntoken123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"qa_agent_uuid\"\r\n\r\n153580ac-af27-4c77-aa59-02e9f9b8fe1a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"coaching_agent_uuid\"\r\n\r\n6d4adde3-8fb0-4893-87e1-83f950723f4e\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")

req, _ := http.NewRequest("POST", url, payload)

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://{subdomain}.mihu.ai/api/v1/transcriptions")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_url\"\r\n\r\nhttps://example.com/audio.mp3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"possible_language\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"possible_conversation\"\r\n\r\nCustomer support call\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_id\"\r\n\r\nCALL-12345\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_voice_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\nagent@example.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_phone\"\r\n\r\n+1234567890\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_email\"\r\n\r\ncustomer@example.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://example.com/webhook\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_header_token\"\r\n\r\ntoken123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"qa_agent_uuid\"\r\n\r\n153580ac-af27-4c77-aa59-02e9f9b8fe1a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"coaching_agent_uuid\"\r\n\r\n6d4adde3-8fb0-4893-87e1-83f950723f4e\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{subdomain}.mihu.ai/api/v1/transcriptions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_url\"\r\n\r\nhttps://example.com/audio.mp3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"possible_language\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"possible_conversation\"\r\n\r\nCustomer support call\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_id\"\r\n\r\nCALL-12345\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_voice_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\nagent@example.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_phone\"\r\n\r\n+1234567890\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_email\"\r\n\r\ncustomer@example.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://example.com/webhook\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_header_token\"\r\n\r\ntoken123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"qa_agent_uuid\"\r\n\r\n153580ac-af27-4c77-aa59-02e9f9b8fe1a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"coaching_agent_uuid\"\r\n\r\n6d4adde3-8fb0-4893-87e1-83f950723f4e\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_file.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "message": "Transcription request submitted successfully",
  "data": {
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "reference_id": "CALL-12345",
    "status": "pending",
    "s3_file_path": "https://s3.amazonaws.com/bucket/transcriptions/uuid.mp3",
    "s3_file_url": "https://s3.amazonaws.com/bucket/transcriptions/uuid.mp3",
    "created_at": "2023-11-07T05:31:56Z",
    "qa_agent_uuid": "153580ac-af27-4c77-aa59-02e9f9b8fe1a",
    "coaching_agent_uuid": "6d4adde3-8fb0-4893-87e1-83f950723f4e"
  }
}
{
"success": false,
"message": "Either voice_file or voice_url must be provided",
"errors": {}
}
{
"success": false,
"message": "An error occurred while processing your request",
"errors": {}
}

Authorizations

Authorization
string
header
required

Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"

Body

multipart/form-data
voice_file
file | null

Audio file to transcribe (max 128MB)

voice_url
string<uri> | null

URL to audio file

Example:

"https://example.com/audio.mp3"

possible_language
string | null

Expected language of the audio

Maximum string length: 10
Example:

"en"

possible_conversation
string | null

Context about the conversation

Example:

"Customer support call"

reference_id
string | null

External reference ID

Maximum string length: 255
Example:

"CALL-12345"

customer_voice_url
string<uri> | null

Customer's voice URL for reference

email
string<email> | null

Human agent email. If this email matches a real user in our system, we will link the transcription to that user account.

Maximum string length: 255
Example:

"agent@example.com"

customer_phone
string | null

Customer's phone number. The system will first check if a contact with this phone number exists and automatically assign that contact to the transcription. If no contact found by phone, it will check customer_email.

Maximum string length: 255
Example:

"+1234567890"

customer_email
string<email> | null

Customer's email address. The system will check if a contact with this email exists (if not found by phone first) and automatically assign that contact to the transcription.

Maximum string length: 255
Example:

"customer@example.com"

webhook_url
string<uri> | null

Webhook URL to receive completion notification. When transcription is completed, we will POST the results to this URL.

Example:

"https://example.com/webhook"

webhook_header_token
string | null

Token to be sent as 'Bearer {token}' in Authorization header when calling your webhook

Example:

"token123"

qa_agent_uuid
string<uuid> | null

UUID of the QA agent template to use. If omitted, the system will fall back to default selection.

Example:

"153580ac-af27-4c77-aa59-02e9f9b8fe1a"

coaching_agent_uuid
string<uuid> | null

UUID of the coaching agent template to use. If omitted, the system will fall back to default selection.

Example:

"6d4adde3-8fb0-4893-87e1-83f950723f4e"

Response

Created

success
boolean

Indicates whether the request completed successfully. True for successful responses; false for documented error responses.

Example:

true

message
string

Human-readable response message. Safe to display in logs or simple client notifications; use structured fields for program logic.

Example:

"Transcription request submitted successfully"

data
object