Skip to main content
Skip to main content
Get free API key →

Compression Quality Check (hallucinations & blind spots)#

POST/v1/detect-issues

Detect 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.

AuthBearer token required (Pro / Enterprise)
This is a quality assurance tool for compression output. Run it after compressing important documents to verify no critical information was lost and no unsupported claims were introduced.

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

403Requires a Pro or Enterprise plan
422Missing required text fields
401Missing or invalid Bearer token
503Issue detection service not available

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']"
}
400

Bad Request

Invalid parameter value (e.g. invalid fidelity, unknown plan, already-revoked key).

401

Unauthorized

Missing, expired, or invalid Bearer token.

404

Not Found

Resource not found (e.g. unknown key_id).

422

Unprocessable Entity

Pydantic validation failed. Missing required field or wrong type.

429

Too Many Requests

Rate limit exceeded. Check the Retry-After header.

500

Internal Server Error

Unexpected server error. Retry with exponential back-off.

503

Service Unavailable

Dependency unavailable (Redis, Postgres, or billing service).

Where to next

Quickstart
Connect your MCP client and run your first compression in under two minutes.
Recipes
Copy-paste tool sequences for the workflows you'll run most.
Troubleshooting
Symptom-to-fix for the errors people actually hit.
Glossary
Plain-language definitions for skeleton, fidelity, profiles, and the rest.