This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopen_api.json
152 lines (152 loc) · 4.92 KB
/
open_api.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
{
"openapi": "3.0.0",
"info": {
"title": "GPTZero API",
"version": "2.0.0",
"description": "API to predict whether text was generated by AI."
},
"servers": [
{
"url": "https://gptzero-chat-plugin.drengskapur.workers.dev"
}
],
"paths": {
"/predict": {
"post": {
"operationId": "predict",
"summary": "This endpoint takes in a single text input and returns the model's result.",
"requestBody": {
"description": "Takes in a JSON as the body of the request where the text input is value to \"document\" key",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"document": {
"type": "string"
}
},
"required": [
"document"
]
}
}
}
},
"responses": {
"200": {
"description": "Successful operation. Returns a DocumentPredictions object containing length-1 array \"documents\" for the input",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DocumentPredictions"
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DocumentContentError"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"DocumentPredictions": {
"type": "object",
"properties": {
"documents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"average_generated_prob": {
"type": "number",
"description": "The average of the probabilties that each sentence was generated by an AI"
},
"completely_generated_prob": {
"type": "number",
"description": "The probability that the entire document was generated by an AI"
},
"overall_burstiness": {
"type": "number",
"description": "The amount of variation in the perplexity of the document. A useful indicator to distinguish AI and human written text"
},
"sentences": {
"type": "array",
"description": "Information about each sentence is contained in this array, and the sentences in the document are listed in order.",
"items": {
"type": "object",
"properties": {
"sentence": {
"type": "string"
},
"perplexity": {
"description": "The lower the perplexity, the more likely an AI would have generated this sentence",
"type": "number"
},
"generated_prob": {
"description": "The probability that this sentence was generated by an AI. Our current model predicts 0/1 labels, but this may change to be a percentage in the future.",
"type": "number"
}
}
}
},
"paragraphs": {
"type": "array",
"description": "Paragraphs are newline-delimited bodies of text in the document",
"items": {
"type": "object",
"properties": {
"start_sentence_index": {
"type": "number",
"description": "The index in the `sentences` array of the first sentence of the paragraph"
},
"num_sentences": {
"type": "number",
"description": "The number of sentences in this paragraph."
},
"completely_generated_prob": {
"type": "number",
"description": "The probability that the entire paragraph was generated by an AI"
}
}
}
}
}
}
}
}
},
"DocumentContentError": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
}
}
},
"securitySchemes": {
"ApiKey": {
"type": "apiKey",
"in": "header",
"name": "X-Api-Key"
}
}
},
"security": [
{
"ApiKey": []
}
]
}