{
  "components": {
    "headers": {
      "RateLimit": {
        "description": "Checks left in the current window and seconds until it resets.",
        "schema": {
          "examples": [
            "\"minute\";r=597;t=42"
          ],
          "type": "string"
        }
      },
      "RateLimit-Policy": {
        "description": "The caller's minute limit (draft-ietf-httpapi-ratelimit-headers): the key's with a key, else the IP address's.",
        "schema": {
          "examples": [
            "\"minute\";q=600;w=60"
          ],
          "type": "string"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying.",
        "schema": {
          "minimum": 1,
          "type": "integer"
        }
      }
    },
    "schemas": {
      "BatchDraftError": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "enum": [
              "invalid_request",
              "invalid_unicode",
              "input_too_large",
              "empty_text",
              "too_many_words",
              "overloaded",
              "analysis_unavailable",
              "analysis_timeout",
              "worker_failed",
              "internal_error"
            ]
          },
          "field": {
            "enum": [
              "text",
              "context"
            ]
          },
          "message": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "message",
          "retryable"
        ],
        "type": "object"
      },
      "BatchDraftID": {
        "pattern": "^[A-Za-z0-9._-]{1,64}$",
        "type": "string"
      },
      "BatchDraftResult": {
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "context": {
                  "const": "outreach"
                }
              }
            },
            "then": {
              "properties": {
                "findings": {
                  "items": {
                    "properties": {
                      "pattern_code": {
                        "enum": [
                          "praise_intensifier",
                          "abstract_phrase",
                          "stock_phrase",
                          "dense_sentences",
                          "stacked_questions",
                          "broad_lesson",
                          "repeated_contrast",
                          "corrective_contrast",
                          "marker_cluster",
                          "repeated_parallel_triad",
                          "repeated_fragment_sequence",
                          "formulaic_framing",
                          "repeated_wording",
                          "repeated_conclusion",
                          "colon_setup",
                          "colon_reveal",
                          "unsolicited_aside",
                          "vocabulary_richness",
                          "unfilled_placeholder",
                          "learning_refrain",
                          "post_stock_line",
                          "label_lines",
                          "negate_restate",
                          "question_reveal",
                          "short_sentences",
                          "even_sentence_length",
                          "even_paragraphs",
                          "one_line_paragraphs",
                          "no_asides",
                          "full_certainty",
                          "polished_vocabulary",
                          "reader_address",
                          "formal_words",
                          "flat_sentences",
                          "few_negations"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "context": {
                  "const": "linkedin_post"
                }
              }
            },
            "then": {
              "properties": {
                "findings": {
                  "items": {
                    "properties": {
                      "pattern_code": {
                        "enum": [
                          "praise_intensifier",
                          "abstract_phrase",
                          "stock_phrase",
                          "dense_sentences",
                          "stacked_questions",
                          "broad_lesson",
                          "repeated_contrast",
                          "corrective_contrast",
                          "marker_cluster",
                          "repeated_parallel_triad",
                          "repeated_fragment_sequence",
                          "formulaic_framing",
                          "repeated_wording",
                          "repeated_conclusion",
                          "colon_setup",
                          "colon_reveal",
                          "unsolicited_aside",
                          "vocabulary_richness",
                          "unfilled_placeholder",
                          "learning_refrain",
                          "post_stock_line",
                          "label_lines",
                          "negate_restate",
                          "question_reveal",
                          "short_sentences",
                          "even_sentence_length",
                          "even_paragraphs",
                          "one_line_paragraphs",
                          "no_asides",
                          "full_certainty",
                          "polished_vocabulary",
                          "reader_address",
                          "formal_words",
                          "flat_sentences",
                          "few_negations"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        ],
        "properties": {
          "analysis_version": {
            "const": "surface-v15"
          },
          "assessment": {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "level": {
                    "type": "null"
                  },
                  "reason": {
                    "const": "too_short"
                  },
                  "status": {
                    "const": "limited"
                  }
                },
                "required": [
                  "status",
                  "level",
                  "reason"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "level": {
                    "enum": [
                      "sounds_like_ai",
                      "some_ai_tells",
                      "reads_human"
                    ]
                  },
                  "limits": {
                    "description": "Where the eval set shows this rating is less reliable, in this order; omitted when none apply. Added by the server, never by the worker. Clients should ignore codes they do not know.",
                    "items": {
                      "enum": [
                        "context_not_validated",
                        "short_draft",
                        "long_draft"
                      ]
                    },
                    "maxItems": 3,
                    "type": "array",
                    "uniqueItems": true
                  },
                  "reason": {
                    "enum": [
                      "rules"
                    ]
                  },
                  "signals": {
                    "items": {
                      "maxLength": 128,
                      "minLength": 1,
                      "type": "string"
                    },
                    "maxItems": 2,
                    "type": "array"
                  },
                  "status": {
                    "const": "assessed"
                  }
                },
                "required": [
                  "status",
                  "level",
                  "reason"
                ],
                "type": "object"
              }
            ]
          },
          "context": {
            "enum": [
              "outreach",
              "linkedin_post"
            ]
          },
          "findings": {
            "items": {
              "additionalProperties": false,
              "allOf": [
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "praise_intensifier"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "abstract_phrase"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "stock_phrase"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "strong"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "dense_sentences"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "stacked_questions"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "broad_lesson"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "repeated_contrast"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "corrective_contrast"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "strong"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "marker_cluster"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "repeated_parallel_triad"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "repeated_fragment_sequence"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "formulaic_framing"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "repeated_wording"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "repeated_conclusion"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "colon_setup"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "colon_reveal"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "unsolicited_aside"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "vocabulary_richness"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "unfilled_placeholder"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "strong"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "learning_refrain"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "post_stock_line"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "label_lines"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "negate_restate"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "question_reveal"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "short_sentences"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "even_sentence_length"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "even_paragraphs"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "one_line_paragraphs"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "no_asides"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "full_certainty"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "polished_vocabulary"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "reader_address"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "formal_words"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "flat_sentences"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "few_negations"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                }
              ],
              "properties": {
                "evidence": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "end": {
                        "maximum": 32768,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "quote": {
                        "maxLength": 32768,
                        "minLength": 1,
                        "type": "string",
                        "x-maxUTF8Bytes": 32768
                      },
                      "start": {
                        "maximum": 32768,
                        "minimum": 0,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "start",
                      "end",
                      "quote"
                    ],
                    "type": "object"
                  },
                  "maxItems": 3,
                  "type": "array"
                },
                "explanation": {
                  "maxLength": 1024,
                  "minLength": 1,
                  "type": "string"
                },
                "id": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                },
                "pattern_code": {
                  "enum": [
                    "praise_intensifier",
                    "abstract_phrase",
                    "stock_phrase",
                    "dense_sentences",
                    "stacked_questions",
                    "broad_lesson",
                    "repeated_contrast",
                    "corrective_contrast",
                    "marker_cluster",
                    "repeated_parallel_triad",
                    "repeated_fragment_sequence",
                    "formulaic_framing",
                    "repeated_wording",
                    "repeated_conclusion",
                    "colon_setup",
                    "colon_reveal",
                    "unsolicited_aside",
                    "vocabulary_richness",
                    "unfilled_placeholder",
                    "learning_refrain",
                    "post_stock_line",
                    "label_lines",
                    "negate_restate",
                    "question_reveal",
                    "short_sentences",
                    "even_sentence_length",
                    "even_paragraphs",
                    "one_line_paragraphs",
                    "no_asides",
                    "full_certainty",
                    "polished_vocabulary",
                    "reader_address",
                    "formal_words",
                    "flat_sentences",
                    "few_negations"
                  ]
                },
                "scope": {
                  "enum": [
                    "span",
                    "document"
                  ]
                },
                "strength": {
                  "enum": [
                    "strong",
                    "weak"
                  ]
                },
                "suggestion": {
                  "maxLength": 1024,
                  "minLength": 1,
                  "type": "string"
                },
                "title": {
                  "maxLength": 1024,
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "pattern_code",
                "title",
                "explanation",
                "suggestion",
                "scope",
                "strength",
                "evidence"
              ],
              "type": "object"
            },
            "maxItems": 35,
            "type": "array"
          },
          "next_step": {
            "description": "What an agent should do next. revise: at least one strong note, or the level is sounds_like_ai or some_ai_tells and a note remains. done: stop checking. Added by the server.",
            "enum": [
              "revise",
              "done"
            ]
          },
          "offset_unit": {
            "const": "utf16_code_units"
          },
          "schema_version": {
            "const": "1"
          }
        },
        "required": [
          "schema_version",
          "analysis_version",
          "context",
          "assessment",
          "offset_unit",
          "findings",
          "next_step"
        ],
        "type": "object"
      },
      "BatchRequest": {
        "additionalProperties": false,
        "description": "POST /api/v1/check/batch. Needs an API key. Every draft counts as one check. The encoded request is at most 2 MiB (2,097,152 bytes), and ids must be unique within the request.",
        "properties": {
          "drafts": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "context": {
                  "default": "outreach",
                  "description": "Optional; outreach or linkedin_post. Any other value fails that draft alone with invalid_request and field context.",
                  "type": "string"
                },
                "id": {
                  "description": "The caller's own label for the draft, returned with its result.",
                  "pattern": "^[A-Za-z0-9._-]{1,64}$",
                  "type": "string"
                },
                "text": {
                  "description": "Empty or too long text fails that draft alone, not the batch.",
                  "type": "string",
                  "x-maxUTF8Bytes": 32768,
                  "x-maxWords": 2000,
                  "x-wordSeparator": "Unicode-15.1-White_Space"
                }
              },
              "required": [
                "id",
                "text"
              ],
              "type": "object"
            },
            "maxItems": 50,
            "minItems": 1,
            "type": "array",
            "x-maxEncodedBytes": 2097152,
            "x-uniqueProperty": "id"
          }
        },
        "required": [
          "drafts"
        ],
        "type": "object"
      },
      "BatchResponse": {
        "additionalProperties": false,
        "description": "200 response of POST /api/v1/check/batch: one entry per draft, in request order. Whole-request failures use the Error schema.",
        "properties": {
          "request_id": {
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
            "type": "string"
          },
          "results": {
            "items": {
              "oneOf": [
                {
                  "additionalProperties": false,
                  "properties": {
                    "id": {
                      "$ref": "#/components/schemas/BatchDraftID"
                    },
                    "result": {
                      "$ref": "#/components/schemas/BatchDraftResult"
                    }
                  },
                  "required": [
                    "id",
                    "result"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/BatchDraftError"
                    },
                    "id": {
                      "$ref": "#/components/schemas/BatchDraftID"
                    }
                  },
                  "required": [
                    "id",
                    "error"
                  ],
                  "type": "object"
                }
              ]
            },
            "maxItems": 50,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "request_id",
          "results"
        ],
        "type": "object"
      },
      "CheckRequest": {
        "additionalProperties": false,
        "properties": {
          "text": {
            "description": "The draft to check, up to 2,000 words.",
            "maxLength": 32768,
            "minLength": 1,
            "type": "string",
            "x-maxUTF8Bytes": 32768,
            "x-maxWords": 2000,
            "x-wordSeparator": "Unicode-15.1-White_Space"
          }
        },
        "required": [
          "text"
        ],
        "type": "object",
        "x-maxEncodedBytes": 262144
      },
      "CheckResponse": {
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "context": {
                  "const": "outreach"
                }
              }
            },
            "then": {
              "properties": {
                "findings": {
                  "items": {
                    "properties": {
                      "pattern_code": {
                        "enum": [
                          "praise_intensifier",
                          "abstract_phrase",
                          "stock_phrase",
                          "dense_sentences",
                          "stacked_questions",
                          "broad_lesson",
                          "repeated_contrast",
                          "corrective_contrast",
                          "marker_cluster",
                          "repeated_parallel_triad",
                          "repeated_fragment_sequence",
                          "formulaic_framing",
                          "repeated_wording",
                          "repeated_conclusion",
                          "colon_setup",
                          "colon_reveal",
                          "unsolicited_aside",
                          "vocabulary_richness",
                          "unfilled_placeholder",
                          "learning_refrain",
                          "post_stock_line",
                          "label_lines",
                          "negate_restate",
                          "question_reveal",
                          "short_sentences",
                          "even_sentence_length",
                          "even_paragraphs",
                          "one_line_paragraphs",
                          "no_asides",
                          "full_certainty",
                          "polished_vocabulary",
                          "reader_address",
                          "formal_words",
                          "flat_sentences",
                          "few_negations"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "context": {
                  "const": "linkedin_post"
                }
              }
            },
            "then": {
              "properties": {
                "findings": {
                  "items": {
                    "properties": {
                      "pattern_code": {
                        "enum": [
                          "praise_intensifier",
                          "abstract_phrase",
                          "stock_phrase",
                          "dense_sentences",
                          "stacked_questions",
                          "broad_lesson",
                          "repeated_contrast",
                          "corrective_contrast",
                          "marker_cluster",
                          "repeated_parallel_triad",
                          "repeated_fragment_sequence",
                          "formulaic_framing",
                          "repeated_wording",
                          "repeated_conclusion",
                          "colon_setup",
                          "colon_reveal",
                          "unsolicited_aside",
                          "vocabulary_richness",
                          "unfilled_placeholder",
                          "learning_refrain",
                          "post_stock_line",
                          "label_lines",
                          "negate_restate",
                          "question_reveal",
                          "short_sentences",
                          "even_sentence_length",
                          "even_paragraphs",
                          "one_line_paragraphs",
                          "no_asides",
                          "full_certainty",
                          "polished_vocabulary",
                          "reader_address",
                          "formal_words",
                          "flat_sentences",
                          "few_negations"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        ],
        "properties": {
          "analysis_version": {
            "const": "surface-v15"
          },
          "assessment": {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "level": {
                    "type": "null"
                  },
                  "reason": {
                    "const": "too_short"
                  },
                  "status": {
                    "const": "limited"
                  }
                },
                "required": [
                  "status",
                  "level",
                  "reason"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "level": {
                    "enum": [
                      "sounds_like_ai",
                      "some_ai_tells",
                      "reads_human"
                    ]
                  },
                  "limits": {
                    "description": "Where the eval set shows this rating is less reliable, in this order; omitted when none apply. Added by the server, never by the worker. Clients should ignore codes they do not know.",
                    "items": {
                      "enum": [
                        "context_not_validated",
                        "short_draft",
                        "long_draft"
                      ]
                    },
                    "maxItems": 3,
                    "type": "array",
                    "uniqueItems": true
                  },
                  "reason": {
                    "enum": [
                      "rules"
                    ]
                  },
                  "signals": {
                    "items": {
                      "maxLength": 128,
                      "minLength": 1,
                      "type": "string"
                    },
                    "maxItems": 2,
                    "type": "array"
                  },
                  "status": {
                    "const": "assessed"
                  }
                },
                "required": [
                  "status",
                  "level",
                  "reason"
                ],
                "type": "object"
              }
            ]
          },
          "context": {
            "enum": [
              "outreach",
              "linkedin_post"
            ]
          },
          "event_receipt": {
            "maxLength": 4096,
            "minLength": 1,
            "type": "string"
          },
          "findings": {
            "items": {
              "additionalProperties": false,
              "allOf": [
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "praise_intensifier"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "abstract_phrase"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "stock_phrase"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "strong"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "dense_sentences"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "stacked_questions"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "broad_lesson"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "repeated_contrast"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "corrective_contrast"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "strong"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "marker_cluster"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "repeated_parallel_triad"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "repeated_fragment_sequence"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "formulaic_framing"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "repeated_wording"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "repeated_conclusion"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "colon_setup"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "colon_reveal"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "unsolicited_aside"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "vocabulary_richness"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "unfilled_placeholder"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "strong"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "learning_refrain"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "post_stock_line"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "label_lines"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "negate_restate"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "question_reveal"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "minItems": 1
                      },
                      "scope": {
                        "const": "span"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "short_sentences"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "even_sentence_length"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "even_paragraphs"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "one_line_paragraphs"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "no_asides"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "full_certainty"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "polished_vocabulary"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "reader_address"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "formal_words"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "flat_sentences"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "pattern_code": {
                        "const": "few_negations"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "evidence": {
                        "maxItems": 0
                      },
                      "scope": {
                        "const": "document"
                      },
                      "strength": {
                        "const": "weak"
                      }
                    }
                  }
                }
              ],
              "properties": {
                "evidence": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "end": {
                        "maximum": 32768,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "quote": {
                        "maxLength": 32768,
                        "minLength": 1,
                        "type": "string",
                        "x-maxUTF8Bytes": 32768
                      },
                      "start": {
                        "maximum": 32768,
                        "minimum": 0,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "start",
                      "end",
                      "quote"
                    ],
                    "type": "object"
                  },
                  "maxItems": 3,
                  "type": "array"
                },
                "explanation": {
                  "maxLength": 1024,
                  "minLength": 1,
                  "type": "string"
                },
                "id": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                },
                "pattern_code": {
                  "enum": [
                    "praise_intensifier",
                    "abstract_phrase",
                    "stock_phrase",
                    "dense_sentences",
                    "stacked_questions",
                    "broad_lesson",
                    "repeated_contrast",
                    "corrective_contrast",
                    "marker_cluster",
                    "repeated_parallel_triad",
                    "repeated_fragment_sequence",
                    "formulaic_framing",
                    "repeated_wording",
                    "repeated_conclusion",
                    "colon_setup",
                    "colon_reveal",
                    "unsolicited_aside",
                    "vocabulary_richness",
                    "unfilled_placeholder",
                    "learning_refrain",
                    "post_stock_line",
                    "label_lines",
                    "negate_restate",
                    "question_reveal",
                    "short_sentences",
                    "even_sentence_length",
                    "even_paragraphs",
                    "one_line_paragraphs",
                    "no_asides",
                    "full_certainty",
                    "polished_vocabulary",
                    "reader_address",
                    "formal_words",
                    "flat_sentences",
                    "few_negations"
                  ]
                },
                "scope": {
                  "enum": [
                    "span",
                    "document"
                  ]
                },
                "strength": {
                  "enum": [
                    "strong",
                    "weak"
                  ]
                },
                "suggestion": {
                  "maxLength": 1024,
                  "minLength": 1,
                  "type": "string"
                },
                "title": {
                  "maxLength": 1024,
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "pattern_code",
                "title",
                "explanation",
                "suggestion",
                "scope",
                "strength",
                "evidence"
              ],
              "type": "object"
            },
            "maxItems": 35,
            "type": "array"
          },
          "next_step": {
            "description": "What an agent should do next. revise: at least one strong note, or the level is sounds_like_ai or some_ai_tells and a note remains. done: stop checking. Added by the server.",
            "enum": [
              "revise",
              "done"
            ]
          },
          "offset_unit": {
            "const": "utf16_code_units"
          },
          "request_id": {
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
            "type": "string"
          },
          "schema_version": {
            "const": "1"
          }
        },
        "required": [
          "schema_version",
          "analysis_version",
          "context",
          "assessment",
          "offset_unit",
          "findings",
          "next_step",
          "request_id"
        ],
        "type": "object"
      },
      "Error": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "invalid_request"
                  },
                  "field": {
                    "enum": [
                      "text",
                      "context",
                      "client"
                    ]
                  },
                  "message": {
                    "const": "Send a JSON object with the draft as a string in the text field."
                  },
                  "retryable": {
                    "const": false
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "invalid_unicode"
                  },
                  "field": {
                    "enum": [
                      "text",
                      "context",
                      "client"
                    ]
                  },
                  "message": {
                    "const": "Send the draft as valid UTF-8 text. Paste it again to drop broken characters."
                  },
                  "retryable": {
                    "const": false
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "input_too_large"
                  },
                  "field": {
                    "enum": [
                      "text",
                      "context",
                      "client"
                    ]
                  },
                  "message": {
                    "const": "Keep the text to 32 KB or less. Split the draft and check each part."
                  },
                  "retryable": {
                    "const": false
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "empty_text"
                  },
                  "field": {
                    "enum": [
                      "text",
                      "context",
                      "client"
                    ]
                  },
                  "message": {
                    "const": "Send the draft text to check."
                  },
                  "retryable": {
                    "const": false
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "too_many_words"
                  },
                  "field": {
                    "enum": [
                      "text",
                      "context",
                      "client"
                    ]
                  },
                  "message": {
                    "const": "Use 2,000 words or fewer. Split the draft and check each part."
                  },
                  "retryable": {
                    "const": false
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "unsupported_media_type"
                  },
                  "field": {
                    "enum": [
                      "text",
                      "context",
                      "client"
                    ]
                  },
                  "message": {
                    "const": "Send uncompressed JSON with Content-Type: application/json."
                  },
                  "retryable": {
                    "const": false
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "method_not_allowed"
                  },
                  "field": {
                    "enum": [
                      "text",
                      "context",
                      "client"
                    ]
                  },
                  "message": {
                    "const": "Use POST for this endpoint."
                  },
                  "retryable": {
                    "const": false
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "rate_limited"
                  },
                  "field": {
                    "enum": [
                      "text",
                      "context",
                      "client"
                    ]
                  },
                  "help_url": {
                    "const": "/docs#limits",
                    "description": "Same-origin page about usage limits and API keys."
                  },
                  "message": {
                    "const": "Wait a minute, then check again. A key gives higher limits."
                  },
                  "retryable": {
                    "const": true
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable",
                  "help_url"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "overloaded"
                  },
                  "field": {
                    "enum": [
                      "text",
                      "context",
                      "client"
                    ]
                  },
                  "message": {
                    "const": "The checker is busy. Wait a few seconds, then try again."
                  },
                  "retryable": {
                    "const": true
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "analysis_unavailable"
                  },
                  "field": {
                    "enum": [
                      "text",
                      "context",
                      "client"
                    ]
                  },
                  "message": {
                    "const": "The checker is unavailable. Wait a few seconds, then try again."
                  },
                  "retryable": {
                    "const": true
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "analysis_timeout"
                  },
                  "field": {
                    "enum": [
                      "text",
                      "context",
                      "client"
                    ]
                  },
                  "message": {
                    "const": "The check took too long. Try again, or split a long draft."
                  },
                  "retryable": {
                    "const": true
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "worker_failed"
                  },
                  "field": {
                    "enum": [
                      "text",
                      "context",
                      "client"
                    ]
                  },
                  "message": {
                    "const": "The check could not finish. Try again in a few seconds."
                  },
                  "retryable": {
                    "const": true
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "internal_error"
                  },
                  "field": {
                    "enum": [
                      "text",
                      "context",
                      "client"
                    ]
                  },
                  "message": {
                    "const": "The request could not be completed. Try again later."
                  },
                  "retryable": {
                    "const": false
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "unauthorized"
                  },
                  "field": {
                    "enum": [
                      "text",
                      "context",
                      "client"
                    ]
                  },
                  "help_url": {
                    "const": "/docs#limits",
                    "description": "Same-origin page about usage limits and API keys."
                  },
                  "message": {
                    "const": "Send a valid key as Authorization: Bearer \u003ckey\u003e, or leave the header out to use the free limit."
                  },
                  "retryable": {
                    "const": false
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable",
                  "help_url"
                ],
                "type": "object"
              }
            ]
          },
          "request_id": {
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
            "type": "string"
          }
        },
        "required": [
          "request_id",
          "error"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearer": {
        "description": "Optional. A key gives higher limits.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Checks whether a draft sounds like AI and quotes each phrase to fix. No key is needed; send Authorization: Bearer \u003ckey\u003e for higher limits. Drafts are not stored. It does not determine authorship.",
    "title": "Do I Sound Like AI",
    "version": "surface-v15"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/check": {
      "post": {
        "description": "Checks an English draft and quotes each phrase to fix. Returns a rating, every note with its strength, next_step (revise or done) and any limits. Drafts are not stored. It does not determine who wrote the text. Send only the draft the user asked you to check.",
        "operationId": "checkDraft",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckResponse"
                }
              }
            },
            "description": "The rating, every note and the next step.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid JSON, invalid Unicode or an unknown field.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The key is not valid. Send a valid key, or no Authorization header.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Use POST.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Text or request too large.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Send uncompressed application/json.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Empty text or more than 2,000 words.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Limit reached. Wait for Retry-After; a key gives higher limits.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The request could not be completed.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The check failed; no result was produced.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Busy or unavailable. Wait for Retry-After.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "504": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The check took too long; no result was produced.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          }
        },
        "summary": "Check if a draft sounds like AI",
        "x-openai-isConsequential": false
      }
    },
    "/api/v1/check/batch": {
      "post": {
        "description": "Checks 1 to 50 drafts with your own ids and returns their results in the same order. Each result is what a single check returns, without request_id; a draft that fails on its own has an error instead. Needs a key. Each draft counts as one check, charged up front.",
        "operationId": "checkDrafts",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            },
            "description": "One result or error per draft, in request order.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid JSON, an unknown field, a bad or repeated id, more than 50 drafts, or more drafts than the key allows in a minute.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "A key is required for batch checks.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Use POST.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The request is over 2 MiB.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Send uncompressed application/json.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Fewer checks are left than the batch has drafts; nothing ran. Wait for Retry-After.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The request could not be completed.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The check failed; no result was produced.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Busy or unavailable. Wait for Retry-After.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "504": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The check took too long; no result was produced.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Check up to 50 drafts in one request",
        "x-openai-isConsequential": false
      }
    },
    "/api/v1/patterns": {
      "get": {
        "operationId": "listPatterns",
        "responses": {
          "200": {
            "description": "The public pattern list for this analysis version."
          }
        },
        "security": [
          {}
        ],
        "summary": "List every note the checker can return, with its title and advice",
        "x-openai-isConsequential": false
      }
    }
  },
  "security": [
    {},
    {
      "bearer": []
    }
  ],
  "servers": [
    {
      "url": "https://doisoundlikeai.com"
    }
  ]
}
