---
title: "Fact-check the correctness of code generation."
method: POST
path: "/fact_check_code"
---

# Fact-check the correctness of code generation.

`POST /fact_check_code`

## Request body

- FactCheckRequest
  - `prompt` string — (REQUIRED) The user prompt that requested a response (i.e., the user prompt that request the ChatGPT response to be fact-checked.)
  - `response` string — (REQUIRED) The response to be fact-checked (usually a ChatGPT response). (VERY IMPORTANT) HOWEVER, if the user directly asks you to fact-check a knowledge-based statement, then the response should be same as the prompt.
  - `entry_point` unknown

## Response `200`

Fact-check result

- FactCheckResponse
  - `fact_check_result` object[] — The list of fact-check results as dictionaries. This list includes claims extracted from the response, claim-level_factuality and response-level factuality of the response, and potentially the descriptions of why each claim in the response is factual or not.

---

[API](https://skmtc.net/gair-nlp/apis/factool.md) · [All operations](https://skmtc.net/gair-nlp/apis/factool/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gair-nlp/factool/versions/95e59a4f4ac2/schema)
