{
 "openapi": "3.1.0",
 "info": {
  "title": "Probator.ai API",
  "version": "1",
  "description": "AI-generated text detection, grammar, plagiarism and hidden-mark forensics. Uses the credits of the account that owns the API key (Pro and Team plans). AI-detection results are probabilities, not proof.",
  "contact": {
   "email": "hello@probator.ai",
   "url": "https://probator.ai/docs/api/"
  },
  "termsOfService": "https://probator.ai/legal/terms"
 },
 "servers": [
  {
   "url": "https://probator.ai/v1"
  }
 ],
 "security": [
  {
   "bearer": []
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer",
    "description": "API key, e.g. pb_live_\u2026"
   }
  }
 },
 "paths": {
  "/analyze": {
   "post": {
    "summary": "Run any combination of checks",
    "description": "AI detection is on by default; set checks to add grammar, plagiarism or a deep scan.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "maxLength": 400000,
          "description": "Text to check."
         },
         "checks": {
          "type": "object",
          "properties": {
           "ai": {
            "type": "boolean"
           },
           "grammar": {
            "type": "boolean"
           },
           "plagiarism": {
            "type": "boolean"
           },
           "deep": {
            "type": "boolean"
           }
          }
         },
         "ui_lang": {
          "type": "string",
          "enum": [
           "en",
           "pt",
           "es",
           "fr",
           "de",
           "it"
          ],
          "default": "en"
         },
         "store": {
          "type": "boolean",
          "description": "Add fingerprints to your comparison library (plagiarism)."
         }
        },
        "required": [
         "text"
        ]
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "PDF, DOCX, TXT, MD or HTML, up to 20 MB."
         },
         "ai": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "grammar": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "plagiarism": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "deep": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "ui_lang": {
          "type": "string"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Report",
      "headers": {
       "x-credits-used": {
        "schema": {
         "type": "integer"
        }
       },
       "x-credits-remaining": {
        "schema": {
         "type": "integer"
        }
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "description": "Full report. Key fields below; see https://probator.ai/docs/api/ for all fields.",
         "properties": {
          "verdict": {
           "type": "object",
           "properties": {
            "key": {
             "type": "string",
             "enum": [
              "human",
              "likely_human",
              "uncertain",
              "mixed",
              "likely_ai",
              "ai",
              "forensics"
             ]
            },
            "label": {
             "type": "string"
            },
            "p_ai": {
             "type": "number"
            },
            "confidence": {
             "type": "string",
             "enum": [
              "low",
              "medium",
              "high"
             ]
            },
            "ai_share": {
             "type": "number"
            },
            "guards": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "evidence": {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          "sentences": {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          "corrections": {
           "type": [
            "object",
            "null"
           ]
          },
          "plagiarism": {
           "type": [
            "object",
            "null"
           ]
          },
          "findings": {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          "provenance": {
           "type": "object",
           "properties": {
            "declared": {
             "type": [
              "string",
              "null"
             ]
            },
            "marks": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           }
          },
          "credits": {
           "type": "object",
           "properties": {
            "used": {
             "type": "integer"
            },
            "remaining": {
             "type": [
              "integer",
              "null"
             ]
            }
           }
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "Missing or invalid key",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "402": {
      "description": "Not enough credits",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "413": {
      "description": "Too many words or file too large",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/detect": {
   "post": {
    "summary": "Detect AI-generated text",
    "description": "AI detection only (1 credit per word).",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "maxLength": 400000,
          "description": "Text to check."
         },
         "checks": {
          "type": "object",
          "properties": {
           "ai": {
            "type": "boolean"
           },
           "grammar": {
            "type": "boolean"
           },
           "plagiarism": {
            "type": "boolean"
           },
           "deep": {
            "type": "boolean"
           }
          }
         },
         "ui_lang": {
          "type": "string",
          "enum": [
           "en",
           "pt",
           "es",
           "fr",
           "de",
           "it"
          ],
          "default": "en"
         },
         "store": {
          "type": "boolean",
          "description": "Add fingerprints to your comparison library (plagiarism)."
         }
        },
        "required": [
         "text"
        ]
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "PDF, DOCX, TXT, MD or HTML, up to 20 MB."
         },
         "ai": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "grammar": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "plagiarism": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "deep": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "ui_lang": {
          "type": "string"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Report",
      "headers": {
       "x-credits-used": {
        "schema": {
         "type": "integer"
        }
       },
       "x-credits-remaining": {
        "schema": {
         "type": "integer"
        }
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "description": "Full report. Key fields below; see https://probator.ai/docs/api/ for all fields.",
         "properties": {
          "verdict": {
           "type": "object",
           "properties": {
            "key": {
             "type": "string",
             "enum": [
              "human",
              "likely_human",
              "uncertain",
              "mixed",
              "likely_ai",
              "ai",
              "forensics"
             ]
            },
            "label": {
             "type": "string"
            },
            "p_ai": {
             "type": "number"
            },
            "confidence": {
             "type": "string",
             "enum": [
              "low",
              "medium",
              "high"
             ]
            },
            "ai_share": {
             "type": "number"
            },
            "guards": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "evidence": {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          "sentences": {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          "corrections": {
           "type": [
            "object",
            "null"
           ]
          },
          "plagiarism": {
           "type": [
            "object",
            "null"
           ]
          },
          "findings": {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          "provenance": {
           "type": "object",
           "properties": {
            "declared": {
             "type": [
              "string",
              "null"
             ]
            },
            "marks": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           }
          },
          "credits": {
           "type": "object",
           "properties": {
            "used": {
             "type": "integer"
            },
            "remaining": {
             "type": [
              "integer",
              "null"
             ]
            }
           }
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "Missing or invalid key",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "402": {
      "description": "Not enough credits",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "413": {
      "description": "Too many words or file too large",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/grammar": {
   "post": {
    "summary": "Check grammar and style",
    "description": "Grammar and style only (1 credit per 3 words).",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "maxLength": 400000,
          "description": "Text to check."
         },
         "checks": {
          "type": "object",
          "properties": {
           "ai": {
            "type": "boolean"
           },
           "grammar": {
            "type": "boolean"
           },
           "plagiarism": {
            "type": "boolean"
           },
           "deep": {
            "type": "boolean"
           }
          }
         },
         "ui_lang": {
          "type": "string",
          "enum": [
           "en",
           "pt",
           "es",
           "fr",
           "de",
           "it"
          ],
          "default": "en"
         },
         "store": {
          "type": "boolean",
          "description": "Add fingerprints to your comparison library (plagiarism)."
         }
        },
        "required": [
         "text"
        ]
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "PDF, DOCX, TXT, MD or HTML, up to 20 MB."
         },
         "ai": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "grammar": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "plagiarism": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "deep": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "ui_lang": {
          "type": "string"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Report",
      "headers": {
       "x-credits-used": {
        "schema": {
         "type": "integer"
        }
       },
       "x-credits-remaining": {
        "schema": {
         "type": "integer"
        }
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "description": "Full report. Key fields below; see https://probator.ai/docs/api/ for all fields.",
         "properties": {
          "verdict": {
           "type": "object",
           "properties": {
            "key": {
             "type": "string",
             "enum": [
              "human",
              "likely_human",
              "uncertain",
              "mixed",
              "likely_ai",
              "ai",
              "forensics"
             ]
            },
            "label": {
             "type": "string"
            },
            "p_ai": {
             "type": "number"
            },
            "confidence": {
             "type": "string",
             "enum": [
              "low",
              "medium",
              "high"
             ]
            },
            "ai_share": {
             "type": "number"
            },
            "guards": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "evidence": {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          "sentences": {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          "corrections": {
           "type": [
            "object",
            "null"
           ]
          },
          "plagiarism": {
           "type": [
            "object",
            "null"
           ]
          },
          "findings": {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          "provenance": {
           "type": "object",
           "properties": {
            "declared": {
             "type": [
              "string",
              "null"
             ]
            },
            "marks": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           }
          },
          "credits": {
           "type": "object",
           "properties": {
            "used": {
             "type": "integer"
            },
            "remaining": {
             "type": [
              "integer",
              "null"
             ]
            }
           }
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "Missing or invalid key",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "402": {
      "description": "Not enough credits",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "413": {
      "description": "Too many words or file too large",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/plagiarism": {
   "post": {
    "summary": "Check for plagiarism",
    "description": "Plagiarism only (2 credits per word).",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "maxLength": 400000,
          "description": "Text to check."
         },
         "checks": {
          "type": "object",
          "properties": {
           "ai": {
            "type": "boolean"
           },
           "grammar": {
            "type": "boolean"
           },
           "plagiarism": {
            "type": "boolean"
           },
           "deep": {
            "type": "boolean"
           }
          }
         },
         "ui_lang": {
          "type": "string",
          "enum": [
           "en",
           "pt",
           "es",
           "fr",
           "de",
           "it"
          ],
          "default": "en"
         },
         "store": {
          "type": "boolean",
          "description": "Add fingerprints to your comparison library (plagiarism)."
         }
        },
        "required": [
         "text"
        ]
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "PDF, DOCX, TXT, MD or HTML, up to 20 MB."
         },
         "ai": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "grammar": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "plagiarism": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "deep": {
          "type": "string",
          "enum": [
           "true",
           "false"
          ]
         },
         "ui_lang": {
          "type": "string"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Report",
      "headers": {
       "x-credits-used": {
        "schema": {
         "type": "integer"
        }
       },
       "x-credits-remaining": {
        "schema": {
         "type": "integer"
        }
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "description": "Full report. Key fields below; see https://probator.ai/docs/api/ for all fields.",
         "properties": {
          "verdict": {
           "type": "object",
           "properties": {
            "key": {
             "type": "string",
             "enum": [
              "human",
              "likely_human",
              "uncertain",
              "mixed",
              "likely_ai",
              "ai",
              "forensics"
             ]
            },
            "label": {
             "type": "string"
            },
            "p_ai": {
             "type": "number"
            },
            "confidence": {
             "type": "string",
             "enum": [
              "low",
              "medium",
              "high"
             ]
            },
            "ai_share": {
             "type": "number"
            },
            "guards": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "evidence": {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          "sentences": {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          "corrections": {
           "type": [
            "object",
            "null"
           ]
          },
          "plagiarism": {
           "type": [
            "object",
            "null"
           ]
          },
          "findings": {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          "provenance": {
           "type": "object",
           "properties": {
            "declared": {
             "type": [
              "string",
              "null"
             ]
            },
            "marks": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           }
          },
          "credits": {
           "type": "object",
           "properties": {
            "used": {
             "type": "integer"
            },
            "remaining": {
             "type": [
              "integer",
              "null"
             ]
            }
           }
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "Missing or invalid key",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "402": {
      "description": "Not enough credits",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "413": {
      "description": "Too many words or file too large",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detail": {
           "type": "string"
          },
          "code": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/usage": {
   "get": {
    "summary": "Plan and credits",
    "responses": {
     "200": {
      "description": "Balance",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "plan": {
           "type": "string"
          },
          "credits": {
           "type": "object"
          }
         }
        }
       }
      }
     }
    }
   }
  }
 },
 "externalDocs": {
  "description": "MCP server for AI agents: https://probator.ai/mcp",
  "url": "https://probator.ai/docs/api/#mcp"
 }
}