OpenAPI Specification
openapi: 3.0.3
info:
title: GPTZero Batch Detection API
description: AI content detection API for analyzing text to detect AI-generated content.
version: 1.0.0
x-jentic-source-url: https://gptzero.stoplight.io/
contact: {}
servers:
- url: https://api.gptzero.me/v2
security:
- ApiKeyAuth: []
tags:
- name: Detection
description: AI content detection
paths:
/predict/text:
post:
tags:
- Detection
summary: Analyze text
operationId: analyzeText
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TextAnalysisInput'
responses:
'200':
description: Analysis complete
content:
application/json:
schema:
$ref: '#/components/schemas/AnalysisResult'
description: Analyze text
/reports:
get:
tags:
- Detection
summary: List reports
operationId: listReports
parameters:
- name: startDate
in: query
schema:
type: string
format: date
- name: endDate
in: query
schema:
type: string
format: date
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Report'
description: List reports
/reports/{reportId}:
get:
tags:
- Detection
summary: Get report
operationId: getReport
parameters:
- name: reportId
in: path
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Report'
description: Get report
components:
schemas:
Report:
type: object
properties:
id:
type: string
documentCount:
type: integer
averageGeneratedProb:
type: number
format: float
classifications:
type: object
properties:
human:
type: integer
ai:
type: integer
mixed:
type: integer
createdAt:
type: string
format: date-time
TextAnalysisInput:
type: object
required:
- document
properties:
document:
type: string
description: Text to analyze
multilingual:
type: boolean
default: false
AnalysisResult:
type: object
properties:
id:
type: string
documentId:
type: string
completely_generated_prob:
type: number
format: float
description: Probability that text is completely AI-generated
average_generated_prob:
type: number
format: float
description: Average probability across sentences
overall_burstiness:
type: number
format: float
perplexity:
type: number
format: float
sentences:
type: array
items:
type: object
properties:
sentence:
type: string
generated_prob:
type: number
format: float
perplexity:
type: number
format: float
classification:
type: string
enum:
- human
- ai
- mixed
createdAt:
type: string
format: date-time
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key