Open History to see the last commit
1{
2 "openapi": "3.1.0",
3 "paths": {
4 "/models/{model_owner}/{model_name}/predictions": {
5 "post": {
6 "operationId": "models.predictions.create",
7 "parameters": [
8 {
9 "in": "path",
10 "name": "model_owner",
11 "required": true,
12 "schema": {
13 "type": "string"
14 }
15 },
16 {
17 "in": "path",
18 "name": "model_name",
19 "required": true,
20 "schema": {
21 "type": "string"
22 }
23 },
24 {
25 "$ref": "#/components/parameters/parameters_prefer_header"
26 },
27 {
28 "$ref": "#/components/parameters/parameters_cancel_after_header"
29 }
30 ],
31 "requestBody": {
32 "content": {
33 "application/json": {
34 "schema": {
35 "$ref": "#/components/schemas/schemas_prediction_request"
36 }
37 }
38 }
39 },
40 "responses": {
41 "201": {
42 "content": {
43 "application/json": {
44 "schema": {
45 "$ref": "#/components/schemas/schemas_prediction_response"
46 }
47 }
48 }
49 },
50 "202": {
51 "content": {
52 "application/json": {
53 "schema": {
54 "$ref": "#/components/schemas/schemas_prediction_response"
55 }
56 }
57 }
58 }
59 },
60 "summary": "Create a prediction using an official model"
61 }
62 }
63 },
64 "components": {
65 "schemas": {
66 "schemas_prediction_request": {
67 "additionalProperties": false,
68 "properties": {
69 "input": {
70 "type": "object"
71 },
72 "stream": {
73 "type": "boolean"
74 },
75 "webhook": {
76 "type": "string"
77 },
78 "webhook_events_filter": {
79 "items": {
80 "enum": ["start", "output", "logs", "completed"],
81 "type": "string"
82 },
83 "type": "array"
84 }
85 },
86 "required": ["input"],
87 "type": "object"
88 },
89 "schemas_prediction_response": {
90 "properties": {
91 "completed_at": {
92 "format": "date-time",
93 "type": "string"
94 },
95 "created_at": {
96 "format": "date-time",
97 "type": "string"
98 },
99 "data_removed": {
100 "type": "boolean"
101 },
102 "deadline": {
103 "format": "date-time",
104 "type": "string"
105 },
106 "deployment": {
107 "type": "string"
108 },
109 "error": {
110 "nullable": true,
111 "type": "string"
112 },
113 "id": {
114 "type": "string"
115 },
116 "input": {
117 "additionalProperties": true,
118 "type": "object"
119 },
120 "logs": {
121 "type": "string"
122 },
123 "metrics": {
124 "additionalProperties": true,
125 "properties": {
126 "total_time": {
127 "type": "number"
128 }
129 },
130 "type": "object"
131 },
132 "model": {
133 "type": "string"
134 },
135 "output": {},
136 "source": {
137 "enum": ["web", "api"],
138 "type": "string"
139 },
140 "started_at": {
141 "format": "date-time",
142 "type": "string"
143 },
144 "status": {
145 "enum": [
146 "starting",
147 "processing",
148 "succeeded",
149 "failed",
150 "canceled",
151 "aborted"
152 ],
153 "type": "string"
154 },
155 "urls": {
156 "properties": {
157 "cancel": {
158 "format": "uri",
159 "type": "string"
160 },
161 "get": {
162 "format": "uri",
163 "type": "string"
164 },
165 "stream": {
166 "format": "uri",
167 "type": "string"
168 },
169 "web": {
170 "format": "uri",
171 "type": "string"
172 }
173 },
174 "required": ["web", "get", "cancel"],
175 "type": "object"
176 },
177 "version": {
178 "oneOf": [
179 {
180 "type": "string"
181 },
182 {
183 "enum": ["hidden"],
184 "type": "string"
185 }
186 ]
187 }
188 },
189 "required": [
190 "id",
191 "model",
192 "version",
193 "input",
194 "output",
195 "data_removed",
196 "error",
197 "status",
198 "created_at",
199 "urls"
200 ],
201 "type": "object"
202 }
203 },
204 "parameters": {
205 "parameters_cancel_after_header": {
206 "in": "header",
207 "name": "Cancel-After",
208 "schema": {
209 "type": "string"
210 }
211 },
212 "parameters_prefer_header": {
213 "in": "header",
214 "name": "Prefer",
215 "schema": {
216 "pattern": "^wait(=([1-9]|[1-9][0-9]|60))?$",
217 "type": "string"
218 }
219 }
220 }
221 }
222}