Skip to content
Source
Sign inSign up
TanStack/schemas
Open History to see the last commit

jina-chat-openapi.json

250 lines6.3 KB

1{
2 "openapi": "3.1.0",
3 "info": {
4 "title": "Jina Search Foundation API",
5 "version": "2026.09.17.0130"
6 },
7 "components": {
8 "schemas": {
9 "ChatCompletionRequest": {
10 "properties": {
11 "messages": {
12 "items": {
13 "$ref": "#/components/schemas/ChatMessage"
14 },
15 "type": "array",
16 "minItems": 1,
17 "title": "Messages"
18 },
19 "model": {
20 "type": "string",
21 "const": "jina-ocr-v1",
22 "title": "Model",
23 "description": "The model to use."
24 },
25 "stream": {
26 "type": "boolean",
27 "title": "Stream",
28 "default": false
29 },
30 "stream_options": {
31 "anyOf": [
32 {
33 "$ref": "#/components/schemas/StreamOptions"
34 },
35 {
36 "type": "null"
37 }
38 ]
39 },
40 "max_completion_tokens": {
41 "anyOf": [
42 {
43 "type": "integer",
44 "minimum": 1.0
45 },
46 {
47 "type": "null"
48 }
49 ],
50 "title": "Max Completion Tokens"
51 },
52 "temperature": {
53 "anyOf": [
54 {
55 "type": "number",
56 "maximum": 2.0,
57 "minimum": 0.0
58 },
59 {
60 "type": "null"
61 }
62 ],
63 "title": "Temperature"
64 },
65 "top_p": {
66 "anyOf": [
67 {
68 "type": "number",
69 "maximum": 1.0,
70 "minimum": 0.0
71 },
72 {
73 "type": "null"
74 }
75 ],
76 "title": "Top P"
77 },
78 "presence_penalty": {
79 "anyOf": [
80 {
81 "type": "number",
82 "maximum": 2.0,
83 "minimum": -2.0
84 },
85 {
86 "type": "null"
87 }
88 ],
89 "title": "Presence Penalty"
90 },
91 "frequency_penalty": {
92 "anyOf": [
93 {
94 "type": "number",
95 "maximum": 2.0,
96 "minimum": -2.0
97 },
98 {
99 "type": "null"
100 }
101 ],
102 "title": "Frequency Penalty"
103 },
104 "stop": {
105 "anyOf": [
106 {
107 "type": "string"
108 },
109 {
110 "items": {
111 "type": "string"
112 },
113 "type": "array"
114 },
115 {
116 "type": "null"
117 }
118 ],
119 "title": "Stop"
120 },
121 "seed": {
122 "anyOf": [
123 {
124 "type": "integer"
125 },
126 {
127 "type": "null"
128 }
129 ],
130 "title": "Seed"
131 },
132 "logprobs": {
133 "anyOf": [
134 {
135 "type": "boolean"
136 },
137 {
138 "type": "null"
139 }
140 ],
141 "title": "Logprobs"
142 },
143 "top_logprobs": {
144 "anyOf": [
145 {
146 "type": "integer",
147 "maximum": 20.0,
148 "minimum": 0.0
149 },
150 {
151 "type": "null"
152 }
153 ],
154 "title": "Top Logprobs"
155 },
156 "logit_bias": {
157 "anyOf": [
158 {
159 "additionalProperties": {
160 "type": "number"
161 },
162 "type": "object"
163 },
164 {
165 "type": "null"
166 }
167 ],
168 "title": "Logit Bias"
169 },
170 "response_format": {
171 "anyOf": [
172 {
173 "oneOf": [
174 {
175 "$ref": "#/components/schemas/ResponseFormatText"
176 },
177 {
178 "$ref": "#/components/schemas/ResponseFormatJSONObject"
179 },
180 {
181 "$ref": "#/components/schemas/ResponseFormatJSONSchema"
182 }
183 ],
184 "discriminator": {
185 "propertyName": "type",
186 "mapping": {
187 "json_object": "#/components/schemas/ResponseFormatJSONObject",
188 "json_schema": "#/components/schemas/ResponseFormatJSONSchema",
189 "text": "#/components/schemas/ResponseFormatText"
190 }
191 }
192 },
193 {
194 "type": "null"
195 }
196 ],
197 "title": "Response Format"
198 }
199 },
200 "type": "object",
201 "required": ["messages", "model"],
202 "title": "ChatCompletionRequest",
203 "description": "The public request body. Every field here reaches the engine."
204 },
205 "ChatMessage": {
206 "properties": {
207 "role": {
208 "type": "string",
209 "enum": ["system", "developer", "user", "assistant"],
210 "title": "Role"
211 },
212 "content": {
213 "anyOf": [
214 {
215 "type": "string"
216 },
217 {
218 "items": {
219 "oneOf": [
220 {
221 "$ref": "#/components/schemas/TextContentPart"
222 },
223 {
224 "$ref": "#/components/schemas/ImageContentPart"
225 }
226 ],
227 "discriminator": {
228 "propertyName": "type",
229 "mapping": {
230 "image_url": "#/components/schemas/ImageContentPart",
231 "text": "#/components/schemas/TextContentPart"
232 }
233 }
234 },
235 "type": "array"
236 },
237 {
238 "type": "null"
239 }
240 ],
241 "title": "Content"
242 }
243 },
244 "type": "object",
245 "required": ["role"],
246 "title": "ChatMessage"
247 }
248 }
249 }