-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
169 lines (169 loc) · 3.99 KB
/
openapi.yaml
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
swagger: "2.0"
info:
title: SD Image Viewer API
version: "2023-04-27"
host: localhost:8080
basePath: /api/v1
schemes:
- http
consumes:
- application/json
produces:
- application/json
paths:
/images:
get:
operationId: getImages
description: List images.
parameters:
- name: query
type: string
in: query
description: Search query.
- name: size
type: string
enum:
- small
- medium
- large
in: query
description: Retrieving the given sized images.
- name: checkpoint
type: string
in: query
description: Retrieving images that use the given checkpoint.
- name: before
type: string
format: date-time
in: query
description: Retrieving images created before the given date time.
- name: after
type: string
format: date-time
in: query
description: Retrieving images created after the given date time.
- name: limit
type: integer
in: query
description: The number of items one page has at most.
- name: page
type: integer
in: query
description: Requesting page number.
- name: order
type: string
enum:
- asc
- desc
in: query
default: desc
responses:
200:
description: A list of images.
schema:
$ref: "#/definitions/ImageList"
default:
description: Error Response
schema:
$ref: "#/definitions/StandardError"
/image/{id}:
get:
operationId: getImage
description: Get an image.
parameters:
- name: id
type: string
in: path
required: true
description: ID of the image file.
- name: If-Modified-Since
type: string
in: header
produces:
- image/png
- application/json
responses:
200:
description: Requested image file.
schema:
type: file
headers:
Cache-Control:
type: string
Last-Modified:
type: string
304:
description: Requested image is not modified.
default:
description: Error Response
schema:
$ref: "#/definitions/StandardError"
/checkpoints:
get:
operationId: getCheckpoints
description: Get a list of checkpoints.
responses:
200:
description: A list of checkpoint names.
schema:
type: array
items:
type: string
default:
description: Error Response
schema:
$ref: "#/definitions/StandardError"
definitions:
ImageList:
properties:
items:
type: array
items:
$ref: "#/definitions/Image"
metadata:
$ref: "#/definitions/Metadata"
Image:
required:
- id
properties:
id:
type: string
description: ID of the image file.
prompt:
type: string
negative-prompt:
type: string
checkpoint:
type: string
pixel:
type: integer
creation-time:
type: string
format: date-time
additionalProperties: true
Metadata:
required:
- currentPage
- totalPages
- totalItems
properties:
currentPage:
type: integer
description: The the current page you are at.
example: 2
totalPages:
type: integer
description: The total number of pages.
example: 16
totalItems:
type: integer
format: int
description: The total number of items available.
example: 46
StandardError:
required:
- message
properties:
message:
type: string
description: The error message.