Speech
List text-to-speech history
List stored text-to-speech generations for the authenticated user, newest first by default.
GET
/
api
/
v1
/
llm
/
speech
/
tts
/
history
CSharp (SDK)
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using MeetKai.MKA1.Types.Requests;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
ListTextToSpeechHistoryRequest req = new ListTextToSpeechHistoryRequest() {
After = "tts_aa87e2b1112a455b8deabed784372198",
};
var res = await sdk.Llm.Speech.ListTtsHistoryAsync(req);
// handle responsefrom meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.speech.list_tts_history(after="tts_aa87e2b1112a455b8deabed784372198", limit=20, order="desc")
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.speech.listTtsHistory({
after: "tts_aa87e2b1112a455b8deabed784372198",
});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"github.com/MeetKai/mka1-sdks/go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New(
mka1.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
res, err := s.Llm.Speech.ListTtsHistory(ctx, operations.ListTextToSpeechHistoryRequest{
After: mka1.Pointer("tts_aa87e2b1112a455b8deabed784372198"),
})
if err != nil {
log.Fatal(err)
}
if res.TextToSpeechHistoryList != nil {
// handle response
}
}curl --request GET \
--url https://apigw.mka1.com/api/v1/llm/speech/tts/history \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apigw.mka1.com/api/v1/llm/speech/tts/history', 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://apigw.mka1.com/api/v1/llm/speech/tts/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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;
}HttpResponse<String> response = Unirest.get("https://apigw.mka1.com/api/v1/llm/speech/tts/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/llm/speech/tts/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "tts_aa87e2b1112a455b8deabed784372198",
"object": "speech.tts",
"text": "Hello, welcome to our text-to-speech service.",
"language": "auto",
"detected_language": "en",
"model": "azure:tts",
"provider_id": "azure-speech",
"format": "wav",
"audio_bytes": 48000,
"characters": 45,
"streaming": false,
"metadata": {},
"created_at": 1704067200
}
],
"first_id": "tts_aa87e2b1112a455b8deabed784372198",
"last_id": "tts_aa87e2b1112a455b8deabed784372198",
"has_more": false
}Authorizations
Query Parameters
Was this page helpful?
⌘I
CSharp (SDK)
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using MeetKai.MKA1.Types.Requests;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
ListTextToSpeechHistoryRequest req = new ListTextToSpeechHistoryRequest() {
After = "tts_aa87e2b1112a455b8deabed784372198",
};
var res = await sdk.Llm.Speech.ListTtsHistoryAsync(req);
// handle responsefrom meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.speech.list_tts_history(after="tts_aa87e2b1112a455b8deabed784372198", limit=20, order="desc")
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.speech.listTtsHistory({
after: "tts_aa87e2b1112a455b8deabed784372198",
});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"github.com/MeetKai/mka1-sdks/go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New(
mka1.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
res, err := s.Llm.Speech.ListTtsHistory(ctx, operations.ListTextToSpeechHistoryRequest{
After: mka1.Pointer("tts_aa87e2b1112a455b8deabed784372198"),
})
if err != nil {
log.Fatal(err)
}
if res.TextToSpeechHistoryList != nil {
// handle response
}
}curl --request GET \
--url https://apigw.mka1.com/api/v1/llm/speech/tts/history \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apigw.mka1.com/api/v1/llm/speech/tts/history', 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://apigw.mka1.com/api/v1/llm/speech/tts/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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;
}HttpResponse<String> response = Unirest.get("https://apigw.mka1.com/api/v1/llm/speech/tts/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/llm/speech/tts/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "tts_aa87e2b1112a455b8deabed784372198",
"object": "speech.tts",
"text": "Hello, welcome to our text-to-speech service.",
"language": "auto",
"detected_language": "en",
"model": "azure:tts",
"provider_id": "azure-speech",
"format": "wav",
"audio_bytes": 48000,
"characters": 45,
"streaming": false,
"metadata": {},
"created_at": 1704067200
}
],
"first_id": "tts_aa87e2b1112a455b8deabed784372198",
"last_id": "tts_aa87e2b1112a455b8deabed784372198",
"has_more": false
}