---
title: "Explain (BETA) - Returns a natural language explanation of the evidence tree"
method: POST
path: "/nl/explain"
tags: ["Evidence"]
---

# Explain (BETA) - Returns a natural language explanation of the evidence tree

`POST /nl/explain`

Get a natural language explanation of the chain of reasoning for any given fact.

## Headers

- `Version` string, required

## Request body

- object
  - `language` string, required — The users preferred language setting i.e. "en", "za"
  - `sessionID` string, required — The session ID needed to access that specific session
  - `factID` string, required — The ID of a fact specific to that session to retrieve data from
  - `instructions` string — Optional free-form instructions for the explanation's style, tone of voice, conciseness, examples, or response template

## Response `200`

Response to the language

- object
  - `explanation` string — The natural language representation of the fact evidence being queried
  - `error` NLError — Error for the natural language endpoints
    - `code` integer — An internal error code.
    - `message` string — A description of the error.
    - `suggestedChatResponse` string — A recommended message for chat-based clients to show the user. This message is designed to be user-friendly and assumes no knowledge of Rainbird.
    - `statusCode` string — The HTTP status code of the response.
  - `metadata` NLMetadata — Metadata for the natural language endpoints
    - `querySubmittedAt` string, date-time — Timestamp when the query was submitted
    - `languageEngineResponseTime` integer — Response time of the language engine in milliseconds
    - `llmTokens` object — Token information from the LLM response
      - `completionTokens` integer — Number of completion tokens
      - `promptTokens` integer — Number of prompt tokens
      - `totalTokens` integer — Total number of tokens
    - `apiVersion` string — Version of the API
    - `endpoint` string — Name of the endpoint
    - `sessionID` string — Session ID of the session

---

[API](https://skmtc.net/rainbird/apis/rainbird-api-documentation.md) · [All operations](https://skmtc.net/rainbird/apis/rainbird-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rainbird/rainbird-api-documentation/revisions/0b8d2bc38f5d/schema)
