# Classic Ciphers and Encodings: Frequency Analysis

> Classic Ciphers and Encodings: Frequency Analysis is a paid API for AI agents from text-ciphers.x402tookit.com, paid per call via x402, $0.02/call, status down (last checked 2026-10-24).

Analyzes ciphertext to compute letter frequencies, index of coincidence, and most likely Caesar shift using English language statistics.

## Facts

- Endpoint: GET https://text-ciphers.x402tookit.com/frequency-analysis?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: down
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/classic-ciphers-and-encodings-frequency-analysis-25ce7af8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QJv-4AEsG2n-27xHEIQlb

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability classic-ciphers-and-encodings-frequency-analysis-25ce7af8
```

Example prompt: Can you run frequency analysis on this ciphertext and tell me the most likely Caesar shift and what the decrypted text would look like: 'KHOOR ZRUOG, WKLV LV D WHVW PHVVDJH WR DQDOBVH'?

## When to prefer this

Use this endpoint when you need to cryptanalyze a suspected Caesar-shifted ciphertext using English letter frequency statistics, especially when you want both the raw frequency data and an automated shift recommendation. Prefer this over manual inspection when the ciphertext is at least 40 letters long and you suspect single-letter substitution. It is not suited for polyalphabetic ciphers (use the Vigenere sibling endpoint for those) or for modern encryption schemes.

## Known failure modes

- Text too short (fewer than 40 letters) — shift guess may be unreliable or absent
- Input exceeds 5000 characters — request may be rejected or truncated
- Non-alphabetic input with no letters — frequencies will be empty and no shift can be estimated
- Text is not English — English-based statistics will produce misleading shift guesses
- Network or payment failure — HTTP 402 or 5xx error returned

## How this service works

Letter frequencies, index of coincidence and the most likely Caesar shift of a ciphertext using English statistics.

## Output

Returns a breakdown of letter frequencies (count, percent, and English reference percent for each letter), the index of coincidence (with random and English baselines for comparison), the most likely Caesar shift, a runner-up shift, a confidence ratio between the top two shifts, the candidate plaintext after applying the likely shift, and a human-readable summary and interpretation of the results.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text to analyse (up to 5000 characters; 40 or more letters for a shift guess)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "letters": {
       "type": [
        "null",
        "number"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "randomIC": {
       "type": [
        "null",
        "number"
       ]
      },
      "englishIC": {
       "type": [
        "null",
        "number"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "mostCommon": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "frequencies": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "count": {
          "type": [
           "null",
           "number"
          ]
         },
         "letter": {
          "type": [
           "null",
           "string"
          ]
         },
         "percent": {
          "type": [
           "n
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/classic-ciphers-and-encodings-frequency-analysis-25ce7af8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from text-ciphers.x402tookit.com](https://www.zero.xyz/host/text-ciphers.x402tookit.com/llms.txt)
