> ## Documentation Index
> Fetch the complete documentation index at: https://assembly-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve LeMUR response

> Retrieve a LeMUR response that was previously generated.




## OpenAPI

````yaml get /lemur/v3/{request_id}
openapi: 3.1.0
info:
  title: AssemblyAI API
  description: AssemblyAI API
  version: 1.3.4
  termsOfService: https://www.assemblyai.com/legal/terms-of-service
  contact:
    name: API Support
    email: support@assemblyai.com
    url: https://www.assemblyai.com/docs/
servers:
  - url: https://api.assemblyai.com
    description: AssemblyAI API
security:
  - ApiKey: []
tags:
  - name: transcript
    description: Transcript related operations
    externalDocs:
      url: https://www.assemblyai.com/docs/guides/transcribing-an-audio-file
  - name: LeMUR
    description: LeMUR related operations
    externalDocs:
      url: >-
        https://www.assemblyai.com/docs/guides/processing-audio-with-llms-using-lemur
  - name: streaming
    description: Streaming Speech-to-Text
    externalDocs:
      url: https://www.assemblyai.com/docs/speech-to-text/streaming
paths:
  /lemur/v3/{request_id}:
    get:
      tags:
        - LeMUR
      summary: Retrieve LeMUR response
      description: |
        Retrieve a LeMUR response that was previously generated.
      operationId: getLemurResponse
      parameters:
        - name: request_id
          x-label: LeMUR request ID
          in: path
          description: |
            The ID of the LeMUR request you previously made.
            This would be found in the response of the original request.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: LeMUR response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LemurResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
components:
  schemas:
    LemurResponse:
      x-label: LeMUR response
      x-fern-sdk-group-name: lemur
      type: object
      oneOf:
        - $ref: '#/components/schemas/LemurStringResponse'
        - $ref: '#/components/schemas/LemurQuestionAnswerResponse'
    LemurStringResponse:
      x-label: LeMUR string response
      x-fern-sdk-group-name: lemur
      type: object
      allOf:
        - type: object
          additionalProperties: false
          properties:
            response:
              x-label: Response
              description: The response generated by LeMUR.
              type: string
          required:
            - response
        - $ref: '#/components/schemas/LemurBaseResponse'
      example:
        request_id: 5e1b27c2-691f-4414-8bc5-f14678442f9e
        response: >
          Based on the transcript, the following locations were mentioned as
          being affected by wildfire smoke from Canada:


          - Maine

          - Maryland

          - Minnesota

          - Mid Atlantic region

          - Northeast region

          - New York City

          - Baltimore
        usage:
          input_tokens: 27
          output_tokens: 3
    LemurQuestionAnswerResponse:
      x-label: LeMUR question & answer response
      x-fern-sdk-group-name: lemur
      type: object
      allOf:
        - $ref: '#/components/schemas/LemurBaseResponse'
        - type: object
          additionalProperties: false
          properties:
            response:
              x-label: Question & answers
              description: The answers generated by LeMUR and their questions
              type: array
              items:
                $ref: '#/components/schemas/LemurQuestionAnswer'
                x-label: Question & answer
          required:
            - response
      example:
        request_id: 5e1b27c2-691f-4414-8bc5-f14678442f9e
        response:
          - answer: CA, US
            question: Where are there wildfires?
          - answer: 'yes'
            question: Is global warming affecting wildfires?
        usage:
          input_tokens: 27
          output_tokens: 3
    Error:
      x-label: Error
      type: object
      additionalProperties: true
      required:
        - error
      properties:
        error:
          x-label: Error message
          description: Error message
          type: string
        status:
          x-label: Status
          type: string
          const: error
      example:
        error: format_text must be a Boolean
    LemurBaseResponse:
      x-label: LeMUR base response
      x-fern-sdk-group-name: lemur
      type: object
      additionalProperties: false
      properties:
        request_id:
          x-label: LeMUR request ID
          description: The ID of the LeMUR request
          type: string
          format: uuid
        usage:
          $ref: '#/components/schemas/LemurUsage'
          x-label: Usage
          description: The usage numbers for the LeMUR request
      required:
        - request_id
        - usage
      example:
        request_id: 5e1b27c2-691f-4414-8bc5-f14678442f9e
        usage:
          input_tokens: 27
          output_tokens: 3
    LemurQuestionAnswer:
      x-label: Question & answer
      x-fern-sdk-group-name: lemur
      type: object
      description: An answer generated by LeMUR and its question
      additionalProperties: false
      properties:
        question:
          x-label: Question
          description: The question for LeMUR to answer
          type: string
        answer:
          x-label: Answer
          description: The answer generated by LeMUR
          type: string
      required:
        - question
        - answer
      example:
        answer: CA, US
        question: Where are there wildfires?
    LemurUsage:
      x-label: Usage
      description: The usage numbers for the LeMUR request
      x-fern-sdk-group-name: lemur
      type: object
      additionalProperties: false
      required:
        - input_tokens
        - output_tokens
      properties:
        input_tokens:
          x-label: Input tokens
          description: The number of input tokens used by the model
          type: integer
          minimum: 0
        output_tokens:
          x-label: Output tokens
          description: The number of output tokens generated by the model
          type: integer
          minimum: 0
  responses:
    BadRequest:
      x-label: Bad request
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: This is a sample error message
    Unauthorized:
      x-label: Unauthorized
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Authentication error, API token missing/invalid
    NotFound:
      x-label: Not found
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Not found
    TooManyRequests:
      x-label: Too many requests
      description: Too many requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Too Many Requests
      headers:
        Retry-After:
          description: The number of seconds to wait before retrying the request
          schema:
            type: integer
    InternalServerError:
      x-label: Internal server error
      description: An error occurred while processing the request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal Server Error
    ServiceUnavailable:
      x-label: Service unavailable
      description: Service unavailable
    GatewayTimeout:
      x-label: Gateway timeout
      description: Gateway timeout
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization

````