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();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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apigw.mka1.com/api/v1/llm/speech/tts/history"
req, _ := http.NewRequest("GET", 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.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",
"format": "wav",
"audio_bytes": 48000,
"characters": 45,
"streaming": false,
"metadata": {},
"created_at": 1704067200
}
],
"first_id": "tts_aa87e2b1112a455b8deabed784372198",
"last_id": "tts_aa87e2b1112a455b8deabed784372198",
"has_more": false
}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();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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apigw.mka1.com/api/v1/llm/speech/tts/history"
req, _ := http.NewRequest("GET", 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.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",
"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
Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
Headers
Optional external end-user identifier forwarded by the API gateway.
Query Parameters
History item ID to list items after (pagination cursor).
Maximum number of items to return (1-100, default 20).
Required range:
1 <= x <= 100Sort order by creation time. Defaults to 'desc' (newest first).
Available options:
asc, desc Filter results to a specific model id.
Was this page helpful?
⌘I