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

# Generate analysis explanation

> Gera (ou recupera, se já existir) a explicação operacional em linguagem natural para esta análise.



## OpenAPI

````yaml https://api.qa.nlbs.ai/api/openapi.json post /analyses/{analysis_uuid}/explanation
openapi: 3.1.0
info:
  description: >-
    NL Labs AI AML API. Use Bearer API keys for protected endpoints. The /live
    and /ready probes are public.
  title: NL Labs AI
  version: 0.1.0
servers:
  - url: https://api.qa.nlbs.ai/api
security:
  - ApiKeyAuth: []
tags:
  - description: Runtime health checks and source freshness endpoints.
    name: health
  - description: Canonical entity lookup endpoints used before starting analyses.
    name: entities
  - description: AML analysis creation, status, result, and debug endpoints.
    name: analyses
  - description: Regulatory report (Motor 2) creation, status, result, and debug endpoints.
    name: reports
  - description: Versioned deterministic rules catalog endpoints.
    name: rules
  - description: Versioned regulatory reference catalog endpoints.
    name: regulatory
  - description: Webhook endpoint configuration and delivery-event operations.
    name: webhooks
paths:
  /analyses/{analysis_uuid}/explanation:
    post:
      tags:
        - analyses
      summary: Generate analysis explanation
      description: >-
        Gera (ou recupera, se já existir) a explicação operacional em linguagem
        natural para esta análise.
      operationId: create_analysis_explanation
      parameters:
        - description: UUID da execução da análise.
          in: path
          name: analysis_uuid
          required: true
          schema:
            description: UUID da execução da análise.
            format: uuid
            title: Analysis Uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationalExplanationOutput'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Missing, malformed, expired, or invalid Bearer API key.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The authenticated API key does not have the required scope.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Analysis or its data was not found.
        '422':
          description: >-
            Invalid request body, path parameter, query parameter, or business
            rule.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Analysis processing failed.
      security:
        - HTTPBearer: []
components:
  schemas:
    OperationalExplanationOutput:
      additionalProperties: false
      description: Operational explanation text and the metadata required for audit.
      properties:
        limitations:
          items:
            type: string
          title: Limitations
          type: array
        model:
          minLength: 1
          title: Model
          type: string
        prompt_version:
          minLength: 1
          title: Prompt Version
          type: string
        summary:
          minLength: 1
          title: Summary
          type: string
      required:
        - summary
        - prompt_version
        - model
      title: OperationalExplanationOutput
      type: object
    ErrorResponse:
      properties:
        detail:
          description: Stable public error message.
          examples:
            - Resource not found.
          title: Detail
          type: string
      required:
        - detail
      title: ErrorResponse
      type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````