Get speech to text usage report
Generate and fetch speech to text usage report synchronously. This endpoint will both generate and fetch the speech to text report over a specified time period.
GET
/
legacy_reporting
/
usage_reports
/
speech_to_text
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.legacy.reporting.usageReports.retrieveSpeechToText();
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.legacy.reporting.usage_reports.retrieve_speech_to_text()
print(response.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Legacy.Reporting.UsageReports.GetSpeechToText(context.TODO(), telnyx.LegacyReportingUsageReportGetSpeechToTextParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.legacy.reporting.usagereports.UsageReportRetrieveSpeechToTextParams;
import com.telnyx.sdk.models.legacy.reporting.usagereports.UsageReportRetrieveSpeechToTextResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
UsageReportRetrieveSpeechToTextResponse response = client.legacy().reporting().usageReports().retrieveSpeechToText();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.legacy.reporting.usage_reports.retrieve_speech_to_text
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->legacy->reporting->usageReports->retrieveSpeechToText(
endDate: new \DateTimeImmutable('2020-07-01T00:00:00-06:00'),
startDate: new \DateTimeImmutable('2020-07-02T00:00:00-06:00'),
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx legacy:reporting:usage-reports retrieve-speech-to-text \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/legacy_reporting/usage_reports/speech_to_text \
--header 'Authorization: Bearer <token>'{
"data": {}
}{
"errors": [
{
"detail": "<string>",
"code": "<string>",
"title": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Start of the date range filter (inclusive, ISO 8601).
Example:
"2020-07-02T00:00:00-06:00"
End of the date range filter (inclusive, ISO 8601).
Example:
"2020-07-01T00:00:00-06:00"
Response
Successful
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.legacy.reporting.usageReports.retrieveSpeechToText();
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.legacy.reporting.usage_reports.retrieve_speech_to_text()
print(response.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Legacy.Reporting.UsageReports.GetSpeechToText(context.TODO(), telnyx.LegacyReportingUsageReportGetSpeechToTextParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.legacy.reporting.usagereports.UsageReportRetrieveSpeechToTextParams;
import com.telnyx.sdk.models.legacy.reporting.usagereports.UsageReportRetrieveSpeechToTextResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
UsageReportRetrieveSpeechToTextResponse response = client.legacy().reporting().usageReports().retrieveSpeechToText();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.legacy.reporting.usage_reports.retrieve_speech_to_text
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->legacy->reporting->usageReports->retrieveSpeechToText(
endDate: new \DateTimeImmutable('2020-07-01T00:00:00-06:00'),
startDate: new \DateTimeImmutable('2020-07-02T00:00:00-06:00'),
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx legacy:reporting:usage-reports retrieve-speech-to-text \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/legacy_reporting/usage_reports/speech_to_text \
--header 'Authorization: Bearer <token>'{
"data": {}
}{
"errors": [
{
"detail": "<string>",
"code": "<string>",
"title": "<string>"
}
]
}