-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathopenapi.yaml
More file actions
248 lines (248 loc) · 8.14 KB
/
openapi.yaml
File metadata and controls
248 lines (248 loc) · 8.14 KB
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
openapi: 3.0.0
info:
title: OneLLM.dev API
version: 1.0.0
description: This is the official API documentation for OneLLM.dev.
servers:
- url: https://onellm.dev
description: Main API server
paths:
/v1/chat/completions:
post:
summary: Send a chat request to a large language model.
description: Send a chat request to one of the supported large language models.
operationId: chatCompletions
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
endpoint:
type: string
example: /v1/chat/completions
model:
type: string
enum:
- GPT-4.1
- GPT-4.1-Mini
- GPT-4.1-Nano
- GPT-o3
- GPT-o4-mini
- Opus-4
- Sonnet-4
- Haiku-3.5
- Opus-3
- Sonnet-3.7
- Haiku-3
- DeepSeek-Reasoner
- DeepSeek-Chat
- 2.5-Flash-preview
- 2.5-Pro-preview
- 2.0-Flash
- 2.0-Flash-lite
- 1.5-Flash
- 1.5-Flash-8B
- 1.5-Pro
temperature:
type: number
format: float
example: 0.7
stream:
type: boolean
example: true
messages:
type: array
items:
type: object
properties:
role:
type: string
enum: [user, assistant]
content:
type: string
max_tokens:
type: integer
example: 256
top_p:
type: number
format: float
example: 0.95
stop_sequences:
type: array
items:
type: string
example: ["\nUser:", "\nAssistant:"]
tools:
type: array
items:
type: object
properties:
type:
type: string
example: function
function:
type: object
properties:
name:
type: string
example: getWeather
description:
type: string
example: Gets the current weather for a given city.
parameters:
type: object
properties:
type:
type: string
example: object
properties:
type: object
properties:
city:
type: object
properties:
type:
type: string
example: string
description:
type: string
example: The name of the city
required:
type: array
items:
type: string
example: city
contents:
type: array
items:
type: object
properties:
role:
type: string
example: user
parts:
type: array
items:
type: object
properties:
text:
type: string
example: "What's the weather like in Tokyo?"
safety_settings:
type: array
items:
type: object
properties:
category:
type: string
example: harm
threshold:
type: string
example: block_low
generation_config:
type: object
properties:
temperature:
type: number
format: float
example: 0.8
top_p:
type: number
format: float
example: 0.9
top_k:
type: integer
example: 40
candidate_count:
type: integer
example: 1
max_output_tokens:
type: integer
example: 512
stop_sequences:
type: array
items:
type: string
example: ["\n"]
frequency_penalty:
type: number
format: float
example: 0.1
presence_penalty:
type: number
format: float
example: 0.3
n:
type: integer
example: 1
response_format:
type: object
properties:
type:
type: string
example: json
seed:
type: integer
example: 42
tool_choice:
type: string
example: auto
user:
type: string
example: user-1234
logprobs:
type: boolean
example: false
top_logprobs:
type: integer
example: 5
system:
type: string
example: You are a helpful assistant.
top_k:
type: integer
example: 50
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
properties:
provider:
type: string
example: openai
model:
type: string
example: GPT-4.1
role:
type: string
example: assistant
content:
type: string
example: The weather in Tokyo is currently sunny with a high of 28°C and a low of 21°C.
usage:
type: object
properties:
input_tokens:
type: integer
example: 42
output_tokens:
type: integer
example: 57
total_tokens:
type: integer
example: 99
finish_reason:
type: string
example: stop
security:
- BearerAuth: []
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer