Make your first hallucination check

Learn how to check if your LLM based app has hallucinations.

const response = await fetch(
  'https://api.repromptai.com/api/v1/isHallucinated', 
  {
    method: 'POST',
    headers: {
      "Content-Type": "application/json",
      "apiKey": "<YOUR-REPROMPT-API-KEY>"
    },
    body: JSON.stringify({
      "prompt": "<The full system prompt including RAG context that generated the response>",
      "response": "<Your AI's Response>",
      "userInput": "<Optional: The user's input>"
    })
  }
);
const data = await response.json();
return data;