Compression Quality Check (hallucinations & blind spots)#
/v1/detect-issuesDetect hallucinations and blind spots in compressed output by comparing it against the original text. Finds claims not supported by the source (hallucinations) and critical information that was lost (blind spots). Requires a Pro or Enterprise plan.
Request body
{
"original_text": string, // required — original uncompressed text (min 1 char)
"compressed_text": string, // required — compressed output to check (min 1 char)
"check_hallucination": boolean, // optional — check for hallucinated content
// default: true
"check_blind_spots": boolean // optional — check for lost critical info
// default: true
}Response
{
"issues_found": number,
"issues": [
{
"type": string, // "hallucination" or "blind_spot"
"severity": string, // "low", "medium", or "high"
"description": string,
"location": string|null
}
],
"quality_score": number // 0.0 - 1.0 (1.0 = no issues found)
}curl -X POST https://api.gotcontext.ai/v1/detect-issues \
-H "Authorization: Bearer gc_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"original_text": "The full original document...",
"compressed_text": "The compressed version...",
"check_hallucination": true,
"check_blind_spots": true
}'Error responses
Error Codes#
All errors return JSON with a detail field describing the problem.
// Example error response
{
"detail": "Invalid fidelity 'garbage'. Valid: ['abstract', 'outline', 'balanced', 'detailed', 'raw']"
}Bad Request
Invalid parameter value (e.g. invalid fidelity, unknown plan, already-revoked key).
Unauthorized
Missing, expired, or invalid Bearer token.
Not Found
Resource not found (e.g. unknown key_id).
Unprocessable Entity
Pydantic validation failed. Missing required field or wrong type.
Too Many Requests
Rate limit exceeded. Check the Retry-After header.
Internal Server Error
Unexpected server error. Retry with exponential back-off.
Service Unavailable
Dependency unavailable (Redis, Postgres, or billing service).