> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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. 



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/account-billing/usage-reports.yml get /legacy_reporting/usage_reports/speech_to_text
openapi: 3.1.0
info:
  title: Telnyx Usage Reports API
  version: 2.0.0
  description: API for Usage reports.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /legacy_reporting/usage_reports/speech_to_text:
    get:
      tags:
        - Speech to text Usage Reports
      summary: Get speech to text usage report
      description: >-
        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. 
      operationId: getSttUsageReportSync
      parameters:
        - name: start_date
          in: query
          schema:
            type: string
            format: date-time
            example: '2020-07-02T00:00:00-06:00'
        - name: end_date
          in: query
          schema:
            type: string
            format: date-time
            example: '2020-07-01T00:00:00-06:00'
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SttUsageReportResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/standard_ErrorResponse'
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            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);
        - lang: Python
          source: >-
            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)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Legacy.Reporting.UsageReports.GetSpeechToText(context.TODO(), telnyx.LegacyReportingUsageReportGetSpeechToTextParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Java
          source: >-
            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();
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


            telnyx = Telnyx::Client.new(api_key: "My API Key")


            response =
            telnyx.legacy.reporting.usage_reports.retrieve_speech_to_text


            puts(response)
        - lang: CLI
          source: |-
            telnyx legacy:reporting:usage-reports retrieve-speech-to-text \
              --api-key 'My API Key'
components:
  schemas:
    SttUsageReportResponse:
      type: object
      properties:
        data:
          type: object
    standard_ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/standard_Error'
          title: Errors
      title: ErrorResponse
    standard_Error:
      type: object
      properties:
        code:
          type: string
          title: Telnyx error code
        detail:
          type: string
          title: Error details
        title:
          type: string
          title: Error title
      required:
        - detail
      title: Error
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````