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

# Create a new Speech to Text batch report request

> Creates a new Speech to Text batch report request with the specified filters



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/account-billing/usage-reports.yml post /legacy/reporting/batch/detail/records/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/batch/detail/records/speech/to/text:
    post:
      tags:
        - Speech to Text Batch Reports
      summary: Create a new Speech to Text batch report request
      description: >-
        Creates a new Speech to Text batch report request with the specified
        filters
      operationId: submitSttRequest
      parameters: []
      requestBody:
        description: Speech to Text batch report request data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SttDetailedRequest'
        required: true
      responses:
        '200':
          description: Speech to text batch report request created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SttPostDetailReportResponse'
        '400':
          description: Invalid request parameters
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: Internal server error
      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 speechToText = await
            client.legacy.reporting.batchDetailRecords.speechToText.create({
              end_date: '2020-07-01T00:00:00-06:00',
              start_date: '2020-07-01T00:00:00-06:00',
            });


            console.log(speechToText.data);
        - lang: Python
          source: >-
            import os

            from datetime import datetime

            from telnyx import Telnyx


            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )

            speech_to_text =
            client.legacy.reporting.batch_detail_records.speech_to_text.create(
                end_date=datetime.fromisoformat("2020-07-01T00:00:00-06:00"),
                start_date=datetime.fromisoformat("2020-07-01T00:00:00-06:00"),
            )

            print(speech_to_text.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\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\tspeechToText, err := client.Legacy.Reporting.BatchDetailRecords.SpeechToText.New(context.TODO(), telnyx.LegacyReportingBatchDetailRecordSpeechToTextNewParams{\n\t\tEndDate:   time.Now(),\n\t\tStartDate: time.Now(),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", speechToText.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.batchdetailrecords.speechtotext.SpeechToTextCreateParams;

            import
            com.telnyx.sdk.models.legacy.reporting.batchdetailrecords.speechtotext.SpeechToTextCreateResponse;

            import java.time.OffsetDateTime;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    SpeechToTextCreateParams params = SpeechToTextCreateParams.builder()
                        .endDate(OffsetDateTime.parse("2020-07-01T00:00:00-06:00"))
                        .startDate(OffsetDateTime.parse("2020-07-01T00:00:00-06:00"))
                        .build();
                    SpeechToTextCreateResponse speechToText = client.legacy().reporting().batchDetailRecords().speechToText().create(params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            speech_to_text =
            telnyx.legacy.reporting.batch_detail_records.speech_to_text.create(
              end_date: "2020-07-01T00:00:00-06:00",
              start_date: "2020-07-01T00:00:00-06:00"
            )


            puts(speech_to_text)
        - lang: CLI
          source: |-
            telnyx legacy:reporting:batch-detail-records:speech-to-text create \
              --api-key 'My API Key' \
              --end-date "'2020-07-01T00:00:00-06:00'" \
              --start-date "'2020-07-01T00:00:00-06:00'"
components:
  schemas:
    SttDetailedRequest:
      required:
        - start_date
        - end_date
      type: object
      properties:
        start_date:
          type: string
          description: Start date in ISO format with timezone
          format: date-time
          example: '2020-07-01T00:00:00-06:00'
        end_date:
          type: string
          description: >-
            End date in ISO format with timezone (date range must be up to one
            month)
          format: date-time
          example: '2020-07-01T00:00:00-06:00'
      description: Request object for Speech to Text detailed report
    SttPostDetailReportResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/SttDetailReportResponse'
    SttDetailReportResponse:
      type: object
      properties:
        id:
          type: string
          description: Identifies the resource
          example: ab76c3b6-80cd-11eb-9439-0242ac130002
        created_at:
          type: string
          format: date-time
          example: '2020-07-01T00:00:00-06:00'
        start_date:
          type: string
          format: date-time
          example: '2020-07-01T00:00:00-06:00'
        end_date:
          type: string
          format: date-time
          example: '2020-07-01T00:00:00-06:00'
        download_link:
          type: string
          description: URL to download the report
          example: https://portal-cdrs-usage.s3.amazonaws.com
        status:
          type: string
          enum:
            - PENDING
            - COMPLETE
            - FAILED
            - EXPIRED
        record_type:
          type: string
          example: speech_to_text_report
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````