On this page

Walkthrough: score, cache, and refusals

Executed against the release binary in an isolated temporary HOME. The successful calls used a localhost endpoint returning Sapling's documented {"score": number} shape; no commercial detector was called.

Credential refusal

With no detector keys:

$ printf 'Sample text.\n' | skryba score
Error: no detector credentials found; configure GPTZERO_API_KEY, WINSTON_API_KEY, ORIGINALITY_API_KEY, or SAPLING_API_KEY

Exit status was 1. An unknown explicit provider also failed before network:

$ printf 'Sample text.\n' | skryba --detectors turnitin score
Error: unknown detector "turnitin"; available detectors: gptzero, originality, sapling, winston

Selecting GPTZero without its key produced:

$ printf 'Sample text.\n' | skryba --detectors gptzero score
Error: GPTZERO_API_KEY is required for gptzero

First score

The isolated environment set SAPLING_API_KEY, SAPLING_API_URL to the local endpoint, and SKRYBA_CACHE to a new temporary database.

$ printf '%s\n' 'Additionally, the study found that participants who received the intervention reported higher satisfaction. Furthermore, retention improved by twelve percent over the six-month follow-up period, and no adverse events were recorded.' | skryba score
{
  "ai_probability": 0.7835,
  "detectors": [
    {
      "ai_probability": 0.7835,
      "cached": false,
      "detector": "sapling"
    }
  ]
}

Exit status was 0. The result came from HTTP and was persisted.

Same input again

$ printf '%s\n' 'Additionally, the study found that participants who received the intervention reported higher satisfaction. Furthermore, retention improved by twelve percent over the six-month follow-up period, and no adverse events were recorded.' | skryba score
{
  "ai_probability": 0.7835,
  "detectors": [
    {
      "ai_probability": 0.7835,
      "cached": true,
      "detector": "sapling"
    }
  ]
}

The only changed field was cached. SQLite contained a namespace including provider revision and local endpoint plus SHA-256 of the exact text.

Empty text and unavailable endpoint

Whitespace-only input:

$ printf '   ' | skryba --detectors sapling score
Error: sapling cannot score empty text

A fresh uncached text with the endpoint deliberately set to closed localhost port 1 retried, then produced:

Error: sapling request failed after retries

Caused by:
    0: error sending request for url (http://127.0.0.1:1/)
    1: client error (Connect)
    2: tcp connect error
    3: Connection refused (os error 61)

These paths establish the operational distinction: local configuration refusals happen immediately; transport errors appear only after the bounded retry policy.

Maintained as part of the website-owned Skryba documentation corpus.