@bodhiapp/ts-client 0.1.26 → 0.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/anthropic.d.ts +1 -0
  2. package/dist/anthropic.js +20 -0
  3. package/dist/anthropic.mjs +2 -0
  4. package/dist/gemini.d.ts +1 -0
  5. package/dist/gemini.js +20 -0
  6. package/dist/gemini.mjs +2 -0
  7. package/dist/index.d.ts +3 -0
  8. package/dist/openai.d.ts +1 -0
  9. package/dist/openai.js +20 -0
  10. package/dist/openai.mjs +2 -0
  11. package/dist/openapi-typescript/openapi-schema-anthropic.d.ts +3391 -0
  12. package/dist/openapi-typescript/openapi-schema-anthropic.ts +3392 -0
  13. package/dist/openapi-typescript/openapi-schema-gemini.d.ts +3708 -0
  14. package/dist/openapi-typescript/openapi-schema-gemini.ts +3709 -0
  15. package/dist/openapi-typescript/openapi-schema-oai.d.ts +4371 -0
  16. package/dist/openapi-typescript/openapi-schema-oai.ts +4372 -0
  17. package/dist/openapi-typescript/openapi-schema.d.ts +1453 -3111
  18. package/dist/openapi-typescript/openapi-schema.ts +1453 -3111
  19. package/dist/types/types.gen.d.ts +477 -1731
  20. package/dist/types/types.gen.ts +516 -1903
  21. package/dist/types-anthropic/index.d.ts +1 -0
  22. package/dist/types-anthropic/index.ts +2 -0
  23. package/dist/types-anthropic/types.gen.d.ts +2241 -0
  24. package/dist/types-anthropic/types.gen.ts +2416 -0
  25. package/dist/types-gemini/index.d.ts +1 -0
  26. package/dist/types-gemini/index.ts +2 -0
  27. package/dist/types-gemini/types.gen.d.ts +4622 -0
  28. package/dist/types-gemini/types.gen.ts +4849 -0
  29. package/dist/types-oai/index.d.ts +1 -0
  30. package/dist/types-oai/index.ts +2 -0
  31. package/dist/types-oai/types.gen.d.ts +4428 -0
  32. package/dist/types-oai/types.gen.ts +4810 -0
  33. package/package.json +39 -7
@@ -0,0 +1,4372 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export interface paths {
7
+ "/api/chat": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ get?: never;
15
+ put?: never;
16
+ /**
17
+ * Chat with Model (Ollama Compatible)
18
+ * @description Creates a chat completion using Ollama API format. Supports both streaming and non-streaming responses with Ollama-specific options and response format.
19
+ */
20
+ post: operations["chatOllamaModel"];
21
+ delete?: never;
22
+ options?: never;
23
+ head?: never;
24
+ patch?: never;
25
+ trace?: never;
26
+ };
27
+ "/api/show": {
28
+ parameters: {
29
+ query?: never;
30
+ header?: never;
31
+ path?: never;
32
+ cookie?: never;
33
+ };
34
+ get?: never;
35
+ put?: never;
36
+ /**
37
+ * Show Model Details (Ollama Compatible)
38
+ * @description Retrieves detailed information about a specific model in Ollama API compatible format. Includes model parameters, template, license, and configuration details.
39
+ */
40
+ post: operations["showOllamaModel"];
41
+ delete?: never;
42
+ options?: never;
43
+ head?: never;
44
+ patch?: never;
45
+ trace?: never;
46
+ };
47
+ "/api/tags": {
48
+ parameters: {
49
+ query?: never;
50
+ header?: never;
51
+ path?: never;
52
+ cookie?: never;
53
+ };
54
+ /**
55
+ * List Available Models (Ollama Compatible)
56
+ * @description Returns a list of all available models in Ollama API compatible format. Includes model metadata such as size, modification time, and format details.
57
+ */
58
+ get: operations["listOllamaModels"];
59
+ put?: never;
60
+ post?: never;
61
+ delete?: never;
62
+ options?: never;
63
+ head?: never;
64
+ patch?: never;
65
+ trace?: never;
66
+ };
67
+ "/v1/chat/completions": {
68
+ parameters: {
69
+ query?: never;
70
+ header?: never;
71
+ path?: never;
72
+ cookie?: never;
73
+ };
74
+ get?: never;
75
+ put?: never;
76
+ /**
77
+ * Create Chat Completion (OpenAI Compatible)
78
+ * @description Creates a chat completion response using the specified model. Supports both streaming and non-streaming responses. Fully compatible with OpenAI's chat completions API format.
79
+ */
80
+ post: operations["createChatCompletion"];
81
+ delete?: never;
82
+ options?: never;
83
+ head?: never;
84
+ patch?: never;
85
+ trace?: never;
86
+ };
87
+ "/v1/embeddings": {
88
+ parameters: {
89
+ query?: never;
90
+ header?: never;
91
+ path?: never;
92
+ cookie?: never;
93
+ };
94
+ get?: never;
95
+ put?: never;
96
+ /**
97
+ * Create Embeddings (OpenAI Compatible)
98
+ * @description Creates embeddings for the input text using the specified model. Fully compatible with OpenAI's embeddings API format.
99
+ */
100
+ post: operations["createEmbedding"];
101
+ delete?: never;
102
+ options?: never;
103
+ head?: never;
104
+ patch?: never;
105
+ trace?: never;
106
+ };
107
+ "/v1/models": {
108
+ parameters: {
109
+ query?: never;
110
+ header?: never;
111
+ path?: never;
112
+ cookie?: never;
113
+ };
114
+ /**
115
+ * List Available Models (OpenAI Compatible)
116
+ * @description Returns a list of all available models in OpenAI API compatible format. Includes user aliases, model aliases, and API provider aliases that can be used with the chat completions endpoint.
117
+ */
118
+ get: operations["listModels"];
119
+ put?: never;
120
+ post?: never;
121
+ delete?: never;
122
+ options?: never;
123
+ head?: never;
124
+ patch?: never;
125
+ trace?: never;
126
+ };
127
+ "/v1/models/{id}": {
128
+ parameters: {
129
+ query?: never;
130
+ header?: never;
131
+ path?: never;
132
+ cookie?: never;
133
+ };
134
+ /**
135
+ * Get Model Details (OpenAI Compatible)
136
+ * @description Retrieves details for a specific model by ID in OpenAI API compatible format. The model ID can be a user alias, model alias, or API provider alias.
137
+ */
138
+ get: operations["getModel"];
139
+ put?: never;
140
+ post?: never;
141
+ delete?: never;
142
+ options?: never;
143
+ head?: never;
144
+ patch?: never;
145
+ trace?: never;
146
+ };
147
+ "/v1/responses": {
148
+ parameters: {
149
+ query?: never;
150
+ header?: never;
151
+ path?: never;
152
+ cookie?: never;
153
+ };
154
+ get?: never;
155
+ put?: never;
156
+ /**
157
+ * Create Response (OpenAI Responses API)
158
+ * @description Creates a model response using the Responses API format. Proxied to the upstream provider. Supports both streaming and non-streaming responses.
159
+ */
160
+ post: operations["createResponse"];
161
+ delete?: never;
162
+ options?: never;
163
+ head?: never;
164
+ patch?: never;
165
+ trace?: never;
166
+ };
167
+ "/v1/responses/{response_id}": {
168
+ parameters: {
169
+ query?: never;
170
+ header?: never;
171
+ path?: never;
172
+ cookie?: never;
173
+ };
174
+ /**
175
+ * Retrieve Response
176
+ * @description Retrieves a previously created response by ID. Note: `model` query parameter is required for multi-provider routing (not part of upstream OpenAI API).
177
+ */
178
+ get: operations["getResponse"];
179
+ put?: never;
180
+ post?: never;
181
+ /**
182
+ * Delete Response
183
+ * @description Deletes a stored response by ID. Note: `model` query parameter is required for multi-provider routing (not part of upstream OpenAI API).
184
+ */
185
+ delete: operations["deleteResponse"];
186
+ options?: never;
187
+ head?: never;
188
+ patch?: never;
189
+ trace?: never;
190
+ };
191
+ "/v1/responses/{response_id}/cancel": {
192
+ parameters: {
193
+ query?: never;
194
+ header?: never;
195
+ path?: never;
196
+ cookie?: never;
197
+ };
198
+ get?: never;
199
+ put?: never;
200
+ /**
201
+ * Cancel Response
202
+ * @description Cancels a background response. Note: `model` query parameter is required for multi-provider routing (not part of upstream OpenAI API).
203
+ */
204
+ post: operations["cancelResponse"];
205
+ delete?: never;
206
+ options?: never;
207
+ head?: never;
208
+ patch?: never;
209
+ trace?: never;
210
+ };
211
+ "/v1/responses/{response_id}/input_items": {
212
+ parameters: {
213
+ query?: never;
214
+ header?: never;
215
+ path?: never;
216
+ cookie?: never;
217
+ };
218
+ /**
219
+ * List Response Input Items
220
+ * @description Lists input items for a given response. Note: `model` query parameter is required for multi-provider routing (not part of upstream OpenAI API).
221
+ */
222
+ get: operations["listResponseInputItems"];
223
+ put?: never;
224
+ post?: never;
225
+ delete?: never;
226
+ options?: never;
227
+ head?: never;
228
+ patch?: never;
229
+ trace?: never;
230
+ };
231
+ }
232
+ export type webhooks = Record<string, never>;
233
+ export interface components {
234
+ schemas: {
235
+ /** @description An annotation that applies to a span of output text. */
236
+ Annotation: (components["schemas"]["FileCitationBody"] & {
237
+ /** @enum {string} */
238
+ type: "file_citation";
239
+ }) | (components["schemas"]["UrlCitationBody"] & {
240
+ /** @enum {string} */
241
+ type: "url_citation";
242
+ }) | (components["schemas"]["ContainerFileCitationBody"] & {
243
+ /** @enum {string} */
244
+ type: "container_file_citation";
245
+ }) | (components["schemas"]["FilePath"] & {
246
+ /** @enum {string} */
247
+ type: "file_path";
248
+ });
249
+ /** @description OpenAI API returns error object on failure */
250
+ ApiError: {
251
+ message: string;
252
+ type?: string | null;
253
+ param?: string | null;
254
+ code?: string | null;
255
+ };
256
+ /**
257
+ * @description Outcome values reported for apply_patch tool call outputs.
258
+ * @enum {string}
259
+ */
260
+ ApplyPatchCallOutputStatus: "completed" | "failed";
261
+ /**
262
+ * @description Outcome values reported for apply_patch tool call outputs.
263
+ * @enum {string}
264
+ */
265
+ ApplyPatchCallOutputStatusParam: "completed" | "failed";
266
+ /**
267
+ * @description Status values reported for apply_patch tool calls.
268
+ * @enum {string}
269
+ */
270
+ ApplyPatchCallStatus: "in_progress" | "completed";
271
+ /**
272
+ * @description Status values reported for apply_patch tool calls.
273
+ * @enum {string}
274
+ */
275
+ ApplyPatchCallStatusParam: "in_progress" | "completed";
276
+ /** @description Instruction describing how to create a file via the apply_patch tool. */
277
+ ApplyPatchCreateFileOperation: {
278
+ /** @description Path of the file to create. */
279
+ path: string;
280
+ /** @description Diff to apply. */
281
+ diff: string;
282
+ };
283
+ /** @description Instruction for creating a new file via the apply_patch tool. */
284
+ ApplyPatchCreateFileOperationParam: {
285
+ /** @description Path of the file to create relative to the workspace root. */
286
+ path: string;
287
+ /** @description Unified diff content to apply when creating the file. */
288
+ diff: string;
289
+ };
290
+ /** @description Instruction describing how to delete a file via the apply_patch tool. */
291
+ ApplyPatchDeleteFileOperation: {
292
+ /** @description Path of the file to delete. */
293
+ path: string;
294
+ };
295
+ /** @description Instruction for deleting an existing file via the apply_patch tool. */
296
+ ApplyPatchDeleteFileOperationParam: {
297
+ /** @description Path of the file to delete relative to the workspace root. */
298
+ path: string;
299
+ };
300
+ /** @description One of the create_file, delete_file, or update_file operations applied via apply_patch. */
301
+ ApplyPatchOperation: (components["schemas"]["ApplyPatchCreateFileOperation"] & {
302
+ /** @enum {string} */
303
+ type: "create_file";
304
+ }) | (components["schemas"]["ApplyPatchDeleteFileOperation"] & {
305
+ /** @enum {string} */
306
+ type: "delete_file";
307
+ }) | (components["schemas"]["ApplyPatchUpdateFileOperation"] & {
308
+ /** @enum {string} */
309
+ type: "update_file";
310
+ });
311
+ /** @description One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool. */
312
+ ApplyPatchOperationParam: (components["schemas"]["ApplyPatchCreateFileOperationParam"] & {
313
+ /** @enum {string} */
314
+ type: "create_file";
315
+ }) | (components["schemas"]["ApplyPatchDeleteFileOperationParam"] & {
316
+ /** @enum {string} */
317
+ type: "delete_file";
318
+ }) | (components["schemas"]["ApplyPatchUpdateFileOperationParam"] & {
319
+ /** @enum {string} */
320
+ type: "update_file";
321
+ });
322
+ /** @description A tool call that applies file diffs by creating, deleting, or updating files. */
323
+ ApplyPatchToolCall: {
324
+ /** @description The unique ID of the apply patch tool call. Populated when this item is returned via API. */
325
+ id: string;
326
+ /** @description The unique ID of the apply patch tool call generated by the model. */
327
+ call_id: string;
328
+ /** @description The status of the apply patch tool call. One of `in_progress` or `completed`. */
329
+ status: components["schemas"]["ApplyPatchCallStatus"];
330
+ /** @description One of the create_file, delete_file, or update_file operations applied via apply_patch. */
331
+ operation: components["schemas"]["ApplyPatchOperation"];
332
+ /** @description The ID of the entity that created this tool call. */
333
+ created_by?: string | null;
334
+ };
335
+ /** @description A tool call representing a request to create, delete, or update files using diff patches. */
336
+ ApplyPatchToolCallItemParam: {
337
+ /** @description The unique ID of the apply patch tool call. Populated when this item is returned via API. */
338
+ id?: string | null;
339
+ /** @description The unique ID of the apply patch tool call generated by the model. */
340
+ call_id: string;
341
+ /** @description The status of the apply patch tool call. One of `in_progress` or `completed`. */
342
+ status: components["schemas"]["ApplyPatchCallStatusParam"];
343
+ /** @description The specific create, delete, or update instruction for the apply_patch tool call. */
344
+ operation: components["schemas"]["ApplyPatchOperationParam"];
345
+ };
346
+ /** @description The output emitted by an apply patch tool call. */
347
+ ApplyPatchToolCallOutput: {
348
+ /** @description The unique ID of the apply patch tool call output. Populated when this item is returned via API. */
349
+ id: string;
350
+ /** @description The unique ID of the apply patch tool call generated by the model. */
351
+ call_id: string;
352
+ /** @description The status of the apply patch tool call output. One of `completed` or `failed`. */
353
+ status: components["schemas"]["ApplyPatchCallOutputStatus"];
354
+ /** @description Optional textual output returned by the apply patch tool. */
355
+ output?: string | null;
356
+ /** @description The ID of the entity that created this tool call output. */
357
+ created_by?: string | null;
358
+ };
359
+ /** @description The streamed output emitted by an apply patch tool call. */
360
+ ApplyPatchToolCallOutputItemParam: {
361
+ /** @description The unique ID of the apply patch tool call output. Populated when this item is returned via API. */
362
+ id?: string | null;
363
+ /** @description The unique ID of the apply patch tool call generated by the model. */
364
+ call_id: string;
365
+ /** @description The status of the apply patch tool call output. One of `completed` or `failed`. */
366
+ status: components["schemas"]["ApplyPatchCallOutputStatusParam"];
367
+ /** @description Optional human-readable log text from the apply patch tool (e.g., patch results or errors). */
368
+ output?: string | null;
369
+ };
370
+ /** @description Instruction describing how to update a file via the apply_patch tool. */
371
+ ApplyPatchUpdateFileOperation: {
372
+ /** @description Path of the file to update. */
373
+ path: string;
374
+ /** @description Diff to apply. */
375
+ diff: string;
376
+ };
377
+ /** @description Instruction for updating an existing file via the apply_patch tool. */
378
+ ApplyPatchUpdateFileOperationParam: {
379
+ /** @description Path of the file to update relative to the workspace root. */
380
+ path: string;
381
+ /** @description Unified diff content to apply to the existing file. */
382
+ diff: string;
383
+ };
384
+ /**
385
+ * @description The role for an output message - always `assistant`.
386
+ * This type ensures type safety by only allowing the assistant role.
387
+ * @enum {string}
388
+ */
389
+ AssistantRole: "assistant";
390
+ Billing: {
391
+ payer: string;
392
+ };
393
+ ChatChoice: {
394
+ /**
395
+ * Format: int32
396
+ * @description The index of the choice in the list of choices.
397
+ */
398
+ index: number;
399
+ message: components["schemas"]["ChatCompletionResponseMessage"];
400
+ finish_reason?: null | components["schemas"]["FinishReason"];
401
+ logprobs?: null | components["schemas"]["ChatChoiceLogprobs"];
402
+ };
403
+ ChatChoiceLogprobs: {
404
+ /** @description A list of message content tokens with log probability information. */
405
+ content?: components["schemas"]["ChatCompletionTokenLogprob"][] | null;
406
+ refusal?: components["schemas"]["ChatCompletionTokenLogprob"][] | null;
407
+ };
408
+ ChatChoiceStream: {
409
+ /**
410
+ * Format: int32
411
+ * @description The index of the choice in the list of choices.
412
+ */
413
+ index: number;
414
+ delta: components["schemas"]["ChatCompletionStreamResponseDelta"];
415
+ finish_reason?: null | components["schemas"]["FinishReason"];
416
+ logprobs?: null | components["schemas"]["ChatChoiceLogprobs"];
417
+ };
418
+ ChatCompletionAllowedTools: {
419
+ /** @description Constrains the tools available to the model to a pre-defined set.
420
+ *
421
+ * `auto` allows the model to pick from among the allowed tools and generate a
422
+ * message.
423
+ *
424
+ * `required` requires the model to call one or more of the allowed tools. */
425
+ mode: components["schemas"]["ToolChoiceAllowedMode"];
426
+ /** @description A list of tool definitions that the model should be allowed to call.
427
+ *
428
+ * For the Chat Completions API, the list of tool definitions might look like:
429
+ * ```json
430
+ * [
431
+ * { "type": "function", "function": { "name": "get_weather" } },
432
+ * { "type": "function", "function": { "name": "get_time" } }
433
+ * ]
434
+ * ``` */
435
+ tools: Record<string, never>[];
436
+ };
437
+ ChatCompletionAllowedToolsChoice: {
438
+ allowed_tools: components["schemas"]["ChatCompletionAllowedTools"][];
439
+ };
440
+ ChatCompletionAudio: {
441
+ /** @description The voice the model uses to respond. Supported built-in voices are `alloy`, `ash`,
442
+ * `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`, `marin`, and `cedar`. */
443
+ voice: components["schemas"]["ChatCompletionAudioVoice"];
444
+ /** @description Specifies the output audio format. Must be one of `wav`, `aac`, `mp3`, `flac`, `opus`, or `pcm16`. */
445
+ format: components["schemas"]["ChatCompletionAudioFormat"];
446
+ };
447
+ /** @enum {string} */
448
+ ChatCompletionAudioFormat: "wav" | "aac" | "mp3" | "flac" | "opus" | "pcm16";
449
+ ChatCompletionAudioVoice: "alloy" | "ash" | "ballad" | "coral" | "echo" | "fable" | "nova" | "onyx" | "sage" | "shimmer" | {
450
+ other: string;
451
+ };
452
+ ChatCompletionFunctionCall: "none" | "auto" | {
453
+ /** @description Forces the model to call the specified function. */
454
+ Function: {
455
+ name: string;
456
+ };
457
+ };
458
+ ChatCompletionFunctions: {
459
+ /** @description The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. */
460
+ name: string;
461
+ /** @description A description of what the function does, used by the model to choose when and how to call the function. */
462
+ description?: string | null;
463
+ /** @description The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
464
+ *
465
+ * Omitting `parameters` defines a function with an empty parameter list. */
466
+ parameters: Record<string, never>;
467
+ };
468
+ ChatCompletionMessageCustomToolCall: {
469
+ /** @description The ID of the tool call. */
470
+ id: string;
471
+ /** @description The custom tool that the model called. */
472
+ custom_tool: components["schemas"]["CustomTool"];
473
+ };
474
+ ChatCompletionMessageToolCall: {
475
+ /** @description The ID of the tool call. */
476
+ id: string;
477
+ /** @description The function that the model called. */
478
+ function: components["schemas"]["FunctionCall"];
479
+ };
480
+ ChatCompletionMessageToolCallChunk: {
481
+ /** Format: int32 */
482
+ index: number;
483
+ /** @description The ID of the tool call. */
484
+ id?: string | null;
485
+ type?: null | components["schemas"]["FunctionType"];
486
+ function?: null | components["schemas"]["FunctionCallStream"];
487
+ };
488
+ ChatCompletionMessageToolCalls: (components["schemas"]["ChatCompletionMessageToolCall"] & {
489
+ /** @enum {string} */
490
+ type: "function";
491
+ }) | (components["schemas"]["ChatCompletionMessageCustomToolCall"] & {
492
+ /** @enum {string} */
493
+ type: "custom";
494
+ });
495
+ /** @description Specifies a tool the model should use. Use to force the model to call a specific function. */
496
+ ChatCompletionNamedToolChoice: {
497
+ function: components["schemas"]["FunctionName"];
498
+ };
499
+ ChatCompletionNamedToolChoiceCustom: {
500
+ custom: components["schemas"]["CustomName"];
501
+ };
502
+ ChatCompletionRequestAssistantMessage: {
503
+ content?: null | components["schemas"]["ChatCompletionRequestAssistantMessageContent"];
504
+ /** @description The refusal message by the assistant. */
505
+ refusal?: string | null;
506
+ /** @description An optional name for the participant. Provides the model information to differentiate between participants of the same role. */
507
+ name?: string | null;
508
+ audio?: null | components["schemas"]["ChatCompletionRequestAssistantMessageAudio"];
509
+ tool_calls?: components["schemas"]["ChatCompletionMessageToolCalls"][] | null;
510
+ function_call?: null | components["schemas"]["FunctionCall"];
511
+ };
512
+ ChatCompletionRequestAssistantMessageAudio: {
513
+ /** @description Unique identifier for a previous audio response from the model. */
514
+ id: string;
515
+ };
516
+ ChatCompletionRequestAssistantMessageContent: string | components["schemas"]["ChatCompletionRequestAssistantMessageContentPart"][];
517
+ ChatCompletionRequestAssistantMessageContentPart: (components["schemas"]["ChatCompletionRequestMessageContentPartText"] & {
518
+ /** @enum {string} */
519
+ type: "text";
520
+ }) | (components["schemas"]["ChatCompletionRequestMessageContentPartRefusal"] & {
521
+ /** @enum {string} */
522
+ type: "refusal";
523
+ });
524
+ ChatCompletionRequestDeveloperMessage: {
525
+ /** @description The contents of the developer message. */
526
+ content: components["schemas"]["ChatCompletionRequestDeveloperMessageContent"];
527
+ /** @description An optional name for the participant. Provides the model information to differentiate between participants of the same role. */
528
+ name?: string | null;
529
+ };
530
+ ChatCompletionRequestDeveloperMessageContent: string | components["schemas"]["ChatCompletionRequestDeveloperMessageContentPart"][];
531
+ ChatCompletionRequestDeveloperMessageContentPart: components["schemas"]["ChatCompletionRequestMessageContentPartText"] & {
532
+ /** @enum {string} */
533
+ type: "text";
534
+ };
535
+ ChatCompletionRequestFunctionMessage: {
536
+ /** @description The return value from the function call, to return to the model. */
537
+ content?: string | null;
538
+ /** @description The name of the function to call. */
539
+ name: string;
540
+ };
541
+ ChatCompletionRequestMessage: (components["schemas"]["ChatCompletionRequestDeveloperMessage"] & {
542
+ /** @enum {string} */
543
+ role: "developer";
544
+ }) | (components["schemas"]["ChatCompletionRequestSystemMessage"] & {
545
+ /** @enum {string} */
546
+ role: "system";
547
+ }) | (components["schemas"]["ChatCompletionRequestUserMessage"] & {
548
+ /** @enum {string} */
549
+ role: "user";
550
+ }) | (components["schemas"]["ChatCompletionRequestAssistantMessage"] & {
551
+ /** @enum {string} */
552
+ role: "assistant";
553
+ }) | (components["schemas"]["ChatCompletionRequestToolMessage"] & {
554
+ /** @enum {string} */
555
+ role: "tool";
556
+ }) | (components["schemas"]["ChatCompletionRequestFunctionMessage"] & {
557
+ /** @enum {string} */
558
+ role: "function";
559
+ });
560
+ /** @description Learn about [audio inputs](https://platform.openai.com/docs/guides/audio). */
561
+ ChatCompletionRequestMessageContentPartAudio: {
562
+ input_audio: components["schemas"]["InputAudio"];
563
+ };
564
+ ChatCompletionRequestMessageContentPartFile: {
565
+ file: components["schemas"]["FileObject"];
566
+ };
567
+ ChatCompletionRequestMessageContentPartImage: {
568
+ image_url: components["schemas"]["ImageUrl"];
569
+ };
570
+ ChatCompletionRequestMessageContentPartRefusal: {
571
+ /** @description The refusal message generated by the model. */
572
+ refusal: string;
573
+ };
574
+ ChatCompletionRequestMessageContentPartText: {
575
+ text: string;
576
+ };
577
+ ChatCompletionRequestSystemMessage: {
578
+ /** @description The contents of the system message. */
579
+ content: components["schemas"]["ChatCompletionRequestSystemMessageContent"];
580
+ /** @description An optional name for the participant. Provides the model information to differentiate between participants of the same role. */
581
+ name?: string | null;
582
+ };
583
+ ChatCompletionRequestSystemMessageContent: string | components["schemas"]["ChatCompletionRequestSystemMessageContentPart"][];
584
+ ChatCompletionRequestSystemMessageContentPart: components["schemas"]["ChatCompletionRequestMessageContentPartText"] & {
585
+ /** @enum {string} */
586
+ type: "text";
587
+ };
588
+ /** @description Tool message */
589
+ ChatCompletionRequestToolMessage: {
590
+ /** @description The contents of the tool message. */
591
+ content: components["schemas"]["ChatCompletionRequestToolMessageContent"];
592
+ tool_call_id: string;
593
+ };
594
+ ChatCompletionRequestToolMessageContent: string | components["schemas"]["ChatCompletionRequestToolMessageContentPart"][];
595
+ ChatCompletionRequestToolMessageContentPart: components["schemas"]["ChatCompletionRequestMessageContentPartText"] & {
596
+ /** @enum {string} */
597
+ type: "text";
598
+ };
599
+ ChatCompletionRequestUserMessage: {
600
+ /** @description The contents of the user message. */
601
+ content: components["schemas"]["ChatCompletionRequestUserMessageContent"];
602
+ /** @description An optional name for the participant. Provides the model information to differentiate between participants of the same role. */
603
+ name?: string | null;
604
+ };
605
+ ChatCompletionRequestUserMessageContent: string | components["schemas"]["ChatCompletionRequestUserMessageContentPart"][];
606
+ ChatCompletionRequestUserMessageContentPart: (components["schemas"]["ChatCompletionRequestMessageContentPartText"] & {
607
+ /** @enum {string} */
608
+ type: "text";
609
+ }) | (components["schemas"]["ChatCompletionRequestMessageContentPartImage"] & {
610
+ /** @enum {string} */
611
+ type: "image_url";
612
+ }) | (components["schemas"]["ChatCompletionRequestMessageContentPartAudio"] & {
613
+ /** @enum {string} */
614
+ type: "input_audio";
615
+ }) | (components["schemas"]["ChatCompletionRequestMessageContentPartFile"] & {
616
+ /** @enum {string} */
617
+ type: "file";
618
+ });
619
+ /** @description A chat completion message generated by the model. */
620
+ ChatCompletionResponseMessage: {
621
+ /** @description The contents of the message. */
622
+ content?: string | null;
623
+ /** @description The refusal message generated by the model. */
624
+ refusal?: string | null;
625
+ /** @description The tool calls generated by the model, such as function calls. */
626
+ tool_calls?: components["schemas"]["ChatCompletionMessageToolCalls"][] | null;
627
+ annotations?: components["schemas"]["ChatCompletionResponseMessageAnnotation"][] | null;
628
+ /** @description The role of the author of this message. */
629
+ role: components["schemas"]["Role"];
630
+ function_call?: null | components["schemas"]["FunctionCall"];
631
+ audio?: null | components["schemas"]["ChatCompletionResponseMessageAudio"];
632
+ };
633
+ ChatCompletionResponseMessageAnnotation: {
634
+ url_citation: components["schemas"]["UrlCitation"];
635
+ /** @enum {string} */
636
+ type: "url_citation";
637
+ };
638
+ ChatCompletionResponseMessageAudio: {
639
+ /** @description Unique identifier for this audio response. */
640
+ id: string;
641
+ /**
642
+ * Format: int64
643
+ * @description The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations.
644
+ */
645
+ expires_at: number;
646
+ /** @description Base64 encoded audio bytes generated by the model, in the format specified in the request. */
647
+ data: string;
648
+ /** @description Transcript of the audio generated by the model. */
649
+ transcript: string;
650
+ };
651
+ /** @description Options for streaming response. Only set this when you set `stream: true`. */
652
+ ChatCompletionStreamOptions: {
653
+ /** @description If set, an additional chunk will be streamed before the `data: [DONE]`
654
+ * message. The `usage` field on this chunk shows the token usage statistics
655
+ * for the entire request, and the `choices` field will always be an empty
656
+ * array.
657
+ *
658
+ * All other chunks will also include a `usage` field, but with a null
659
+ * value. **NOTE:** If the stream is interrupted, you may not receive the
660
+ * final usage chunk which contains the total token usage for the request. */
661
+ include_usage?: boolean | null;
662
+ /** @description When true, stream obfuscation will be enabled. Stream obfuscation adds
663
+ * random characters to an `obfuscation` field on streaming delta events to
664
+ * normalize payload sizes as a mitigation to certain side-channel attacks.
665
+ * These obfuscation fields are included by default, but add a small amount
666
+ * of overhead to the data stream. You can set `include_obfuscation` to
667
+ * false to optimize for bandwidth if you trust the network links between
668
+ * your application and the OpenAI API. */
669
+ include_obfuscation?: boolean | null;
670
+ };
671
+ /** @description A chat completion delta generated by streamed model responses. */
672
+ ChatCompletionStreamResponseDelta: {
673
+ /** @description The contents of the chunk message. */
674
+ content?: string | null;
675
+ function_call?: null | components["schemas"]["FunctionCallStream"];
676
+ tool_calls?: components["schemas"]["ChatCompletionMessageToolCallChunk"][] | null;
677
+ role?: null | components["schemas"]["Role"];
678
+ /** @description The refusal message generated by the model. */
679
+ refusal?: string | null;
680
+ };
681
+ ChatCompletionTokenLogprob: {
682
+ /** @description The token. */
683
+ token: string;
684
+ /**
685
+ * Format: float
686
+ * @description The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.
687
+ */
688
+ logprob: number;
689
+ /** @description A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. */
690
+ bytes?: number[] | null;
691
+ /** @description List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned. */
692
+ top_logprobs: components["schemas"]["TopLogprobs"][];
693
+ };
694
+ ChatCompletionTool: {
695
+ function: components["schemas"]["FunctionObject"];
696
+ };
697
+ /** @description Controls which (if any) tool is called by the model.
698
+ * `none` means the model will not call any tool and instead generates a message.
699
+ * `auto` means the model can pick between generating a message or calling one or more tools.
700
+ * `required` means the model must call one or more tools.
701
+ * Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
702
+ *
703
+ * `none` is the default when no tools are present. `auto` is the default if tools are present. */
704
+ ChatCompletionToolChoiceOption: (components["schemas"]["ChatCompletionAllowedToolsChoice"] & {
705
+ /** @enum {string} */
706
+ type: "allowed_tools";
707
+ }) | (components["schemas"]["ChatCompletionNamedToolChoice"] & {
708
+ /** @enum {string} */
709
+ type: "function";
710
+ }) | (components["schemas"]["ChatCompletionNamedToolChoiceCustom"] & {
711
+ /** @enum {string} */
712
+ type: "custom";
713
+ }) | (components["schemas"]["ToolChoiceOptions"] & {
714
+ /** @enum {string} */
715
+ type: "mode";
716
+ });
717
+ ChatCompletionTools: (components["schemas"]["ChatCompletionTool"] & {
718
+ /** @enum {string} */
719
+ type: "function";
720
+ }) | (components["schemas"]["CustomToolChatCompletions"] & {
721
+ /** @enum {string} */
722
+ type: "custom";
723
+ });
724
+ ChatRequest: {
725
+ model: string;
726
+ messages: components["schemas"]["Message"][];
727
+ stream?: boolean | null;
728
+ format?: string | null;
729
+ keep_alive?: null | components["schemas"]["Duration"];
730
+ options?: null | components["schemas"]["Options"];
731
+ };
732
+ /** @enum {string} */
733
+ ClickButtonType: "left" | "right" | "wheel" | "back" | "forward";
734
+ /** @description A click action. */
735
+ ClickParam: {
736
+ /** @description Indicates which mouse button was pressed during the click. One of `left`,
737
+ * `right`, `wheel`, `back`, or `forward`. */
738
+ button: components["schemas"]["ClickButtonType"];
739
+ /**
740
+ * Format: int32
741
+ * @description The x-coordinate where the click occurred.
742
+ */
743
+ x: number;
744
+ /**
745
+ * Format: int32
746
+ * @description The y-coordinate where the click occurred.
747
+ */
748
+ y: number;
749
+ };
750
+ /** @description Auto configuration for code interpreter container. */
751
+ CodeInterpreterContainerAuto: {
752
+ /** @description An optional list of uploaded files to make available to your code. */
753
+ file_ids?: string[] | null;
754
+ /** Format: int64 */
755
+ memory_limit?: number | null;
756
+ };
757
+ CodeInterpreterOutputImage: {
758
+ /** @description The URL of the image output from the code interpreter. */
759
+ url: string;
760
+ };
761
+ CodeInterpreterOutputLogs: {
762
+ /** @description The logs output from the code interpreter. */
763
+ logs: string;
764
+ };
765
+ CodeInterpreterTool: {
766
+ /** @description The code interpreter container. Can be a container ID or an object that
767
+ * specifies uploaded file IDs to make available to your code, along with an
768
+ * optional `memory_limit` setting. */
769
+ container: components["schemas"]["CodeInterpreterToolContainer"];
770
+ };
771
+ /** @description Output of a code interpreter request. */
772
+ CodeInterpreterToolCall: {
773
+ /** @description The code to run, or null if not available. */
774
+ code?: string | null;
775
+ /** @description ID of the container used to run the code. */
776
+ container_id: string;
777
+ /** @description The unique ID of the code interpreter tool call. */
778
+ id: string;
779
+ /** @description The outputs generated by the code interpreter, such as logs or images.
780
+ * Can be null if no outputs are available. */
781
+ outputs?: components["schemas"]["CodeInterpreterToolCallOutput"][] | null;
782
+ /** @description The status of the code interpreter tool call.
783
+ * Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`. */
784
+ status: components["schemas"]["CodeInterpreterToolCallStatus"];
785
+ };
786
+ /** @description Individual result from a code interpreter: either logs or files. */
787
+ CodeInterpreterToolCallOutput: (components["schemas"]["CodeInterpreterOutputLogs"] & {
788
+ /** @enum {string} */
789
+ type: "logs";
790
+ }) | (components["schemas"]["CodeInterpreterOutputImage"] & {
791
+ /** @enum {string} */
792
+ type: "image";
793
+ });
794
+ /** @enum {string} */
795
+ CodeInterpreterToolCallStatus: "in_progress" | "completed" | "incomplete" | "interpreting" | "failed";
796
+ /** @description Container configuration for a code interpreter. */
797
+ CodeInterpreterToolContainer: (components["schemas"]["CodeInterpreterContainerAuto"] & {
798
+ /** @enum {string} */
799
+ type: "auto";
800
+ }) | {
801
+ /** @enum {string} */
802
+ type: "container_i_d";
803
+ };
804
+ /** @description A compaction item generated by the `/v1/responses/compact` API. */
805
+ CompactionBody: {
806
+ /** @description The unique ID of the compaction item. */
807
+ id: string;
808
+ /** @description The encrypted content that was produced by compaction. */
809
+ encrypted_content: string;
810
+ /** @description The identifier of the actor that created the item. */
811
+ created_by?: string | null;
812
+ };
813
+ /** @description A compaction item generated by the `/v1/responses/compact` API. */
814
+ CompactionSummaryItemParam: {
815
+ /** @description The ID of the compaction item. */
816
+ id?: string | null;
817
+ /** @description The encrypted content of the compaction summary. */
818
+ encrypted_content: string;
819
+ };
820
+ /** @description Single comparison filter. */
821
+ ComparisonFilter: {
822
+ /** @description Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
823
+ * - `eq`: equals
824
+ * - `ne`: not equal
825
+ * - `gt`: greater than
826
+ * - `gte`: greater than or equal
827
+ * - `lt`: less than
828
+ * - `lte`: less than or equal
829
+ * - `in`: in
830
+ * - `nin`: not in */
831
+ type: components["schemas"]["ComparisonType"];
832
+ /** @description The key to compare against the value. */
833
+ key: string;
834
+ /** @description The value to compare against the attribute key; supports string, number, or boolean types. */
835
+ value: Record<string, never>;
836
+ };
837
+ /** @enum {string} */
838
+ ComparisonType: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "in" | "nin";
839
+ /** @description Breakdown of tokens used in a completion. */
840
+ CompletionTokensDetails: {
841
+ /** Format: int32 */
842
+ accepted_prediction_tokens?: number | null;
843
+ /**
844
+ * Format: int32
845
+ * @description Audio input tokens generated by the model.
846
+ */
847
+ audio_tokens?: number | null;
848
+ /**
849
+ * Format: int32
850
+ * @description Tokens generated by the model for reasoning.
851
+ */
852
+ reasoning_tokens?: number | null;
853
+ /**
854
+ * Format: int32
855
+ * @description When using Predicted Outputs, the number of tokens in the
856
+ * prediction that did not appear in the completion. However, like
857
+ * reasoning tokens, these tokens are still counted in the total
858
+ * completion tokens for purposes of billing, output, and context
859
+ * window limits.
860
+ */
861
+ rejected_prediction_tokens?: number | null;
862
+ };
863
+ /** @description Usage statistics for the completion request. */
864
+ CompletionUsage: {
865
+ /**
866
+ * Format: int32
867
+ * @description Number of tokens in the prompt.
868
+ */
869
+ prompt_tokens: number;
870
+ /**
871
+ * Format: int32
872
+ * @description Number of tokens in the generated completion.
873
+ */
874
+ completion_tokens: number;
875
+ /**
876
+ * Format: int32
877
+ * @description Total number of tokens used in the request (prompt + completion).
878
+ */
879
+ total_tokens: number;
880
+ prompt_tokens_details?: null | components["schemas"]["PromptTokensDetails"];
881
+ completion_tokens_details?: null | components["schemas"]["CompletionTokensDetails"];
882
+ };
883
+ /** @description Combine multiple filters using `and` or `or`. */
884
+ CompoundFilter: {
885
+ /** @description 'Type of operation: `and` or `or`.' */
886
+ type: components["schemas"]["CompoundType"];
887
+ /** @description Array of filters to combine. Items can be ComparisonFilter or CompoundFilter. */
888
+ filters: Record<string, never>[];
889
+ };
890
+ /** @enum {string} */
891
+ CompoundType: "and" | "or";
892
+ /** @description Represents all user‐triggered actions. */
893
+ ComputerAction: (components["schemas"]["ClickParam"] & {
894
+ /** @enum {string} */
895
+ type: "click";
896
+ }) | (components["schemas"]["DoubleClickAction"] & {
897
+ /** @enum {string} */
898
+ type: "double_click";
899
+ }) | (components["schemas"]["DragParam"] & {
900
+ /** @enum {string} */
901
+ type: "drag";
902
+ }) | (components["schemas"]["KeyPressAction"] & {
903
+ /** @enum {string} */
904
+ type: "keypress";
905
+ }) | (components["schemas"]["MoveParam"] & {
906
+ /** @enum {string} */
907
+ type: "move";
908
+ }) | {
909
+ /** @enum {string} */
910
+ type: "screenshot";
911
+ } | (components["schemas"]["ScrollParam"] & {
912
+ /** @enum {string} */
913
+ type: "scroll";
914
+ }) | (components["schemas"]["TypeParam"] & {
915
+ /** @enum {string} */
916
+ type: "type";
917
+ }) | {
918
+ /** @enum {string} */
919
+ type: "wait";
920
+ };
921
+ ComputerCallOutputItemParam: {
922
+ /** @description The ID of the computer tool call that produced the output. */
923
+ call_id: string;
924
+ /** @description A computer screenshot image used with the computer use tool. */
925
+ output: components["schemas"]["ComputerScreenshotImage"];
926
+ /** @description The safety checks reported by the API that have been acknowledged by the developer. */
927
+ acknowledged_safety_checks?: components["schemas"]["ComputerCallSafetyCheckParam"][] | null;
928
+ /** @description The unique ID of the computer tool call output. Optional when creating. */
929
+ id?: string | null;
930
+ status?: null | components["schemas"]["OutputStatus"];
931
+ };
932
+ ComputerCallSafetyCheckParam: {
933
+ /** @description The ID of the pending safety check. */
934
+ id: string;
935
+ /** @description The type of the pending safety check. */
936
+ code?: string | null;
937
+ /** @description Details about the pending safety check. */
938
+ message?: string | null;
939
+ };
940
+ /** @enum {string} */
941
+ ComputerEnvironment: "windows" | "mac" | "linux" | "ubuntu" | "browser";
942
+ /** @description A computer screenshot image used with the computer use tool. */
943
+ ComputerScreenshotImage: {
944
+ /** @description Specifies the event type. For a computer screenshot, this property is always
945
+ * set to `computer_screenshot`. */
946
+ type: components["schemas"]["ComputerScreenshotImageType"];
947
+ /** @description The identifier of an uploaded file that contains the screenshot. */
948
+ file_id?: string | null;
949
+ /** @description The URL of the screenshot image. */
950
+ image_url?: string | null;
951
+ };
952
+ /** @enum {string} */
953
+ ComputerScreenshotImageType: "computer_screenshot";
954
+ /** @description A tool that controls a virtual computer. Learn more about the
955
+ * [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). */
956
+ ComputerTool: Record<string, never>;
957
+ /** @description Output from a computer tool call. */
958
+ ComputerToolCall: {
959
+ action?: null | components["schemas"]["ComputerAction"];
960
+ /** @description Flattened batched actions for `computer_use`. Each action includes a
961
+ * `type` discriminator and action-specific fields. */
962
+ actions?: components["schemas"]["ComputerAction"][] | null;
963
+ /** @description An identifier used when responding to the tool call with output. */
964
+ call_id: string;
965
+ /** @description The unique ID of the computer call. */
966
+ id: string;
967
+ /** @description The pending safety checks for the computer call. */
968
+ pending_safety_checks: components["schemas"]["ComputerCallSafetyCheckParam"][];
969
+ /** @description The status of the item. One of `in_progress`, `completed`, or `incomplete`.
970
+ * Populated when items are returned via API. */
971
+ status: components["schemas"]["OutputStatus"];
972
+ };
973
+ ComputerUsePreviewTool: {
974
+ /** @description The type of computer environment to control. */
975
+ environment: components["schemas"]["ComputerEnvironment"];
976
+ /**
977
+ * Format: int32
978
+ * @description The width of the computer display.
979
+ */
980
+ display_width: number;
981
+ /**
982
+ * Format: int32
983
+ * @description The height of the computer display.
984
+ */
985
+ display_height: number;
986
+ };
987
+ /** @description Automatically creates a container for the request. */
988
+ ContainerAutoParam: {
989
+ /** @description An optional list of uploaded file IDs to make available in the container. */
990
+ file_ids?: string[] | null;
991
+ network_policy?: null | components["schemas"]["ContainerNetworkPolicy"];
992
+ /** @description An optional list of skills to make available in the container. */
993
+ skills?: components["schemas"]["SkillParam"][] | null;
994
+ };
995
+ ContainerFileCitationBody: {
996
+ /** @description The ID of the container file. */
997
+ container_id: string;
998
+ /**
999
+ * Format: int32
1000
+ * @description The index of the last character of the container file citation in the message.
1001
+ */
1002
+ end_index: number;
1003
+ /** @description The ID of the file. */
1004
+ file_id: string;
1005
+ /** @description The filename of the container file cited. */
1006
+ filename: string;
1007
+ /**
1008
+ * Format: int32
1009
+ * @description The index of the first character of the container file citation in the message.
1010
+ */
1011
+ start_index: number;
1012
+ };
1013
+ /** @description Network access policy for a container. */
1014
+ ContainerNetworkPolicy: {
1015
+ /** @enum {string} */
1016
+ type: "disabled";
1017
+ } | (components["schemas"]["ContainerNetworkPolicyAllowlistDetails"] & {
1018
+ /** @enum {string} */
1019
+ type: "allowlist";
1020
+ });
1021
+ /** @description Details for an allowlist network policy. */
1022
+ ContainerNetworkPolicyAllowlistDetails: {
1023
+ /** @description A list of allowed domains. */
1024
+ allowed_domains: string[];
1025
+ /** @description Optional domain-scoped secrets for allowlisted domains. */
1026
+ domain_secrets?: components["schemas"]["ContainerNetworkPolicyDomainSecretParam"][] | null;
1027
+ };
1028
+ /** @description A domain-scoped secret injected for allowlisted domains. */
1029
+ ContainerNetworkPolicyDomainSecretParam: {
1030
+ /** @description The domain associated with the secret. */
1031
+ domain: string;
1032
+ /** @description The name of the secret to inject for the domain. */
1033
+ name: string;
1034
+ /** @description The secret value to inject for the domain. */
1035
+ value: string;
1036
+ };
1037
+ /** @description References a container created with the /v1/containers endpoint. */
1038
+ ContainerReferenceParam: {
1039
+ /** @description The ID of the referenced container. */
1040
+ container_id: string;
1041
+ };
1042
+ /** @description A resource reference to a container by ID. */
1043
+ ContainerReferenceResource: {
1044
+ /** @description The ID of the referenced container. */
1045
+ container_id: string;
1046
+ };
1047
+ /** @description The conversation that this response belonged to. Input items and output items from this
1048
+ * response were automatically added to this conversation. */
1049
+ Conversation: {
1050
+ /** @description The unique ID of the conversation that this response was associated with. */
1051
+ id: string;
1052
+ };
1053
+ ConversationParam: string | components["schemas"]["Conversation"];
1054
+ /** @description An x/y coordinate pair. */
1055
+ CoordParam: {
1056
+ /**
1057
+ * Format: int32
1058
+ * @description The x-coordinate.
1059
+ */
1060
+ x: number;
1061
+ /**
1062
+ * Format: int32
1063
+ * @description The y-coordinate.
1064
+ */
1065
+ y: number;
1066
+ };
1067
+ CreateChatCompletionRequest: {
1068
+ /** @description A list of messages comprising the conversation so far. Depending on the
1069
+ * [model](https://platform.openai.com/docs/models) you use, different message types (modalities)
1070
+ * are supported, like [text](https://platform.openai.com/docs/guides/text-generation),
1071
+ * [images](https://platform.openai.com/docs/guides/vision), and
1072
+ * [audio](https://platform.openai.com/docs/guides/audio). */
1073
+ messages: components["schemas"]["ChatCompletionRequestMessage"][];
1074
+ /** @description Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
1075
+ * offers a wide range of models with different capabilities, performance
1076
+ * characteristics, and price points. Refer to the
1077
+ * [model guide](https://platform.openai.com/docs/models)
1078
+ * to browse and compare available models. */
1079
+ model: string;
1080
+ /** @description Output types that you would like the model to generate. Most models are capable of generating
1081
+ * text, which is the default:
1082
+ *
1083
+ * `["text"]`
1084
+ * The `gpt-4o-audio-preview` model can also be used to
1085
+ * [generate audio](https://platform.openai.com/docs/guides/audio). To request that this model
1086
+ * generate both text and audio responses, you can use:
1087
+ *
1088
+ * `["text", "audio"]` */
1089
+ modalities?: components["schemas"]["ResponseModalities"][] | null;
1090
+ verbosity?: null | components["schemas"]["Verbosity"];
1091
+ reasoning_effort?: null | components["schemas"]["ReasoningEffort"];
1092
+ /**
1093
+ * Format: int32
1094
+ * @description An upper bound for the number of tokens that can be generated for a completion, including
1095
+ * visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
1096
+ */
1097
+ max_completion_tokens?: number | null;
1098
+ /**
1099
+ * Format: float
1100
+ * @description Number between -2.0 and 2.0. Positive values penalize new tokens based on
1101
+ * their existing frequency in the text so far, decreasing the model's
1102
+ * likelihood to repeat the same line verbatim.
1103
+ */
1104
+ frequency_penalty?: number | null;
1105
+ /**
1106
+ * Format: float
1107
+ * @description Number between -2.0 and 2.0. Positive values penalize new tokens based on
1108
+ * whether they appear in the text so far, increasing the model's likelihood
1109
+ * to talk about new topics.
1110
+ */
1111
+ presence_penalty?: number | null;
1112
+ web_search_options?: null | components["schemas"]["WebSearchOptions"];
1113
+ /**
1114
+ * Format: int32
1115
+ * @description An integer between 0 and 20 specifying the number of most likely tokens to
1116
+ * return at each token position, each with an associated log probability.
1117
+ * `logprobs` must be set to `true` if this parameter is used.
1118
+ */
1119
+ top_logprobs?: number | null;
1120
+ response_format?: null | components["schemas"]["ResponseFormat"];
1121
+ audio?: null | components["schemas"]["ChatCompletionAudio"];
1122
+ /** @description Whether or not to store the output of this chat completion request for
1123
+ * use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or
1124
+ * [evals](https://platform.openai.com/docs/guides/evals) products.
1125
+ *
1126
+ * Supports text and image inputs. Note: image inputs over 8MB will be dropped. */
1127
+ store?: boolean | null;
1128
+ /** @description If set to true, the model response data will be streamed to the client
1129
+ * as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
1130
+ * See the [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming)
1131
+ * for more information, along with the [streaming responses](https://platform.openai.com/docs/guides/streaming-responses)
1132
+ * guide for more information on how to handle the streaming events. */
1133
+ stream?: boolean | null;
1134
+ stop?: null | components["schemas"]["StopConfiguration"];
1135
+ /** @description Modify the likelihood of specified tokens appearing in the completion.
1136
+ *
1137
+ * Accepts a json object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100.
1138
+ * Mathematically, the bias is added to the logits generated by the model prior to sampling.
1139
+ * The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection;
1140
+ * values like -100 or 100 should result in a ban or exclusive selection of the relevant token. */
1141
+ logit_bias?: {
1142
+ [key: string]: number;
1143
+ } | null;
1144
+ /** @description Whether to return log probabilities of the output tokens or not. If true,
1145
+ * returns the log probabilities of each output token returned in the `content` of `message`. */
1146
+ logprobs?: boolean | null;
1147
+ /**
1148
+ * Format: int32
1149
+ * @deprecated
1150
+ * @description The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in
1151
+ * the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.
1152
+ * This value is now deprecated in favor of `max_completion_tokens`, and is
1153
+ * not compatible with [o-series models](https://platform.openai.com/docs/guides/reasoning).
1154
+ */
1155
+ max_tokens?: number | null;
1156
+ /**
1157
+ * Format: int32
1158
+ * @description How many chat completion choices to generate for each input message. Note that you will be
1159
+ * charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to
1160
+ * minimize costs.
1161
+ */
1162
+ n?: number | null;
1163
+ prediction?: null | components["schemas"]["PredictionContent"];
1164
+ /**
1165
+ * Format: int64
1166
+ * @deprecated
1167
+ * @description This feature is in Beta.
1168
+ *
1169
+ * If specified, our system will make a best effort to sample deterministically, such that
1170
+ * repeated requests with the same `seed` and parameters should return the same result.
1171
+ *
1172
+ * Determinism is not guaranteed, and you should refer to the `system_fingerprint` response
1173
+ * parameter to monitor changes in the backend.
1174
+ */
1175
+ seed?: number | null;
1176
+ stream_options?: null | components["schemas"]["ChatCompletionStreamOptions"];
1177
+ service_tier?: null | components["schemas"]["ServiceTier"];
1178
+ /**
1179
+ * Format: float
1180
+ * @description What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random,
1181
+ * while lower values like 0.2 will make it more focused and deterministic.
1182
+ *
1183
+ * We generally recommend altering this or `top_p` but not both.
1184
+ */
1185
+ temperature?: number | null;
1186
+ /**
1187
+ * Format: float
1188
+ * @description An alternative to sampling with temperature, called nucleus sampling,
1189
+ * where the model considers the results of the tokens with top_p probability mass.
1190
+ * So 0.1 means only the tokens comprising the top 10% probability mass are considered.
1191
+ *
1192
+ * We generally recommend altering this or `temperature` but not both.
1193
+ */
1194
+ top_p?: number | null;
1195
+ /** @description A list of tools the model may call. You can provide either
1196
+ * [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) or
1197
+ * [function tools](https://platform.openai.com/docs/guides/function-calling). */
1198
+ tools?: components["schemas"]["ChatCompletionTools"][] | null;
1199
+ tool_choice?: null | components["schemas"]["ChatCompletionToolChoiceOption"];
1200
+ /** @description Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling)
1201
+ * during tool use. */
1202
+ parallel_tool_calls?: boolean | null;
1203
+ /**
1204
+ * @deprecated
1205
+ * @description This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key`
1206
+ * instead to maintain caching optimizations.
1207
+ * A stable identifier for your end-users.
1208
+ * Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and
1209
+ * prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
1210
+ */
1211
+ user?: string | null;
1212
+ /** @description A stable identifier used to help detect users of your application that may be violating OpenAI's
1213
+ * usage policies.
1214
+ *
1215
+ * The IDs should be a string that uniquely identifies each user. We recommend hashing their username
1216
+ * or email address, in order to avoid sending us any identifying information. [Learn
1217
+ * more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). */
1218
+ safety_identifier?: string | null;
1219
+ /** @description Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces
1220
+ * the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). */
1221
+ prompt_cache_key?: string | null;
1222
+ function_call?: null | components["schemas"]["ChatCompletionFunctionCall"];
1223
+ /**
1224
+ * @deprecated
1225
+ * @description Deprecated in favor of `tools`.
1226
+ *
1227
+ * A list of functions the model may generate JSON inputs for.
1228
+ */
1229
+ functions?: components["schemas"]["ChatCompletionFunctions"][] | null;
1230
+ metadata?: null | components["schemas"]["Metadata"];
1231
+ };
1232
+ /** @description Represents a chat completion response returned by model, based on the provided input. */
1233
+ CreateChatCompletionResponse: {
1234
+ /** @description A unique identifier for the chat completion. */
1235
+ id: string;
1236
+ /** @description A list of chat completion choices. Can be more than one if `n` is greater than 1. */
1237
+ choices: components["schemas"]["ChatChoice"][];
1238
+ /**
1239
+ * Format: int32
1240
+ * @description The Unix timestamp (in seconds) of when the chat completion was created.
1241
+ */
1242
+ created: number;
1243
+ /** @description The model used for the chat completion. */
1244
+ model: string;
1245
+ service_tier?: null | components["schemas"]["ServiceTier"];
1246
+ /**
1247
+ * @deprecated
1248
+ * @description This fingerprint represents the backend configuration that the model runs with.
1249
+ *
1250
+ * Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
1251
+ */
1252
+ system_fingerprint?: string | null;
1253
+ /** @description The object type, which is always `chat.completion`. */
1254
+ object: string;
1255
+ usage?: null | components["schemas"]["CompletionUsage"];
1256
+ };
1257
+ /** @description Represents a streamed chunk of a chat completion response returned by the model, based on the provided input. [Learn more](https://platform.openai.com/docs/guides/streaming-responses). */
1258
+ CreateChatCompletionStreamResponse: {
1259
+ /** @description A unique identifier for the chat completion. Each chunk has the same ID. */
1260
+ id: string;
1261
+ /** @description A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the last chunk if you set `stream_options: {"include_usage": true}`. */
1262
+ choices: components["schemas"]["ChatChoiceStream"][];
1263
+ /**
1264
+ * Format: int32
1265
+ * @description The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
1266
+ */
1267
+ created: number;
1268
+ /** @description The model to generate the completion. */
1269
+ model: string;
1270
+ service_tier?: null | components["schemas"]["ServiceTier"];
1271
+ /**
1272
+ * @deprecated
1273
+ * @description This fingerprint represents the backend configuration that the model runs with.
1274
+ * Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
1275
+ */
1276
+ system_fingerprint?: string | null;
1277
+ /** @description The object type, which is always `chat.completion.chunk`. */
1278
+ object: string;
1279
+ usage?: null | components["schemas"]["CompletionUsage"];
1280
+ };
1281
+ CreateEmbeddingRequest: {
1282
+ /** @description ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list)
1283
+ * API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models)
1284
+ * for descriptions of them. */
1285
+ model: string;
1286
+ /** @description Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single
1287
+ * request, pass an array of strings or array of token arrays. The input must not exceed the max
1288
+ * input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and
1289
+ * any array must be 2048 dimensions or less. [Example Python
1290
+ * code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.
1291
+ * In addition to the per-input token limit, all embedding models enforce a maximum of 300,000
1292
+ * tokens summed across all inputs in a single request. */
1293
+ input: components["schemas"]["EmbeddingInput"];
1294
+ encoding_format?: null | components["schemas"]["EncodingFormat"];
1295
+ /** @description A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
1296
+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). */
1297
+ user?: string | null;
1298
+ /**
1299
+ * Format: int32
1300
+ * @description The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.
1301
+ */
1302
+ dimensions?: number | null;
1303
+ };
1304
+ CreateEmbeddingResponse: {
1305
+ object: string;
1306
+ /** @description The name of the model used to generate the embedding. */
1307
+ model: string;
1308
+ /** @description The list of embeddings generated by the model. */
1309
+ data: components["schemas"]["Embedding"][];
1310
+ /** @description The usage information for the request. */
1311
+ usage: components["schemas"]["EmbeddingUsage"];
1312
+ };
1313
+ /** @description Builder for a Responses API request. */
1314
+ CreateResponse: {
1315
+ /** @description Whether to run the model response in the background.
1316
+ * [Learn more](https://platform.openai.com/docs/guides/background). */
1317
+ background?: boolean | null;
1318
+ conversation?: null | components["schemas"]["ConversationParam"];
1319
+ /** @description Specify additional output data to include in the model response. Currently supported
1320
+ * values are:
1321
+ *
1322
+ * - `web_search_call.action.sources`: Include the sources of the web search tool call.
1323
+ *
1324
+ * - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code
1325
+ * interpreter tool call items.
1326
+ *
1327
+ * - `computer_call_output.output.image_url`: Include image urls from the computer call
1328
+ * output.
1329
+ *
1330
+ * - `file_search_call.results`: Include the search results of the file search tool call.
1331
+ *
1332
+ * - `message.input_image.image_url`: Include image urls from the input message.
1333
+ *
1334
+ * - `message.output_text.logprobs`: Include logprobs with assistant messages.
1335
+ *
1336
+ * - `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in
1337
+ * reasoning item outputs. This enables reasoning items to be used in multi-turn
1338
+ * conversations when using the Responses API statelessly (like when the `store` parameter is
1339
+ * set to `false`, or when an organization is enrolled in the zero data retention program). */
1340
+ include?: components["schemas"]["IncludeEnum"][] | null;
1341
+ /** @description Text, image, or file inputs to the model, used to generate a response.
1342
+ *
1343
+ * Learn more:
1344
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
1345
+ * - [Image inputs](https://platform.openai.com/docs/guides/images)
1346
+ * - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
1347
+ * - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
1348
+ * - [Function calling](https://platform.openai.com/docs/guides/function-calling) */
1349
+ input: components["schemas"]["InputParam"];
1350
+ /** @description A system (or developer) message inserted into the model's context.
1351
+ *
1352
+ * When using along with `previous_response_id`, the instructions from a previous
1353
+ * response will not be carried over to the next response. This makes it simple
1354
+ * to swap out system (or developer) messages in new responses. */
1355
+ instructions?: string | null;
1356
+ /**
1357
+ * Format: int32
1358
+ * @description An upper bound for the number of tokens that can be generated for a response, including
1359
+ * visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
1360
+ */
1361
+ max_output_tokens?: number | null;
1362
+ /**
1363
+ * Format: int32
1364
+ * @description The maximum number of total calls to built-in tools that can be processed in a response. This
1365
+ * maximum number applies across all built-in tool calls, not per individual tool. Any further
1366
+ * attempts to call a tool by the model will be ignored.
1367
+ */
1368
+ max_tool_calls?: number | null;
1369
+ /** @description Set of 16 key-value pairs that can be attached to an object. This can be
1370
+ * useful for storing additional information about the object in a structured
1371
+ * format, and querying for objects via API or the dashboard.
1372
+ *
1373
+ * Keys are strings with a maximum length of 64 characters. Values are
1374
+ * strings with a maximum length of 512 characters. */
1375
+ metadata?: {
1376
+ [key: string]: string;
1377
+ } | null;
1378
+ /** @description Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
1379
+ * offers a wide range of models with different capabilities, performance
1380
+ * characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
1381
+ * to browse and compare available models. */
1382
+ model?: string | null;
1383
+ /** @description Whether to allow the model to run tool calls in parallel. */
1384
+ parallel_tool_calls?: boolean | null;
1385
+ /** @description The unique ID of the previous response to the model. Use this to create multi-turn conversations.
1386
+ * Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state).
1387
+ * Cannot be used in conjunction with `conversation`. */
1388
+ previous_response_id?: string | null;
1389
+ prompt?: null | components["schemas"]["Prompt"];
1390
+ /** @description Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces
1391
+ * the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). */
1392
+ prompt_cache_key?: string | null;
1393
+ prompt_cache_retention?: null | components["schemas"]["PromptCacheRetention"];
1394
+ reasoning?: null | components["schemas"]["Reasoning"];
1395
+ /** @description A stable identifier used to help detect users of your application that may be violating OpenAI's
1396
+ * usage policies.
1397
+ *
1398
+ * The IDs should be a string that uniquely identifies each user. We recommend hashing their username
1399
+ * or email address, in order to avoid sending us any identifying information. [Learn
1400
+ * more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). */
1401
+ safety_identifier?: string | null;
1402
+ service_tier?: null | components["schemas"]["ServiceTier"];
1403
+ /** @description Whether to store the generated model response for later retrieval via API. */
1404
+ store?: boolean | null;
1405
+ /** @description If set to true, the model response data will be streamed to the client
1406
+ * as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
1407
+ * See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
1408
+ * for more information. */
1409
+ stream?: boolean | null;
1410
+ stream_options?: null | components["schemas"]["ResponseStreamOptions"];
1411
+ /**
1412
+ * Format: float
1413
+ * @description What sampling temperature to use, between 0 and 2. Higher values like 0.8
1414
+ * will make the output more random, while lower values like 0.2 will make it
1415
+ * more focused and deterministic. We generally recommend altering this or
1416
+ * `top_p` but not both.
1417
+ */
1418
+ temperature?: number | null;
1419
+ text?: null | components["schemas"]["ResponseTextParam"];
1420
+ tool_choice?: null | components["schemas"]["ToolChoiceParam"];
1421
+ /** @description An array of tools the model may call while generating a response. You
1422
+ * can specify which tool to use by setting the `tool_choice` parameter.
1423
+ *
1424
+ * We support the following categories of tools:
1425
+ * - **Built-in tools**: Tools that are provided by OpenAI that extend the
1426
+ * model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
1427
+ * or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
1428
+ * [built-in tools](https://platform.openai.com/docs/guides/tools).
1429
+ * - **MCP Tools**: Integrations with third-party systems via custom MCP servers
1430
+ * or predefined connectors such as Google Drive and SharePoint. Learn more about
1431
+ * [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
1432
+ * - **Function calls (custom tools)**: Functions that are defined by you,
1433
+ * enabling the model to call your own code with strongly typed arguments
1434
+ * and outputs. Learn more about
1435
+ * [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
1436
+ * custom tools to call your own code. */
1437
+ tools?: components["schemas"]["Tool"][] | null;
1438
+ /**
1439
+ * Format: int32
1440
+ * @description An integer between 0 and 20 specifying the number of most likely tokens to return at each
1441
+ * token position, each with an associated log probability.
1442
+ */
1443
+ top_logprobs?: number | null;
1444
+ /**
1445
+ * Format: float
1446
+ * @description An alternative to sampling with temperature, called nucleus sampling,
1447
+ * where the model considers the results of the tokens with top_p probability
1448
+ * mass. So 0.1 means only the tokens comprising the top 10% probability mass
1449
+ * are considered.
1450
+ *
1451
+ * We generally recommend altering this or `temperature` but not both.
1452
+ */
1453
+ top_p?: number | null;
1454
+ truncation?: null | components["schemas"]["Truncation"];
1455
+ };
1456
+ CustomGrammarFormatParam: {
1457
+ /** @description The grammar definition. */
1458
+ definition: string;
1459
+ /** @description The syntax of the grammar definition. One of `lark` or `regex`. */
1460
+ syntax: components["schemas"]["GrammarSyntax"];
1461
+ };
1462
+ CustomName: {
1463
+ /** @description The name of the custom tool to call. */
1464
+ name: string;
1465
+ };
1466
+ CustomTool: {
1467
+ /** @description The name of the custom tool to call. */
1468
+ name: string;
1469
+ /** @description The input for the custom tool call generated by the model. */
1470
+ input: string;
1471
+ };
1472
+ CustomToolCall: {
1473
+ /** @description An identifier used to map this custom tool call to a tool call output. */
1474
+ call_id: string;
1475
+ /** @description The namespace of the custom tool being called. */
1476
+ namespace?: string | null;
1477
+ /** @description The input for the custom tool call generated by the model. */
1478
+ input: string;
1479
+ /** @description The name of the custom tool being called. */
1480
+ name: string;
1481
+ /** @description The unique ID of the custom tool call in the OpenAI platform. */
1482
+ id: string;
1483
+ };
1484
+ CustomToolCallOutput: {
1485
+ /** @description The call ID, used to map this custom tool call output to a custom tool call. */
1486
+ call_id: string;
1487
+ /** @description The output from the custom tool call generated by your code.
1488
+ * Can be a string or an list of output content. */
1489
+ output: components["schemas"]["CustomToolCallOutputOutput"];
1490
+ /** @description The unique ID of the custom tool call output in the OpenAI platform. */
1491
+ id?: string | null;
1492
+ };
1493
+ CustomToolCallOutputOutput: string | components["schemas"]["InputContent"][];
1494
+ CustomToolChatCompletions: {
1495
+ custom: components["schemas"]["CustomToolProperties"];
1496
+ };
1497
+ CustomToolParam: {
1498
+ /** @description The name of the custom tool, used to identify it in tool calls. */
1499
+ name: string;
1500
+ /** @description Optional description of the custom tool, used to provide more context. */
1501
+ description?: string | null;
1502
+ /** @description The input format for the custom tool. Default is unconstrained text. */
1503
+ format: components["schemas"]["CustomToolParamFormat"];
1504
+ /** @description Whether this tool should be deferred and discovered via tool search. */
1505
+ defer_loading?: boolean | null;
1506
+ };
1507
+ CustomToolParamFormat: {
1508
+ /** @enum {string} */
1509
+ type: "text";
1510
+ } | (components["schemas"]["CustomGrammarFormatParam"] & {
1511
+ /** @enum {string} */
1512
+ type: "grammar";
1513
+ });
1514
+ CustomToolProperties: {
1515
+ /** @description The name of the custom tool, used to identify it in tool calls. */
1516
+ name: string;
1517
+ /** @description Optional description of the custom tool, used to provide more context. */
1518
+ description?: string | null;
1519
+ /** @description The input format for the custom tool. Default is unconstrained text. */
1520
+ format: components["schemas"]["CustomToolPropertiesFormat"];
1521
+ };
1522
+ CustomToolPropertiesFormat: {
1523
+ /** @enum {string} */
1524
+ type: "text";
1525
+ } | {
1526
+ grammar: components["schemas"]["CustomGrammarFormatParam"];
1527
+ /** @enum {string} */
1528
+ type: "grammar";
1529
+ };
1530
+ DeleteResponse: {
1531
+ object: string;
1532
+ deleted: boolean;
1533
+ id: string;
1534
+ };
1535
+ /** @description A double click action. */
1536
+ DoubleClickAction: {
1537
+ /**
1538
+ * Format: int32
1539
+ * @description The x-coordinate where the double click occurred.
1540
+ */
1541
+ x: number;
1542
+ /**
1543
+ * Format: int32
1544
+ * @description The y-coordinate where the double click occurred.
1545
+ */
1546
+ y: number;
1547
+ };
1548
+ /** @description A drag action. */
1549
+ DragParam: {
1550
+ /** @description An array of coordinates representing the path of the drag action. */
1551
+ path: components["schemas"]["CoordParam"][];
1552
+ };
1553
+ Duration: string;
1554
+ /** @description Content for EasyInputMessage - can be a simple string or structured list. */
1555
+ EasyInputContent: string | components["schemas"]["InputContent"][];
1556
+ /** @description A simplified message input to the model (EasyInputMessage in the OpenAPI spec).
1557
+ *
1558
+ * This is the most user-friendly way to provide messages, supporting both simple
1559
+ * string content and structured content. Role can include `assistant` for providing
1560
+ * previous assistant responses. */
1561
+ EasyInputMessage: {
1562
+ /** @description The type of the message input. Defaults to `message` when omitted in JSON input. */
1563
+ type?: components["schemas"]["MessageType"];
1564
+ /** @description The role of the message input. One of `user`, `assistant`, `system`, or `developer`. */
1565
+ role: components["schemas"]["Role"];
1566
+ /** @description Text, image, or audio input to the model, used to generate a response.
1567
+ * Can also contain previous assistant responses. */
1568
+ content: components["schemas"]["EasyInputContent"];
1569
+ phase?: null | components["schemas"]["MessagePhase"];
1570
+ };
1571
+ /** @description Represents an embedding vector returned by embedding endpoint. */
1572
+ Embedding: {
1573
+ /**
1574
+ * Format: int32
1575
+ * @description The index of the embedding in the list of embeddings.
1576
+ */
1577
+ index: number;
1578
+ /** @description The object type, which is always "embedding". */
1579
+ object: string;
1580
+ /** @description The embedding vector, which is a list of floats. The length of vector
1581
+ * depends on the model as listed in the [embedding guide](https://platform.openai.com/docs/guides/embeddings). */
1582
+ embedding: number[];
1583
+ };
1584
+ EmbeddingInput: string | string[] | number[] | number[][];
1585
+ EmbeddingUsage: {
1586
+ /**
1587
+ * Format: int32
1588
+ * @description The number of tokens used by the prompt.
1589
+ */
1590
+ prompt_tokens: number;
1591
+ /**
1592
+ * Format: int32
1593
+ * @description The total number of tokens used by the request.
1594
+ */
1595
+ total_tokens: number;
1596
+ };
1597
+ /** @enum {string} */
1598
+ EncodingFormat: "float" | "base64";
1599
+ /** @description An error that occurred while generating the response. */
1600
+ ErrorObject: {
1601
+ /** @description A machine-readable error code that was returned. */
1602
+ code: string;
1603
+ /** @description A human-readable description of the error that was returned. */
1604
+ message: string;
1605
+ };
1606
+ FileCitationBody: {
1607
+ /** @description The ID of the file. */
1608
+ file_id: string;
1609
+ /** @description The filename of the file cited. */
1610
+ filename: string;
1611
+ /**
1612
+ * Format: int32
1613
+ * @description The index of the file in the list of files.
1614
+ */
1615
+ index: number;
1616
+ };
1617
+ FileObject: {
1618
+ /** @description The base64 encoded file data, used when passing the file to the model
1619
+ * as a string. */
1620
+ file_data?: string | null;
1621
+ /** @description The ID of an uploaded file to use as input. */
1622
+ file_id?: string | null;
1623
+ /** @description The name of the file, used when passing the file to the model as a
1624
+ * string. */
1625
+ filename?: string | null;
1626
+ };
1627
+ FilePath: {
1628
+ /** @description The ID of the file. */
1629
+ file_id: string;
1630
+ /**
1631
+ * Format: int32
1632
+ * @description The index of the file in the list of files.
1633
+ */
1634
+ index: number;
1635
+ };
1636
+ FileSearchTool: {
1637
+ /** @description The IDs of the vector stores to search. */
1638
+ vector_store_ids: string[];
1639
+ /**
1640
+ * Format: int32
1641
+ * @description The maximum number of results to return. This number should be between 1 and 50 inclusive.
1642
+ */
1643
+ max_num_results?: number | null;
1644
+ filters?: null | components["schemas"]["Filter"];
1645
+ ranking_options?: null | components["schemas"]["RankingOptions"];
1646
+ };
1647
+ /** @description File search tool call output. */
1648
+ FileSearchToolCall: {
1649
+ /** @description The unique ID of the file search tool call. */
1650
+ id: string;
1651
+ /** @description The queries used to search for files. */
1652
+ queries: string[];
1653
+ /** @description The status of the file search tool call. One of `in_progress`, `searching`,
1654
+ * `incomplete`,`failed`, or `completed`. */
1655
+ status: components["schemas"]["FileSearchToolCallStatus"];
1656
+ /** @description The results of the file search tool call. */
1657
+ results?: components["schemas"]["FileSearchToolCallResult"][] | null;
1658
+ };
1659
+ /** @description A single result from a file search. */
1660
+ FileSearchToolCallResult: {
1661
+ /** @description Set of 16 key-value pairs that can be attached to an object. This can be useful for storing
1662
+ * additional information about the object in a structured format, and querying for objects
1663
+ * API or the dashboard. Keys are strings with a maximum length of 64 characters
1664
+ * . Values are strings with a maximum length of 512 characters, booleans, or numbers. */
1665
+ attributes: Record<string, never>;
1666
+ /** @description The unique ID of the file. */
1667
+ file_id: string;
1668
+ /** @description The name of the file. */
1669
+ filename: string;
1670
+ /**
1671
+ * Format: float
1672
+ * @description The relevance score of the file - a value between 0 and 1.
1673
+ */
1674
+ score: number;
1675
+ /** @description The text that was retrieved from the file. */
1676
+ text: string;
1677
+ };
1678
+ /** @enum {string} */
1679
+ FileSearchToolCallStatus: "in_progress" | "searching" | "incomplete" | "failed" | "completed";
1680
+ /** @description Filters for file search. */
1681
+ Filter: components["schemas"]["ComparisonFilter"] | components["schemas"]["CompoundFilter"];
1682
+ /** @enum {string} */
1683
+ FinishReason: "stop" | "length" | "tool_calls" | "content_filter" | "function_call";
1684
+ /** @description The name and arguments of a function that should be called, as generated by the model. */
1685
+ FunctionCall: {
1686
+ /** @description The name of the function to call. */
1687
+ name: string;
1688
+ /** @description The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. */
1689
+ arguments: string;
1690
+ };
1691
+ FunctionCallOutput: string | components["schemas"]["InputContent"][];
1692
+ /** @description Output from a function call that you're providing back to the model. */
1693
+ FunctionCallOutputItemParam: {
1694
+ /** @description The unique ID of the function tool call generated by the model. */
1695
+ call_id: string;
1696
+ /** @description Text, image, or file output of the function tool call. */
1697
+ output: components["schemas"]["FunctionCallOutput"];
1698
+ /** @description The unique ID of the function tool call output.
1699
+ * Populated when this item is returned via API. */
1700
+ id?: string | null;
1701
+ status?: null | components["schemas"]["OutputStatus"];
1702
+ };
1703
+ /**
1704
+ * @description The status of a function call output.
1705
+ * @enum {string}
1706
+ */
1707
+ FunctionCallOutputStatusEnum: "in_progress" | "completed" | "incomplete";
1708
+ /**
1709
+ * @description The status of a function call.
1710
+ * @enum {string}
1711
+ */
1712
+ FunctionCallStatus: "in_progress" | "completed" | "incomplete";
1713
+ FunctionCallStream: {
1714
+ /** @description The name of the function to call. */
1715
+ name?: string | null;
1716
+ /** @description The arguments to call the function with, as generated by the model in JSON format.
1717
+ * Note that the model does not always generate valid JSON, and may hallucinate
1718
+ * parameters not defined by your function schema. Validate the arguments in your
1719
+ * code before calling your function. */
1720
+ arguments?: string | null;
1721
+ };
1722
+ FunctionName: {
1723
+ /** @description The name of the function to call. */
1724
+ name: string;
1725
+ };
1726
+ FunctionObject: {
1727
+ /** @description The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. */
1728
+ name: string;
1729
+ /** @description A description of what the function does, used by the model to choose when and how to call the function. */
1730
+ description?: string | null;
1731
+ /** @description The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
1732
+ *
1733
+ * Omitting `parameters` defines a function with an empty parameter list. */
1734
+ parameters?: Record<string, never> | null;
1735
+ /** @description Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://platform.openai.com/docs/guides/function-calling). */
1736
+ strict?: boolean | null;
1737
+ };
1738
+ /** @description Shell exec action
1739
+ * Execute a shell command. */
1740
+ FunctionShellAction: {
1741
+ /** @description A list of commands to run. */
1742
+ commands: string[];
1743
+ /**
1744
+ * Format: int64
1745
+ * @description Optional timeout in milliseconds for the commands.
1746
+ */
1747
+ timeout_ms?: number | null;
1748
+ /**
1749
+ * Format: int64
1750
+ * @description Optional maximum number of characters to return from each command.
1751
+ */
1752
+ max_output_length?: number | null;
1753
+ };
1754
+ /** @description Commands and limits describing how to run the shell tool call. */
1755
+ FunctionShellActionParam: {
1756
+ /** @description Ordered shell commands for the execution environment to run. */
1757
+ commands: string[];
1758
+ /**
1759
+ * Format: int64
1760
+ * @description Maximum wall-clock time in milliseconds to allow the shell commands to run.
1761
+ */
1762
+ timeout_ms?: number | null;
1763
+ /**
1764
+ * Format: int64
1765
+ * @description Maximum number of UTF-8 characters to capture from combined stdout and stderr output.
1766
+ */
1767
+ max_output_length?: number | null;
1768
+ };
1769
+ /** @description A tool call that executes one or more shell commands in a managed environment. */
1770
+ FunctionShellCall: {
1771
+ /** @description The unique ID of the function shell tool call. Populated when this item is returned via API. */
1772
+ id: string;
1773
+ /** @description The unique ID of the function shell tool call generated by the model. */
1774
+ call_id: string;
1775
+ /** @description The shell commands and limits that describe how to run the tool call. */
1776
+ action: components["schemas"]["FunctionShellAction"];
1777
+ /** @description The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. */
1778
+ status: components["schemas"]["LocalShellCallStatus"];
1779
+ environment?: null | components["schemas"]["FunctionShellCallEnvironment"];
1780
+ /** @description The ID of the entity that created this tool call. */
1781
+ created_by?: string | null;
1782
+ };
1783
+ /** @description The environment for a shell call (response side). */
1784
+ FunctionShellCallEnvironment: {
1785
+ /** @enum {string} */
1786
+ type: "local";
1787
+ } | (components["schemas"]["ContainerReferenceResource"] & {
1788
+ /** @enum {string} */
1789
+ type: "container_reference";
1790
+ });
1791
+ /** @description The environment for a shell call item (request side). */
1792
+ FunctionShellCallItemEnvironment: (components["schemas"]["LocalEnvironmentParam"] & {
1793
+ /** @enum {string} */
1794
+ type: "local";
1795
+ }) | (components["schemas"]["ContainerReferenceParam"] & {
1796
+ /** @enum {string} */
1797
+ type: "container_reference";
1798
+ });
1799
+ /** @description A tool representing a request to execute one or more shell commands. */
1800
+ FunctionShellCallItemParam: {
1801
+ /** @description The unique ID of the shell tool call. Populated when this item is returned via API. */
1802
+ id?: string | null;
1803
+ /** @description The unique ID of the shell tool call generated by the model. */
1804
+ call_id: string;
1805
+ /** @description The shell commands and limits that describe how to run the tool call. */
1806
+ action: components["schemas"]["FunctionShellActionParam"];
1807
+ status?: null | components["schemas"]["FunctionShellCallItemStatus"];
1808
+ environment?: null | components["schemas"]["FunctionShellCallItemEnvironment"];
1809
+ };
1810
+ /**
1811
+ * @description Status values reported for shell tool calls.
1812
+ * @enum {string}
1813
+ */
1814
+ FunctionShellCallItemStatus: "in_progress" | "completed" | "incomplete";
1815
+ /** @description The output of a shell tool call that was emitted. */
1816
+ FunctionShellCallOutput: {
1817
+ /** @description The unique ID of the shell call output. Populated when this item is returned via API. */
1818
+ id: string;
1819
+ /** @description The unique ID of the shell tool call generated by the model. */
1820
+ call_id: string;
1821
+ /** @description An array of shell call output contents */
1822
+ output: components["schemas"]["FunctionShellCallOutputContent"][];
1823
+ /**
1824
+ * Format: int64
1825
+ * @description The maximum length of the shell command output. This is generated by the model and should be
1826
+ * passed back with the raw output.
1827
+ */
1828
+ max_output_length?: number | null;
1829
+ /** @description The identifier of the actor that created the item. */
1830
+ created_by?: string | null;
1831
+ };
1832
+ /** @description The content of a shell tool call output that was emitted. */
1833
+ FunctionShellCallOutputContent: components["schemas"]["FunctionShellCallOutputOutcome"] & {
1834
+ /** @description The standard output that was captured. */
1835
+ stdout: string;
1836
+ /** @description The standard error output that was captured. */
1837
+ stderr: string;
1838
+ /** @description The identifier of the actor that created the item. */
1839
+ created_by?: string | null;
1840
+ };
1841
+ /** @description Captured stdout and stderr for a portion of a shell tool call output. */
1842
+ FunctionShellCallOutputContentParam: {
1843
+ /** @description Captured stdout output for this chunk of the shell call. */
1844
+ stdout: string;
1845
+ /** @description Captured stderr output for this chunk of the shell call. */
1846
+ stderr: string;
1847
+ /** @description The exit or timeout outcome associated with this chunk. */
1848
+ outcome: components["schemas"]["FunctionShellCallOutputOutcomeParam"];
1849
+ };
1850
+ /** @description Indicates that the shell commands finished and returned an exit code. */
1851
+ FunctionShellCallOutputExitOutcome: {
1852
+ /**
1853
+ * Format: int32
1854
+ * @description Exit code from the shell process.
1855
+ */
1856
+ exit_code: number;
1857
+ };
1858
+ /** @description Indicates that the shell commands finished and returned an exit code. */
1859
+ FunctionShellCallOutputExitOutcomeParam: {
1860
+ /**
1861
+ * Format: int32
1862
+ * @description The exit code returned by the shell process.
1863
+ */
1864
+ exit_code: number;
1865
+ };
1866
+ /** @description The streamed output items emitted by a shell tool call. */
1867
+ FunctionShellCallOutputItemParam: {
1868
+ /** @description The unique ID of the shell tool call output. Populated when this item is returned via API. */
1869
+ id?: string | null;
1870
+ /** @description The unique ID of the shell tool call generated by the model. */
1871
+ call_id: string;
1872
+ /** @description Captured chunks of stdout and stderr output, along with their associated outcomes. */
1873
+ output: components["schemas"]["FunctionShellCallOutputContentParam"][];
1874
+ /**
1875
+ * Format: int64
1876
+ * @description The maximum number of UTF-8 characters captured for this shell call's combined output.
1877
+ */
1878
+ max_output_length?: number | null;
1879
+ };
1880
+ /** @description Function shell call outcome */
1881
+ FunctionShellCallOutputOutcome: {
1882
+ /** @enum {string} */
1883
+ type: "timeout";
1884
+ } | (components["schemas"]["FunctionShellCallOutputExitOutcome"] & {
1885
+ /** @enum {string} */
1886
+ type: "exit";
1887
+ });
1888
+ /** @description The exit or timeout outcome associated with this chunk. */
1889
+ FunctionShellCallOutputOutcomeParam: {
1890
+ /** @enum {string} */
1891
+ type: "timeout";
1892
+ } | (components["schemas"]["FunctionShellCallOutputExitOutcomeParam"] & {
1893
+ /** @enum {string} */
1894
+ type: "exit";
1895
+ });
1896
+ /** @description The execution environment for a shell tool — container or local. */
1897
+ FunctionShellEnvironment: (components["schemas"]["ContainerAutoParam"] & {
1898
+ /** @enum {string} */
1899
+ type: "container_auto";
1900
+ }) | (components["schemas"]["LocalEnvironmentParam"] & {
1901
+ /** @enum {string} */
1902
+ type: "local";
1903
+ }) | (components["schemas"]["ContainerReferenceParam"] & {
1904
+ /** @enum {string} */
1905
+ type: "container_reference";
1906
+ });
1907
+ /** @description Parameters for the shell function tool. */
1908
+ FunctionShellToolParam: {
1909
+ environment?: null | components["schemas"]["FunctionShellEnvironment"];
1910
+ };
1911
+ FunctionTool: {
1912
+ /** @description The name of the function to call. */
1913
+ name: string;
1914
+ /** @description A JSON schema object describing the parameters of the function. */
1915
+ parameters?: Record<string, never> | null;
1916
+ /** @description Whether to enforce strict parameter validation. Default `true`. */
1917
+ strict?: boolean | null;
1918
+ /** @description A description of the function. Used by the model to determine whether or not to call the
1919
+ * function. */
1920
+ description?: string | null;
1921
+ /** @description Whether this function is deferred and loaded via tool search. */
1922
+ defer_loading?: boolean | null;
1923
+ };
1924
+ FunctionToolCall: {
1925
+ /** @description A JSON string of the arguments to pass to the function. */
1926
+ arguments: string;
1927
+ /** @description The unique ID of the function tool call generated by the model. */
1928
+ call_id: string;
1929
+ /** @description The namespace of the function to run. */
1930
+ namespace?: string | null;
1931
+ /** @description The name of the function to run. */
1932
+ name: string;
1933
+ /** @description The unique ID of the function tool call. */
1934
+ id?: string | null;
1935
+ status?: null | components["schemas"]["OutputStatus"];
1936
+ };
1937
+ /** @description A function tool that can be used within a namespace or with tool search. */
1938
+ FunctionToolParam: {
1939
+ /** @description The name of the function. */
1940
+ name: string;
1941
+ /** @description A description of the function. */
1942
+ description?: string | null;
1943
+ /** @description A JSON schema object describing the parameters of the function. */
1944
+ parameters?: Record<string, never> | null;
1945
+ /** @description Whether to enforce strict parameter validation. */
1946
+ strict?: boolean | null;
1947
+ /** @description Whether this function should be deferred and discovered via tool search. */
1948
+ defer_loading?: boolean | null;
1949
+ };
1950
+ /** @enum {string} */
1951
+ FunctionType: "function";
1952
+ /** @enum {string} */
1953
+ GrammarSyntax: "lark" | "regex";
1954
+ HybridSearch: {
1955
+ /**
1956
+ * Format: float
1957
+ * @description The weight of the embedding in the reciprocal ranking fusion.
1958
+ */
1959
+ embedding_weight: number;
1960
+ /**
1961
+ * Format: float
1962
+ * @description The weight of the text in the reciprocal ranking fusion.
1963
+ */
1964
+ text_weight: number;
1965
+ };
1966
+ /** @enum {string} */
1967
+ ImageDetail: "auto" | "low" | "high" | "original";
1968
+ /**
1969
+ * @description Whether to generate a new image or edit an existing image.
1970
+ * @enum {string}
1971
+ */
1972
+ ImageGenActionEnum: "generate" | "edit" | "auto";
1973
+ /** @description Image generation tool definition. */
1974
+ ImageGenTool: {
1975
+ background?: null | components["schemas"]["ImageGenToolBackground"];
1976
+ input_fidelity?: null | components["schemas"]["InputFidelity"];
1977
+ input_image_mask?: null | components["schemas"]["ImageGenToolInputImageMask"];
1978
+ /** @description The image generation model to use. Default: `gpt-image-1`. */
1979
+ model?: string | null;
1980
+ moderation?: null | components["schemas"]["ImageGenToolModeration"];
1981
+ /**
1982
+ * Format: int32
1983
+ * @description Compression level for the output image. Default: 100.
1984
+ */
1985
+ output_compression?: number | null;
1986
+ output_format?: null | components["schemas"]["ImageGenToolOutputFormat"];
1987
+ /**
1988
+ * Format: int32
1989
+ * @description Number of partial images to generate in streaming mode, from 0 (default value) to 3.
1990
+ */
1991
+ partial_images?: number | null;
1992
+ quality?: null | components["schemas"]["ImageGenToolQuality"];
1993
+ size?: null | components["schemas"]["ImageGenToolSize"];
1994
+ action?: null | components["schemas"]["ImageGenActionEnum"];
1995
+ };
1996
+ /** @enum {string} */
1997
+ ImageGenToolBackground: "transparent" | "opaque" | "auto";
1998
+ ImageGenToolCall: {
1999
+ /** @description The unique ID of the image generation call. */
2000
+ id: string;
2001
+ /** @description The generated image encoded in base64. */
2002
+ result?: string | null;
2003
+ /** @description The status of the image generation call. */
2004
+ status: components["schemas"]["ImageGenToolCallStatus"];
2005
+ };
2006
+ /** @enum {string} */
2007
+ ImageGenToolCallStatus: "in_progress" | "completed" | "generating" | "failed";
2008
+ ImageGenToolInputImageMask: {
2009
+ /** @description Base64-encoded mask image. */
2010
+ image_url?: string | null;
2011
+ /** @description File ID for the mask image. */
2012
+ file_id?: string | null;
2013
+ };
2014
+ /** @enum {string} */
2015
+ ImageGenToolModeration: "auto" | "low";
2016
+ /** @enum {string} */
2017
+ ImageGenToolOutputFormat: "png" | "webp" | "jpeg";
2018
+ /** @enum {string} */
2019
+ ImageGenToolQuality: "low" | "medium" | "high" | "auto";
2020
+ /** @enum {string} */
2021
+ ImageGenToolSize: "auto" | "1024x1024" | "1024x1536" | "1536x1024";
2022
+ ImageUrl: {
2023
+ /** @description Either a URL of the image or the base64 encoded image data. */
2024
+ url: string;
2025
+ detail?: null | components["schemas"]["ImageDetail"];
2026
+ };
2027
+ /** @enum {string} */
2028
+ IncludeEnum: "file_search_call.results" | "web_search_call.results" | "web_search_call.action.sources" | "message.input_image.image_url" | "computer_call_output.output.image_url" | "code_interpreter_call.outputs" | "reasoning.encrypted_content" | "message.output_text.logprobs";
2029
+ /** @description Details about an incomplete response. */
2030
+ IncompleteDetails: {
2031
+ /** @description The reason why the response is incomplete. */
2032
+ reason: string;
2033
+ };
2034
+ /** @description An inline skill definition. */
2035
+ InlineSkillParam: {
2036
+ /** @description The name of the skill. */
2037
+ name: string;
2038
+ /** @description The description of the skill. */
2039
+ description: string;
2040
+ /** @description The inline source for the skill. */
2041
+ source: components["schemas"]["InlineSkillSourceParam"];
2042
+ };
2043
+ /** @description An inline skill source (base64-encoded zip). */
2044
+ InlineSkillSourceParam: {
2045
+ /** @description The media type. Always `"application/zip"`. */
2046
+ media_type: string;
2047
+ /** @description The base64-encoded skill data. */
2048
+ data: string;
2049
+ };
2050
+ InputAudio: {
2051
+ /** @description Base64 encoded audio data. */
2052
+ data: string;
2053
+ /** @description The format of the encoded audio data. Currently supports "wav" and "mp3". */
2054
+ format: components["schemas"]["InputAudioFormat"];
2055
+ };
2056
+ /** @enum {string} */
2057
+ InputAudioFormat: "wav" | "mp3";
2058
+ /** @description Parts of a message: text, image, file, or audio. */
2059
+ InputContent: (components["schemas"]["InputTextContent"] & {
2060
+ /** @enum {string} */
2061
+ type: "input_text";
2062
+ }) | (components["schemas"]["InputImageContent"] & {
2063
+ /** @enum {string} */
2064
+ type: "input_image";
2065
+ }) | (components["schemas"]["InputFileContent"] & {
2066
+ /** @enum {string} */
2067
+ type: "input_file";
2068
+ });
2069
+ /** @enum {string} */
2070
+ InputFidelity: "high" | "low";
2071
+ InputFileContent: {
2072
+ /** @description The content of the file to be sent to the model. */
2073
+ file_data?: string | null;
2074
+ /** @description The ID of the file to be sent to the model. */
2075
+ file_id?: string | null;
2076
+ /** @description The URL of the file to be sent to the model. */
2077
+ file_url?: string | null;
2078
+ /** @description The name of the file to be sent to the model. */
2079
+ filename?: string | null;
2080
+ };
2081
+ InputImageContent: {
2082
+ /** @description The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`.
2083
+ * Defaults to `auto`. */
2084
+ detail: components["schemas"]["ImageDetail"];
2085
+ /** @description The ID of the file to be sent to the model. */
2086
+ file_id?: string | null;
2087
+ /** @description The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image
2088
+ * in a data URL. */
2089
+ image_url?: string | null;
2090
+ };
2091
+ /** @description Input item that can be used in the context for generating a response.
2092
+ *
2093
+ * This represents the OpenAPI `InputItem` schema which is an `anyOf`:
2094
+ * 1. `EasyInputMessage` - Simple, user-friendly message input (can use string content)
2095
+ * 2. `Item` - Structured items with proper type discrimination (including InputMessage, OutputMessage, tool calls)
2096
+ * 3. `ItemReferenceParam` - Reference to an existing item by ID (type can be null)
2097
+ *
2098
+ * Uses untagged deserialization because these types overlap in structure.
2099
+ * Order matters: more specific structures are tried first.
2100
+ *
2101
+ * # OpenAPI Specification
2102
+ * Corresponds to the `InputItem` schema: `anyOf[EasyInputMessage, Item, ItemReferenceParam]` */
2103
+ InputItem: components["schemas"]["ItemReference"] | components["schemas"]["Item"] | components["schemas"]["EasyInputMessage"];
2104
+ /** @description A structured message input to the model (InputMessage in the OpenAPI spec).
2105
+ *
2106
+ * This variant requires structured content (not a simple string) and does not support
2107
+ * the `assistant` role (use OutputMessage for that). status is populated when items are returned via API. */
2108
+ InputMessage: {
2109
+ /** @description A list of one or many input items to the model, containing different content types. */
2110
+ content: components["schemas"]["InputContent"][];
2111
+ /** @description The role of the message input. One of `user`, `system`, or `developer`.
2112
+ * Note: `assistant` is NOT allowed here; use OutputMessage instead. */
2113
+ role: components["schemas"]["InputRole"];
2114
+ status?: null | components["schemas"]["OutputStatus"];
2115
+ };
2116
+ InputParam: string | components["schemas"]["InputItem"][];
2117
+ /**
2118
+ * @description The role for an input message - can only be `user`, `system`, or `developer`.
2119
+ * This type ensures type safety by excluding the `assistant` role (use OutputMessage for that).
2120
+ * @enum {string}
2121
+ */
2122
+ InputRole: "user" | "system" | "developer";
2123
+ InputTextContent: {
2124
+ /** @description The text input to the model. */
2125
+ text: string;
2126
+ };
2127
+ InputTokenDetails: {
2128
+ /**
2129
+ * Format: int32
2130
+ * @description The number of tokens that were retrieved from the cache.
2131
+ * [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).
2132
+ */
2133
+ cached_tokens: number;
2134
+ };
2135
+ Instructions: string | components["schemas"]["InputItem"][];
2136
+ /** @description Content item used to generate a response.
2137
+ *
2138
+ * This is a properly discriminated union based on the `type` field, using Rust's
2139
+ * type-safe enum with serde's tag attribute for efficient deserialization.
2140
+ *
2141
+ * # OpenAPI Specification
2142
+ * Corresponds to the `Item` schema in the OpenAPI spec with a `type` discriminator. */
2143
+ Item: (components["schemas"]["MessageItem"] & {
2144
+ /** @enum {string} */
2145
+ type: "message";
2146
+ }) | (components["schemas"]["FileSearchToolCall"] & {
2147
+ /** @enum {string} */
2148
+ type: "file_search_call";
2149
+ }) | (components["schemas"]["ComputerToolCall"] & {
2150
+ /** @enum {string} */
2151
+ type: "computer_call";
2152
+ }) | (components["schemas"]["ComputerCallOutputItemParam"] & {
2153
+ /** @enum {string} */
2154
+ type: "computer_call_output";
2155
+ }) | (components["schemas"]["WebSearchToolCall"] & {
2156
+ /** @enum {string} */
2157
+ type: "web_search_call";
2158
+ }) | (components["schemas"]["FunctionToolCall"] & {
2159
+ /** @enum {string} */
2160
+ type: "function_call";
2161
+ }) | (components["schemas"]["FunctionCallOutputItemParam"] & {
2162
+ /** @enum {string} */
2163
+ type: "function_call_output";
2164
+ }) | (components["schemas"]["ToolSearchCallItemParam"] & {
2165
+ /** @enum {string} */
2166
+ type: "tool_search_call";
2167
+ }) | (components["schemas"]["ToolSearchOutputItemParam"] & {
2168
+ /** @enum {string} */
2169
+ type: "tool_search_output";
2170
+ }) | (components["schemas"]["ReasoningItem"] & {
2171
+ /** @enum {string} */
2172
+ type: "reasoning";
2173
+ }) | (components["schemas"]["CompactionSummaryItemParam"] & {
2174
+ /** @enum {string} */
2175
+ type: "compaction";
2176
+ }) | (components["schemas"]["ImageGenToolCall"] & {
2177
+ /** @enum {string} */
2178
+ type: "image_generation_call";
2179
+ }) | (components["schemas"]["CodeInterpreterToolCall"] & {
2180
+ /** @enum {string} */
2181
+ type: "code_interpreter_call";
2182
+ }) | (components["schemas"]["LocalShellToolCall"] & {
2183
+ /** @enum {string} */
2184
+ type: "local_shell_call";
2185
+ }) | (components["schemas"]["LocalShellToolCallOutput"] & {
2186
+ /** @enum {string} */
2187
+ type: "local_shell_call_output";
2188
+ }) | (components["schemas"]["FunctionShellCallItemParam"] & {
2189
+ /** @enum {string} */
2190
+ type: "shell_call";
2191
+ }) | (components["schemas"]["FunctionShellCallOutputItemParam"] & {
2192
+ /** @enum {string} */
2193
+ type: "shell_call_output";
2194
+ }) | (components["schemas"]["ApplyPatchToolCallItemParam"] & {
2195
+ /** @enum {string} */
2196
+ type: "apply_patch_call";
2197
+ }) | (components["schemas"]["ApplyPatchToolCallOutputItemParam"] & {
2198
+ /** @enum {string} */
2199
+ type: "apply_patch_call_output";
2200
+ }) | (components["schemas"]["MCPListTools"] & {
2201
+ /** @enum {string} */
2202
+ type: "mcp_list_tools";
2203
+ }) | (components["schemas"]["MCPApprovalRequest"] & {
2204
+ /** @enum {string} */
2205
+ type: "mcp_approval_request";
2206
+ }) | (components["schemas"]["MCPApprovalResponse"] & {
2207
+ /** @enum {string} */
2208
+ type: "mcp_approval_response";
2209
+ }) | (components["schemas"]["MCPToolCall"] & {
2210
+ /** @enum {string} */
2211
+ type: "mcp_call";
2212
+ }) | (components["schemas"]["CustomToolCallOutput"] & {
2213
+ /** @enum {string} */
2214
+ type: "custom_tool_call_output";
2215
+ }) | (components["schemas"]["CustomToolCall"] & {
2216
+ /** @enum {string} */
2217
+ type: "custom_tool_call";
2218
+ });
2219
+ /** @description A reference to an existing item by ID. */
2220
+ ItemReference: {
2221
+ type?: null | components["schemas"]["ItemReferenceType"];
2222
+ /** @description The ID of the item to reference. */
2223
+ id: string;
2224
+ };
2225
+ /** @enum {string} */
2226
+ ItemReferenceType: "item_reference";
2227
+ /** @description A keypress action. */
2228
+ KeyPressAction: {
2229
+ /** @description The combination of keys the model is requesting to be pressed.
2230
+ * This is an array of strings, each representing a key. */
2231
+ keys: string[];
2232
+ };
2233
+ ListModelResponse: {
2234
+ object: string;
2235
+ data: components["schemas"]["Model"][];
2236
+ };
2237
+ /** @description Uses a local computer environment. */
2238
+ LocalEnvironmentParam: {
2239
+ /** @description An optional list of local skills. */
2240
+ skills?: components["schemas"]["LocalSkillParam"][] | null;
2241
+ };
2242
+ /**
2243
+ * @description Status values reported for function shell tool calls.
2244
+ * @enum {string}
2245
+ */
2246
+ LocalShellCallStatus: "in_progress" | "completed" | "incomplete";
2247
+ /** @description Define the shape of a local shell action (exec). */
2248
+ LocalShellExecAction: {
2249
+ /** @description The command to run. */
2250
+ command: string[];
2251
+ /** @description Environment variables to set for the command. */
2252
+ env: {
2253
+ [key: string]: string;
2254
+ };
2255
+ /**
2256
+ * Format: int64
2257
+ * @description Optional timeout in milliseconds for the command.
2258
+ */
2259
+ timeout_ms?: number | null;
2260
+ /** @description Optional user to run the command as. */
2261
+ user?: string | null;
2262
+ /** @description Optional working directory to run the command in. */
2263
+ working_directory?: string | null;
2264
+ };
2265
+ LocalShellToolCall: {
2266
+ /** @description Execute a shell command on the server. */
2267
+ action: components["schemas"]["LocalShellExecAction"];
2268
+ /** @description The unique ID of the local shell tool call generated by the model. */
2269
+ call_id: string;
2270
+ /** @description The unique ID of the local shell call. */
2271
+ id: string;
2272
+ /** @description The status of the local shell call. */
2273
+ status: components["schemas"]["OutputStatus"];
2274
+ };
2275
+ /** @description Output from a local shell tool call that you're providing back to the model. */
2276
+ LocalShellToolCallOutput: {
2277
+ /** @description The unique ID of the local shell tool call generated by the model. */
2278
+ id: string;
2279
+ /** @description A JSON string of the output of the local shell tool call. */
2280
+ output: string;
2281
+ status?: null | components["schemas"]["OutputStatus"];
2282
+ };
2283
+ /** @description A local skill available in a local environment. */
2284
+ LocalSkillParam: {
2285
+ /** @description The name of the skill. */
2286
+ name: string;
2287
+ /** @description The description of the skill. */
2288
+ description: string;
2289
+ /** @description The path to the directory containing the skill. */
2290
+ path: string;
2291
+ };
2292
+ LogProb: {
2293
+ bytes: number[];
2294
+ /** Format: double */
2295
+ logprob: number;
2296
+ token: string;
2297
+ top_logprobs: components["schemas"]["TopLogProb"][];
2298
+ };
2299
+ MCPApprovalRequest: {
2300
+ /** @description JSON string of arguments for the tool. */
2301
+ arguments: string;
2302
+ /** @description The unique ID of the approval request. */
2303
+ id: string;
2304
+ /** @description The name of the tool to run. */
2305
+ name: string;
2306
+ /** @description The label of the MCP server making the request. */
2307
+ server_label: string;
2308
+ };
2309
+ /** @description An MCP approval response that you're providing back to the model. */
2310
+ MCPApprovalResponse: {
2311
+ /** @description The ID of the approval request being answered. */
2312
+ approval_request_id: string;
2313
+ /** @description Whether the request was approved. */
2314
+ approve: boolean;
2315
+ /** @description The unique ID of the approval response */
2316
+ id?: string | null;
2317
+ /** @description Optional reason for the decision. */
2318
+ reason?: string | null;
2319
+ };
2320
+ MCPListTools: {
2321
+ /** @description The unique ID of the list. */
2322
+ id: string;
2323
+ /** @description The label of the MCP server. */
2324
+ server_label: string;
2325
+ /** @description The tools available on the server. */
2326
+ tools: components["schemas"]["MCPListToolsTool"][];
2327
+ /** @description Error message if listing failed. */
2328
+ error?: string | null;
2329
+ };
2330
+ MCPListToolsTool: {
2331
+ /** @description The JSON schema describing the tool's input. */
2332
+ input_schema: Record<string, never>;
2333
+ /** @description The name of the tool. */
2334
+ name: string;
2335
+ /** @description Additional annotations about the tool. */
2336
+ annotations?: Record<string, never> | null;
2337
+ /** @description The description of the tool. */
2338
+ description?: string | null;
2339
+ };
2340
+ MCPTool: {
2341
+ /** @description A label for this MCP server, used to identify it in tool calls. */
2342
+ server_label: string;
2343
+ allowed_tools?: null | components["schemas"]["MCPToolAllowedTools"];
2344
+ /** @description An OAuth access token that can be used with a remote MCP server, either with a custom MCP
2345
+ * server URL or a service connector. Your application must handle the OAuth authorization
2346
+ * flow and provide the token here. */
2347
+ authorization?: string | null;
2348
+ connector_id?: null | components["schemas"]["McpToolConnectorId"];
2349
+ /** @description Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. */
2350
+ headers?: Record<string, never> | null;
2351
+ require_approval?: null | components["schemas"]["MCPToolRequireApproval"];
2352
+ /** @description Optional description of the MCP server, used to provide more context. */
2353
+ server_description?: string | null;
2354
+ /** @description The URL for the MCP server. One of `server_url` or `connector_id` must be provided. */
2355
+ server_url?: string | null;
2356
+ /** @description Whether this MCP tool is deferred and discovered via tool search. */
2357
+ defer_loading?: boolean | null;
2358
+ };
2359
+ MCPToolAllowedTools: string[] | components["schemas"]["MCPToolFilter"];
2360
+ MCPToolApprovalFilter: {
2361
+ always?: null | components["schemas"]["MCPToolFilter"];
2362
+ never?: null | components["schemas"]["MCPToolFilter"];
2363
+ };
2364
+ /** @enum {string} */
2365
+ MCPToolApprovalSetting: "always" | "never";
2366
+ /** @description Output of an MCP server tool invocation. */
2367
+ MCPToolCall: {
2368
+ /** @description A JSON string of the arguments passed to the tool. */
2369
+ arguments: string;
2370
+ /** @description The unique ID of the tool call. */
2371
+ id: string;
2372
+ /** @description The name of the tool that was run. */
2373
+ name: string;
2374
+ /** @description The label of the MCP server running the tool. */
2375
+ server_label: string;
2376
+ /** @description Unique identifier for the MCP tool call approval request. Include this value
2377
+ * in a subsequent `mcp_approval_response` input to approve or reject the corresponding
2378
+ * tool call. */
2379
+ approval_request_id?: string | null;
2380
+ /** @description Error message from the call, if any. */
2381
+ error?: string | null;
2382
+ /** @description The output from the tool call. */
2383
+ output?: string | null;
2384
+ status?: null | components["schemas"]["MCPToolCallStatus"];
2385
+ };
2386
+ /** @enum {string} */
2387
+ MCPToolCallStatus: "in_progress" | "completed" | "incomplete" | "calling" | "failed";
2388
+ MCPToolFilter: {
2389
+ /** @description Indicates whether or not a tool modifies data or is read-only.
2390
+ * If an MCP server is annotated with [readOnlyHint](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
2391
+ * it will match this filter. */
2392
+ read_only?: boolean | null;
2393
+ /** @description List of allowed tool names. */
2394
+ tool_names?: string[] | null;
2395
+ };
2396
+ /** @description Approval policy or filter for MCP tools. */
2397
+ MCPToolRequireApproval: components["schemas"]["MCPToolApprovalFilter"] | components["schemas"]["MCPToolApprovalSetting"];
2398
+ /** @enum {string} */
2399
+ McpToolConnectorId: "connector_dropbox" | "connector_gmail" | "connector_googlecalendar" | "connector_googledrive" | "connector_microsoftteams" | "connector_outlookcalendar" | "connector_outlookemail" | "connector_sharepoint";
2400
+ Message: {
2401
+ role: string;
2402
+ content: string;
2403
+ images?: string[] | null;
2404
+ };
2405
+ /** @description A message item used within the `Item` enum.
2406
+ *
2407
+ * Both InputMessage and OutputMessage have `type: "message"`, so we use an untagged
2408
+ * enum to distinguish them based on their structure:
2409
+ * - OutputMessage: role=assistant, required id & status fields
2410
+ * - InputMessage: role=user/system/developer, content is `Vec<ContentType>`, optional id/status
2411
+ *
2412
+ * Note: EasyInputMessage is NOT included here - it's a separate variant in `InputItem`,
2413
+ * not part of the structured `Item` enum. */
2414
+ MessageItem: components["schemas"]["OutputMessage"] | components["schemas"]["InputMessage"];
2415
+ /**
2416
+ * @description Labels an `assistant` message as intermediate commentary or the final answer.
2417
+ * For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend
2418
+ * phase on all assistant messages — dropping it can degrade performance.
2419
+ * @enum {string}
2420
+ */
2421
+ MessagePhase: "commentary" | "final_answer";
2422
+ /** @enum {string} */
2423
+ MessageType: "message";
2424
+ /** @description Set of 16 key-value pairs that can be attached to an object.
2425
+ * This can be useful for storing additional information about the
2426
+ * object in a structured format, and querying for objects via API
2427
+ * or the dashboard. Keys are strings with a maximum length of 64
2428
+ * characters. Values are strings with a maximum length of 512
2429
+ * characters. */
2430
+ Metadata: unknown;
2431
+ /** @description Describes an OpenAI model offering that can be used with the API. */
2432
+ Model: {
2433
+ /** @description The model identifier, which can be referenced in the API endpoints. */
2434
+ id: string;
2435
+ /** @description The object type, which is always "model". */
2436
+ object: string;
2437
+ /**
2438
+ * Format: int32
2439
+ * @description The Unix timestamp (in seconds) when the model was created.
2440
+ */
2441
+ created: number;
2442
+ /** @description The organization that owns the model. */
2443
+ owned_by: string;
2444
+ };
2445
+ ModelDetails: {
2446
+ parent_model?: string | null;
2447
+ format: string;
2448
+ family: string;
2449
+ families?: string[] | null;
2450
+ parameter_size: string;
2451
+ quantization_level: string;
2452
+ };
2453
+ ModelsResponse: {
2454
+ models: components["schemas"]["OllamaModel"][];
2455
+ };
2456
+ /** @description A mouse move action. */
2457
+ MoveParam: {
2458
+ /**
2459
+ * Format: int32
2460
+ * @description The x-coordinate to move to.
2461
+ */
2462
+ x: number;
2463
+ /**
2464
+ * Format: int32
2465
+ * @description The y-coordinate to move to.
2466
+ */
2467
+ y: number;
2468
+ };
2469
+ /** @description Groups function/custom tools under a shared namespace. */
2470
+ NamespaceToolParam: {
2471
+ /** @description The namespace name used in tool calls (for example, `crm`). */
2472
+ name: string;
2473
+ /** @description A description of the namespace shown to the model. */
2474
+ description: string;
2475
+ /** @description The function/custom tools available inside this namespace. */
2476
+ tools: components["schemas"]["NamespaceToolParamTool"][];
2477
+ };
2478
+ /** @description A function or custom tool that belongs to a namespace. */
2479
+ NamespaceToolParamTool: (components["schemas"]["FunctionToolParam"] & {
2480
+ /** @enum {string} */
2481
+ type: "function";
2482
+ }) | (components["schemas"]["CustomToolParam"] & {
2483
+ /** @enum {string} */
2484
+ type: "custom";
2485
+ });
2486
+ OllamaError: {
2487
+ error: string;
2488
+ };
2489
+ OllamaModel: {
2490
+ model: string;
2491
+ /** Format: int32 */
2492
+ modified_at: number;
2493
+ /** Format: int64 */
2494
+ size: number;
2495
+ digest: string;
2496
+ details: components["schemas"]["ModelDetails"];
2497
+ };
2498
+ Options: {
2499
+ /** Format: int32 */
2500
+ num_keep?: number | null;
2501
+ /** Format: int64 */
2502
+ seed?: number | null;
2503
+ /** Format: int32 */
2504
+ num_predict?: number | null;
2505
+ /** Format: int32 */
2506
+ top_k?: number | null;
2507
+ /** Format: float */
2508
+ top_p?: number | null;
2509
+ /** Format: float */
2510
+ tfs_z?: number | null;
2511
+ /** Format: float */
2512
+ typical_p?: number | null;
2513
+ /** Format: int32 */
2514
+ repeat_last_n?: number | null;
2515
+ /** Format: float */
2516
+ temperature?: number | null;
2517
+ /** Format: float */
2518
+ repeat_penalty?: number | null;
2519
+ /** Format: float */
2520
+ presence_penalty?: number | null;
2521
+ /** Format: float */
2522
+ frequency_penalty?: number | null;
2523
+ /** Format: float */
2524
+ mirostat?: number | null;
2525
+ /** Format: float */
2526
+ mirostat_tau?: number | null;
2527
+ /** Format: float */
2528
+ mirostat_eta?: number | null;
2529
+ penalize_newline?: boolean | null;
2530
+ stop?: string[] | null;
2531
+ numa?: boolean | null;
2532
+ /** Format: int32 */
2533
+ num_ctx?: number | null;
2534
+ /** Format: int32 */
2535
+ num_batch?: number | null;
2536
+ /** Format: int32 */
2537
+ num_gpu?: number | null;
2538
+ /** Format: int32 */
2539
+ main_gpu?: number | null;
2540
+ low_vram?: boolean | null;
2541
+ f16_kv?: boolean | null;
2542
+ logits_all?: boolean | null;
2543
+ vocab_only?: boolean | null;
2544
+ use_mmap?: boolean | null;
2545
+ use_mlock?: boolean | null;
2546
+ /** Format: int32 */
2547
+ num_thread?: number | null;
2548
+ };
2549
+ /** @description Output item */
2550
+ OutputItem: (components["schemas"]["OutputMessage"] & {
2551
+ /** @enum {string} */
2552
+ type: "message";
2553
+ }) | (components["schemas"]["FileSearchToolCall"] & {
2554
+ /** @enum {string} */
2555
+ type: "file_search_call";
2556
+ }) | (components["schemas"]["FunctionToolCall"] & {
2557
+ /** @enum {string} */
2558
+ type: "function_call";
2559
+ }) | (components["schemas"]["WebSearchToolCall"] & {
2560
+ /** @enum {string} */
2561
+ type: "web_search_call";
2562
+ }) | (components["schemas"]["ComputerToolCall"] & {
2563
+ /** @enum {string} */
2564
+ type: "computer_call";
2565
+ }) | (components["schemas"]["ReasoningItem"] & {
2566
+ /** @enum {string} */
2567
+ type: "reasoning";
2568
+ }) | (components["schemas"]["CompactionBody"] & {
2569
+ /** @enum {string} */
2570
+ type: "compaction";
2571
+ }) | (components["schemas"]["ImageGenToolCall"] & {
2572
+ /** @enum {string} */
2573
+ type: "image_generation_call";
2574
+ }) | (components["schemas"]["CodeInterpreterToolCall"] & {
2575
+ /** @enum {string} */
2576
+ type: "code_interpreter_call";
2577
+ }) | (components["schemas"]["LocalShellToolCall"] & {
2578
+ /** @enum {string} */
2579
+ type: "local_shell_call";
2580
+ }) | (components["schemas"]["FunctionShellCall"] & {
2581
+ /** @enum {string} */
2582
+ type: "shell_call";
2583
+ }) | (components["schemas"]["FunctionShellCallOutput"] & {
2584
+ /** @enum {string} */
2585
+ type: "shell_call_output";
2586
+ }) | (components["schemas"]["ApplyPatchToolCall"] & {
2587
+ /** @enum {string} */
2588
+ type: "apply_patch_call";
2589
+ }) | (components["schemas"]["ApplyPatchToolCallOutput"] & {
2590
+ /** @enum {string} */
2591
+ type: "apply_patch_call_output";
2592
+ }) | (components["schemas"]["MCPToolCall"] & {
2593
+ /** @enum {string} */
2594
+ type: "mcp_call";
2595
+ }) | (components["schemas"]["MCPListTools"] & {
2596
+ /** @enum {string} */
2597
+ type: "mcp_list_tools";
2598
+ }) | (components["schemas"]["MCPApprovalRequest"] & {
2599
+ /** @enum {string} */
2600
+ type: "mcp_approval_request";
2601
+ }) | (components["schemas"]["CustomToolCall"] & {
2602
+ /** @enum {string} */
2603
+ type: "custom_tool_call";
2604
+ }) | (components["schemas"]["ToolSearchCall"] & {
2605
+ /** @enum {string} */
2606
+ type: "tool_search_call";
2607
+ }) | (components["schemas"]["ToolSearchOutput"] & {
2608
+ /** @enum {string} */
2609
+ type: "tool_search_output";
2610
+ });
2611
+ /** @description A message generated by the model. */
2612
+ OutputMessage: {
2613
+ /** @description The content of the output message. */
2614
+ content: components["schemas"]["OutputMessageContent"][];
2615
+ /** @description The unique ID of the output message. */
2616
+ id: string;
2617
+ /** @description The role of the output message. Always `assistant`. */
2618
+ role: components["schemas"]["AssistantRole"];
2619
+ phase?: null | components["schemas"]["MessagePhase"];
2620
+ /** @description The status of the message input. One of `in_progress`, `completed`, or
2621
+ * `incomplete`. Populated when input items are returned via API. */
2622
+ status: components["schemas"]["OutputStatus"];
2623
+ };
2624
+ OutputMessageContent: (components["schemas"]["OutputTextContent"] & {
2625
+ /** @enum {string} */
2626
+ type: "output_text";
2627
+ }) | (components["schemas"]["RefusalContent"] & {
2628
+ /** @enum {string} */
2629
+ type: "refusal";
2630
+ });
2631
+ /**
2632
+ * @description Status of input/output items.
2633
+ * @enum {string}
2634
+ */
2635
+ OutputStatus: "in_progress" | "completed" | "incomplete";
2636
+ /** @description A simple text output from the model. */
2637
+ OutputTextContent: {
2638
+ /** @description The annotations of the text output. */
2639
+ annotations: components["schemas"]["Annotation"][];
2640
+ logprobs?: components["schemas"]["LogProb"][] | null;
2641
+ /** @description The text output from the model. */
2642
+ text: string;
2643
+ };
2644
+ OutputTokenDetails: {
2645
+ /**
2646
+ * Format: int32
2647
+ * @description The number of reasoning tokens.
2648
+ */
2649
+ reasoning_tokens: number;
2650
+ };
2651
+ /** @description Static predicted output content, such as the content of a text file that is being regenerated. */
2652
+ PredictionContent: {
2653
+ /** @description The type of the predicted content you want to provide. This type is
2654
+ * currently always `content`. */
2655
+ content: components["schemas"]["PredictionContentContent"];
2656
+ /** @enum {string} */
2657
+ type: "content";
2658
+ };
2659
+ /** @description The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. */
2660
+ PredictionContentContent: string | components["schemas"]["ChatCompletionRequestMessageContentPartText"][];
2661
+ Prompt: {
2662
+ /** @description The unique identifier of the prompt template to use. */
2663
+ id: string;
2664
+ /** @description Optional version of the prompt template. */
2665
+ version?: string | null;
2666
+ variables?: null | components["schemas"]["ResponsePromptVariables"];
2667
+ };
2668
+ /**
2669
+ * @description The retention policy for the prompt cache.
2670
+ * @enum {string}
2671
+ */
2672
+ PromptCacheRetention: "in_memory" | "24h";
2673
+ /** @description Breakdown of tokens used in a completion. */
2674
+ PromptTokensDetails: {
2675
+ /**
2676
+ * Format: int32
2677
+ * @description Audio input tokens present in the prompt.
2678
+ */
2679
+ audio_tokens?: number | null;
2680
+ /**
2681
+ * Format: int32
2682
+ * @description Cached tokens present in the prompt.
2683
+ */
2684
+ cached_tokens?: number | null;
2685
+ };
2686
+ /** @enum {string} */
2687
+ RankVersionType: "auto" | "default-2024-11-15";
2688
+ /** @description Options for search result ranking. */
2689
+ RankingOptions: {
2690
+ hybrid_search?: null | components["schemas"]["HybridSearch"];
2691
+ /** @description The ranker to use for the file search. */
2692
+ ranker: components["schemas"]["RankVersionType"];
2693
+ /**
2694
+ * Format: float
2695
+ * @description The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will
2696
+ * attempt to return only the most relevant results, but may return fewer results.
2697
+ */
2698
+ score_threshold?: number | null;
2699
+ };
2700
+ /** @description o-series reasoning settings. */
2701
+ Reasoning: {
2702
+ effort?: null | components["schemas"]["ReasoningEffort"];
2703
+ summary?: null | components["schemas"]["ReasoningSummary"];
2704
+ };
2705
+ /** @enum {string} */
2706
+ ReasoningEffort: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
2707
+ /** @description A reasoning item representing the model's chain of thought, including summary paragraphs. */
2708
+ ReasoningItem: {
2709
+ /** @description Unique identifier of the reasoning content. */
2710
+ id: string;
2711
+ /** @description Reasoning summary content. */
2712
+ summary: components["schemas"]["SummaryPart"][];
2713
+ /** @description Reasoning text content. */
2714
+ content?: components["schemas"]["ReasoningTextContent"][] | null;
2715
+ /** @description The encrypted content of the reasoning item - populated when a response is generated with
2716
+ * `reasoning.encrypted_content` in the `include` parameter. */
2717
+ encrypted_content?: string | null;
2718
+ status?: null | components["schemas"]["OutputStatus"];
2719
+ };
2720
+ /** @enum {string} */
2721
+ ReasoningSummary: "auto" | "concise" | "detailed";
2722
+ ReasoningTextContent: {
2723
+ /** @description The reasoning text from the model. */
2724
+ text: string;
2725
+ };
2726
+ /** @description A refusal explanation from the model. */
2727
+ RefusalContent: {
2728
+ /** @description The refusal explanation from the model. */
2729
+ refusal: string;
2730
+ };
2731
+ /** @description The complete response returned by the Responses API. */
2732
+ Response: {
2733
+ /** @description Whether to run the model response in the background.
2734
+ * [Learn more](https://platform.openai.com/docs/guides/background). */
2735
+ background?: boolean | null;
2736
+ billing?: null | components["schemas"]["Billing"];
2737
+ conversation?: null | components["schemas"]["Conversation"];
2738
+ /**
2739
+ * Format: int64
2740
+ * @description Unix timestamp (in seconds) when this Response was created.
2741
+ */
2742
+ created_at: number;
2743
+ /**
2744
+ * Format: int64
2745
+ * @description Unix timestamp (in seconds) of when this Response was completed.
2746
+ * Only present when the status is `completed`.
2747
+ */
2748
+ completed_at?: number | null;
2749
+ error?: null | components["schemas"]["ErrorObject"];
2750
+ /** @description Unique identifier for this response. */
2751
+ id: string;
2752
+ incomplete_details?: null | components["schemas"]["IncompleteDetails"];
2753
+ instructions?: null | components["schemas"]["Instructions"];
2754
+ /**
2755
+ * Format: int32
2756
+ * @description An upper bound for the number of tokens that can be generated for a response,
2757
+ * including visible output tokens and
2758
+ * [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
2759
+ */
2760
+ max_output_tokens?: number | null;
2761
+ /** @description Set of 16 key-value pairs that can be attached to an object. This can be
2762
+ * useful for storing additional information about the object in a structured
2763
+ * format, and querying for objects via API or the dashboard.
2764
+ *
2765
+ * Keys are strings with a maximum length of 64 characters. Values are strings
2766
+ * with a maximum length of 512 characters. */
2767
+ metadata?: {
2768
+ [key: string]: string;
2769
+ } | null;
2770
+ /** @description Model ID used to generate the response, like gpt-4o or o3. OpenAI offers a
2771
+ * wide range of models with different capabilities, performance characteristics,
2772
+ * and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models. */
2773
+ model: string;
2774
+ /** @description The object type of this resource - always set to `response`. */
2775
+ object: string;
2776
+ /** @description An array of content items generated by the model.
2777
+ *
2778
+ * - The length and order of items in the output array is dependent on the model's response.
2779
+ * - Rather than accessing the first item in the output array and assuming it's an assistant
2780
+ * message with the content generated by the model, you might consider using
2781
+ * the `output_text` property where supported in SDKs. */
2782
+ output: components["schemas"]["OutputItem"][];
2783
+ /** @description SDK-only convenience property that contains the aggregated text output from all
2784
+ * `output_text` items in the `output` array, if any are present.
2785
+ * Supported in the Python and JavaScript SDKs.
2786
+ * Whether to allow the model to run tool calls in parallel. */
2787
+ parallel_tool_calls?: boolean | null;
2788
+ /** @description The unique ID of the previous response to the model. Use this to create multi-turn conversations.
2789
+ * Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state).
2790
+ * Cannot be used in conjunction with `conversation`. */
2791
+ previous_response_id?: string | null;
2792
+ prompt?: null | components["schemas"]["Prompt"];
2793
+ /** @description Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces
2794
+ * the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). */
2795
+ prompt_cache_key?: string | null;
2796
+ prompt_cache_retention?: null | components["schemas"]["PromptCacheRetention"];
2797
+ reasoning?: null | components["schemas"]["Reasoning"];
2798
+ /** @description A stable identifier used to help detect users of your application that may be violating OpenAI's
2799
+ * usage policies.
2800
+ *
2801
+ * The IDs should be a string that uniquely identifies each user. We recommend hashing their username
2802
+ * or email address, in order to avoid sending us any identifying information. [Learn
2803
+ * more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). */
2804
+ safety_identifier?: string | null;
2805
+ service_tier?: null | components["schemas"]["ServiceTier"];
2806
+ /** @description The status of the response generation.
2807
+ * One of `completed`, `failed`, `in_progress`, `cancelled`, `queued`, or `incomplete`. */
2808
+ status: components["schemas"]["Status"];
2809
+ /**
2810
+ * Format: float
2811
+ * @description What sampling temperature was used, between 0 and 2. Higher values like 0.8 make
2812
+ * outputs more random, lower values like 0.2 make output more focused and deterministic.
2813
+ *
2814
+ * We generally recommend altering this or `top_p` but not both.
2815
+ */
2816
+ temperature?: number | null;
2817
+ text?: null | components["schemas"]["ResponseTextParam"];
2818
+ tool_choice?: null | components["schemas"]["ToolChoiceParam"];
2819
+ /** @description An array of tools the model may call while generating a response. You
2820
+ * can specify which tool to use by setting the `tool_choice` parameter.
2821
+ *
2822
+ * We support the following categories of tools:
2823
+ * - **Built-in tools**: Tools that are provided by OpenAI that extend the
2824
+ * model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
2825
+ * or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
2826
+ * [built-in tools](https://platform.openai.com/docs/guides/tools).
2827
+ * - **MCP Tools**: Integrations with third-party systems via custom MCP servers
2828
+ * or predefined connectors such as Google Drive and SharePoint. Learn more about
2829
+ * [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
2830
+ * - **Function calls (custom tools)**: Functions that are defined by you,
2831
+ * enabling the model to call your own code with strongly typed arguments
2832
+ * and outputs. Learn more about
2833
+ * [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
2834
+ * custom tools to call your own code. */
2835
+ tools?: components["schemas"]["Tool"][] | null;
2836
+ /**
2837
+ * Format: int32
2838
+ * @description An integer between 0 and 20 specifying the number of most likely tokens to return at each
2839
+ * token position, each with an associated log probability.
2840
+ */
2841
+ top_logprobs?: number | null;
2842
+ /**
2843
+ * Format: float
2844
+ * @description An alternative to sampling with temperature, called nucleus sampling,
2845
+ * where the model considers the results of the tokens with top_p probability
2846
+ * mass. So 0.1 means only the tokens comprising the top 10% probability mass
2847
+ * are considered.
2848
+ *
2849
+ * We generally recommend altering this or `temperature` but not both.
2850
+ */
2851
+ top_p?: number | null;
2852
+ truncation?: null | components["schemas"]["Truncation"];
2853
+ usage?: null | components["schemas"]["ResponseUsage"];
2854
+ };
2855
+ ResponseFormat: {
2856
+ /** @enum {string} */
2857
+ type: "text";
2858
+ } | {
2859
+ /** @enum {string} */
2860
+ type: "json_object";
2861
+ } | {
2862
+ json_schema: components["schemas"]["ResponseFormatJsonSchema"];
2863
+ /** @enum {string} */
2864
+ type: "json_schema";
2865
+ };
2866
+ ResponseFormatJsonSchema: {
2867
+ /** @description A description of what the response format is for, used by the model to determine how to respond in the format. */
2868
+ description?: string | null;
2869
+ /** @description The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. */
2870
+ name: string;
2871
+ /** @description The schema for the response format, described as a JSON Schema object.
2872
+ * Learn how to build JSON schemas [here](https://json-schema.org/). */
2873
+ schema?: Record<string, never> | null;
2874
+ /** @description Whether to enable strict schema adherence when generating the output.
2875
+ * If set to true, the model will always follow the exact schema defined
2876
+ * in the `schema` field. Only a subset of JSON Schema is supported when
2877
+ * `strict` is `true`. To learn more, read the [Structured Outputs
2878
+ * guide](https://platform.openai.com/docs/guides/structured-outputs). */
2879
+ strict?: boolean | null;
2880
+ };
2881
+ /**
2882
+ * @description Output types that you would like the model to generate for this request.
2883
+ *
2884
+ * Most models are capable of generating text, which is the default: `["text"]`
2885
+ *
2886
+ * The `gpt-4o-audio-preview` model can also be used to [generate
2887
+ * audio](https://platform.openai.com/docs/guides/audio). To request that this model generate both text and audio responses, you can use: `["text", "audio"]`
2888
+ * @enum {string}
2889
+ */
2890
+ ResponseModalities: "text" | "audio";
2891
+ ResponsePromptVariables: string | components["schemas"]["InputContent"] | Record<string, never>;
2892
+ ResponseStreamOptions: {
2893
+ /** @description When true, stream obfuscation will be enabled. Stream obfuscation adds
2894
+ * random characters to an `obfuscation` field on streaming delta events to
2895
+ * normalize payload sizes as a mitigation to certain side-channel attacks.
2896
+ * These obfuscation fields are included by default, but add a small amount
2897
+ * of overhead to the data stream. You can set `include_obfuscation` to
2898
+ * false to optimize for bandwidth if you trust the network links between
2899
+ * your application and the OpenAI API. */
2900
+ include_obfuscation?: boolean | null;
2901
+ };
2902
+ /** @description Configuration for text response format. */
2903
+ ResponseTextParam: {
2904
+ /** @description An object specifying the format that the model must output.
2905
+ *
2906
+ * Configuring `{ "type": "json_schema" }` enables Structured Outputs,
2907
+ * which ensures the model will match your supplied JSON schema. Learn more in the
2908
+ * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
2909
+ *
2910
+ * The default format is `{ "type": "text" }` with no additional options.
2911
+ *
2912
+ * **Not recommended for gpt-4o and newer models:**
2913
+ *
2914
+ * Setting to `{ "type": "json_object" }` enables the older JSON mode, which
2915
+ * ensures the message the model generates is valid JSON. Using `json_schema`
2916
+ * is preferred for models that support it. */
2917
+ format: components["schemas"]["TextResponseFormatConfiguration"];
2918
+ verbosity?: null | components["schemas"]["Verbosity"];
2919
+ };
2920
+ /** @description Usage statistics for a response. */
2921
+ ResponseUsage: {
2922
+ /**
2923
+ * Format: int32
2924
+ * @description The number of input tokens.
2925
+ */
2926
+ input_tokens: number;
2927
+ /** @description A detailed breakdown of the input tokens. */
2928
+ input_tokens_details: components["schemas"]["InputTokenDetails"];
2929
+ /**
2930
+ * Format: int32
2931
+ * @description The number of output tokens.
2932
+ */
2933
+ output_tokens: number;
2934
+ /** @description A detailed breakdown of the output tokens. */
2935
+ output_tokens_details: components["schemas"]["OutputTokenDetails"];
2936
+ /**
2937
+ * Format: int32
2938
+ * @description The total number of tokens used.
2939
+ */
2940
+ total_tokens: number;
2941
+ };
2942
+ /**
2943
+ * @description Role of messages in the API.
2944
+ * @enum {string}
2945
+ */
2946
+ Role: "user" | "assistant" | "system" | "developer";
2947
+ /** @description A scroll action. */
2948
+ ScrollParam: {
2949
+ /**
2950
+ * Format: int32
2951
+ * @description The horizontal scroll distance.
2952
+ */
2953
+ scroll_x: number;
2954
+ /**
2955
+ * Format: int32
2956
+ * @description The vertical scroll distance.
2957
+ */
2958
+ scroll_y: number;
2959
+ /**
2960
+ * Format: int32
2961
+ * @description The x-coordinate where the scroll occurred.
2962
+ */
2963
+ x: number;
2964
+ /**
2965
+ * Format: int32
2966
+ * @description The y-coordinate where the scroll occurred.
2967
+ */
2968
+ y: number;
2969
+ };
2970
+ /**
2971
+ * @description The type of content to search for.
2972
+ * @enum {string}
2973
+ */
2974
+ SearchContentType: "text" | "image";
2975
+ /** @enum {string} */
2976
+ ServiceTier: "auto" | "default" | "flex" | "scale" | "priority";
2977
+ ShowRequest: {
2978
+ name: string;
2979
+ };
2980
+ ShowResponse: {
2981
+ details: components["schemas"]["ModelDetails"];
2982
+ license: string;
2983
+ model_info: {
2984
+ [key: string]: unknown;
2985
+ };
2986
+ modelfile: string;
2987
+ /** Format: int32 */
2988
+ modified_at: number;
2989
+ parameters: string;
2990
+ template: string;
2991
+ };
2992
+ /** @description A skill parameter — either a reference or inline definition. */
2993
+ SkillParam: (components["schemas"]["SkillReferenceParam"] & {
2994
+ /** @enum {string} */
2995
+ type: "skill_reference";
2996
+ }) | (components["schemas"]["InlineSkillParam"] & {
2997
+ /** @enum {string} */
2998
+ type: "inline";
2999
+ });
3000
+ /** @description A skill referenced by ID. */
3001
+ SkillReferenceParam: {
3002
+ /** @description The ID of the skill to reference. */
3003
+ skill_id: string;
3004
+ /** @description An optional specific version to use. */
3005
+ version?: string | null;
3006
+ };
3007
+ /** @enum {string} */
3008
+ Status: "completed" | "failed" | "in_progress" | "cancelled" | "queued" | "incomplete";
3009
+ StopConfiguration: string | string[];
3010
+ SummaryPart: components["schemas"]["SummaryTextContent"] & {
3011
+ /** @enum {string} */
3012
+ type: "summary_text";
3013
+ };
3014
+ SummaryTextContent: {
3015
+ /** @description A summary of the reasoning output from the model so far. */
3016
+ text: string;
3017
+ };
3018
+ TextResponseFormatConfiguration: {
3019
+ /** @enum {string} */
3020
+ type: "text";
3021
+ } | {
3022
+ /** @enum {string} */
3023
+ type: "json_object";
3024
+ } | (components["schemas"]["ResponseFormatJsonSchema"] & {
3025
+ /** @enum {string} */
3026
+ type: "json_schema";
3027
+ });
3028
+ /** @description Definitions for model-callable tools. */
3029
+ Tool: (components["schemas"]["FunctionTool"] & {
3030
+ /** @enum {string} */
3031
+ type: "function";
3032
+ }) | (components["schemas"]["FileSearchTool"] & {
3033
+ /** @enum {string} */
3034
+ type: "file_search";
3035
+ }) | (components["schemas"]["ComputerUsePreviewTool"] & {
3036
+ /** @enum {string} */
3037
+ type: "computer_use_preview";
3038
+ }) | (components["schemas"]["WebSearchTool"] & {
3039
+ /** @enum {string} */
3040
+ type: "web_search";
3041
+ }) | (components["schemas"]["WebSearchTool"] & {
3042
+ /** @enum {string} */
3043
+ type: "web_search_2025_08_26";
3044
+ }) | (components["schemas"]["MCPTool"] & {
3045
+ /** @enum {string} */
3046
+ type: "mcp";
3047
+ }) | (components["schemas"]["CodeInterpreterTool"] & {
3048
+ /** @enum {string} */
3049
+ type: "code_interpreter";
3050
+ }) | (components["schemas"]["ImageGenTool"] & {
3051
+ /** @enum {string} */
3052
+ type: "image_generation";
3053
+ }) | {
3054
+ /** @enum {string} */
3055
+ type: "local_shell";
3056
+ } | (components["schemas"]["FunctionShellToolParam"] & {
3057
+ /** @enum {string} */
3058
+ type: "shell";
3059
+ }) | (components["schemas"]["CustomToolParam"] & {
3060
+ /** @enum {string} */
3061
+ type: "custom";
3062
+ }) | (components["schemas"]["ComputerTool"] & {
3063
+ /** @enum {string} */
3064
+ type: "computer";
3065
+ }) | (components["schemas"]["NamespaceToolParam"] & {
3066
+ /** @enum {string} */
3067
+ type: "namespace";
3068
+ }) | (components["schemas"]["ToolSearchToolParam"] & {
3069
+ /** @enum {string} */
3070
+ type: "tool_search";
3071
+ }) | (components["schemas"]["WebSearchTool"] & {
3072
+ /** @enum {string} */
3073
+ type: "web_search_preview";
3074
+ }) | (components["schemas"]["WebSearchTool"] & {
3075
+ /** @enum {string} */
3076
+ type: "web_search_preview_2025_03_11";
3077
+ }) | {
3078
+ /** @enum {string} */
3079
+ type: "apply_patch";
3080
+ };
3081
+ ToolChoiceAllowed: {
3082
+ /** @description Constrains the tools available to the model to a pre-defined set.
3083
+ *
3084
+ * `auto` allows the model to pick from among the allowed tools and generate a
3085
+ * message.
3086
+ *
3087
+ * `required` requires the model to call one or more of the allowed tools. */
3088
+ mode: components["schemas"]["ToolChoiceAllowedMode"];
3089
+ /** @description A list of tool definitions that the model should be allowed to call.
3090
+ *
3091
+ * For the Responses API, the list of tool definitions might look like:
3092
+ * ```json
3093
+ * [
3094
+ * { "type": "function", "name": "get_weather" },
3095
+ * { "type": "mcp", "server_label": "deepwiki" },
3096
+ * { "type": "image_generation" }
3097
+ * ]
3098
+ * ``` */
3099
+ tools: Record<string, never>[];
3100
+ };
3101
+ /** @enum {string} */
3102
+ ToolChoiceAllowedMode: "auto" | "required";
3103
+ ToolChoiceCustom: {
3104
+ /** @description The name of the custom tool to call. */
3105
+ name: string;
3106
+ };
3107
+ ToolChoiceFunction: {
3108
+ /** @description The name of the function to call. */
3109
+ name: string;
3110
+ };
3111
+ ToolChoiceMCP: {
3112
+ /** @description The name of the tool to call on the server. */
3113
+ name: string;
3114
+ /** @description The label of the MCP server to use. */
3115
+ server_label: string;
3116
+ };
3117
+ /** @enum {string} */
3118
+ ToolChoiceOptions: "none" | "auto" | "required";
3119
+ ToolChoiceParam: (components["schemas"]["ToolChoiceAllowed"] & {
3120
+ /** @enum {string} */
3121
+ type: "allowed_tools";
3122
+ }) | (components["schemas"]["ToolChoiceFunction"] & {
3123
+ /** @enum {string} */
3124
+ type: "function";
3125
+ }) | (components["schemas"]["ToolChoiceMCP"] & {
3126
+ /** @enum {string} */
3127
+ type: "mcp";
3128
+ }) | (components["schemas"]["ToolChoiceCustom"] & {
3129
+ /** @enum {string} */
3130
+ type: "custom";
3131
+ }) | {
3132
+ /** @enum {string} */
3133
+ type: "apply_patch";
3134
+ } | {
3135
+ /** @enum {string} */
3136
+ type: "shell";
3137
+ } | (components["schemas"]["ToolChoiceTypes"] & {
3138
+ /** @enum {string} */
3139
+ type: "hosted";
3140
+ }) | (components["schemas"]["ToolChoiceOptions"] & {
3141
+ /** @enum {string} */
3142
+ type: "mode";
3143
+ });
3144
+ /** @description The type of hosted tool the model should to use. Learn more about
3145
+ * [built-in tools](https://platform.openai.com/docs/guides/tools). */
3146
+ ToolChoiceTypes: {
3147
+ /** @enum {string} */
3148
+ type: "file_search";
3149
+ } | {
3150
+ /** @enum {string} */
3151
+ type: "web_search_preview";
3152
+ } | {
3153
+ /** @enum {string} */
3154
+ type: "computer";
3155
+ } | {
3156
+ /** @enum {string} */
3157
+ type: "computer_use_preview";
3158
+ } | {
3159
+ /** @enum {string} */
3160
+ type: "computer_use";
3161
+ } | {
3162
+ /** @enum {string} */
3163
+ type: "web_search_preview_2025_03_11";
3164
+ } | {
3165
+ /** @enum {string} */
3166
+ type: "code_interpreter";
3167
+ } | {
3168
+ /** @enum {string} */
3169
+ type: "image_generation";
3170
+ };
3171
+ /** @description A tool search call output item. */
3172
+ ToolSearchCall: {
3173
+ /** @description The unique ID of the tool search call item. */
3174
+ id: string;
3175
+ /** @description The unique ID of the tool search call generated by the model. */
3176
+ call_id?: string | null;
3177
+ /** @description Whether tool search was executed by the server or by the client. */
3178
+ execution: components["schemas"]["ToolSearchExecutionType"];
3179
+ /** @description Arguments used for the tool search call. */
3180
+ arguments: Record<string, never>;
3181
+ /** @description The status of the tool search call item. */
3182
+ status: components["schemas"]["FunctionCallStatus"];
3183
+ /** @description The identifier of the actor that created the item. */
3184
+ created_by?: string | null;
3185
+ };
3186
+ /** @description A tool search call input item. */
3187
+ ToolSearchCallItemParam: {
3188
+ /** @description The unique ID of this tool search call. */
3189
+ id?: string | null;
3190
+ /** @description The unique ID of the tool search call generated by the model. */
3191
+ call_id?: string | null;
3192
+ execution?: null | components["schemas"]["ToolSearchExecutionType"];
3193
+ /** @description The arguments supplied to the tool search call. */
3194
+ arguments?: Record<string, never>;
3195
+ status?: null | components["schemas"]["OutputStatus"];
3196
+ };
3197
+ /**
3198
+ * @description Whether tool search was executed by the server or by the client.
3199
+ * @enum {string}
3200
+ */
3201
+ ToolSearchExecutionType: "server" | "client";
3202
+ /** @description A tool search output item. */
3203
+ ToolSearchOutput: {
3204
+ /** @description The unique ID of the tool search output item. */
3205
+ id: string;
3206
+ /** @description The unique ID of the tool search call generated by the model. */
3207
+ call_id?: string | null;
3208
+ /** @description Whether tool search was executed by the server or by the client. */
3209
+ execution: components["schemas"]["ToolSearchExecutionType"];
3210
+ /** @description The loaded tool definitions returned by tool search. */
3211
+ tools: components["schemas"]["Tool"][];
3212
+ /** @description The status of the tool search output item. */
3213
+ status: components["schemas"]["FunctionCallOutputStatusEnum"];
3214
+ /** @description The identifier of the actor that created the item. */
3215
+ created_by?: string | null;
3216
+ };
3217
+ /** @description A tool search output input item. */
3218
+ ToolSearchOutputItemParam: {
3219
+ /** @description The unique ID of this tool search output. */
3220
+ id?: string | null;
3221
+ /** @description The unique ID of the tool search call generated by the model. */
3222
+ call_id?: string | null;
3223
+ execution?: null | components["schemas"]["ToolSearchExecutionType"];
3224
+ /** @description The loaded tool definitions returned by the tool search output. */
3225
+ tools: components["schemas"]["Tool"][];
3226
+ status?: null | components["schemas"]["OutputStatus"];
3227
+ };
3228
+ /** @description Hosted or BYOT tool search configuration for deferred tools. */
3229
+ ToolSearchToolParam: {
3230
+ execution?: null | components["schemas"]["ToolSearchExecutionType"];
3231
+ /** @description Description shown to the model for a client-executed tool search tool. */
3232
+ description?: string | null;
3233
+ /** @description Parameter schema for a client-executed tool search tool. */
3234
+ parameters?: Record<string, never> | null;
3235
+ };
3236
+ TopLogProb: {
3237
+ bytes: number[];
3238
+ /** Format: double */
3239
+ logprob: number;
3240
+ token: string;
3241
+ };
3242
+ TopLogprobs: {
3243
+ /** @description The token. */
3244
+ token: string;
3245
+ /**
3246
+ * Format: float
3247
+ * @description The log probability of this token.
3248
+ */
3249
+ logprob: number;
3250
+ /** @description A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. */
3251
+ bytes?: number[] | null;
3252
+ };
3253
+ /**
3254
+ * @description Truncation strategies.
3255
+ * @enum {string}
3256
+ */
3257
+ Truncation: "auto" | "disabled";
3258
+ /** @description A typing (text entry) action. */
3259
+ TypeParam: {
3260
+ /** @description The text to type. */
3261
+ text: string;
3262
+ };
3263
+ UrlCitation: {
3264
+ /**
3265
+ * Format: int32
3266
+ * @description The index of the last character of the URL citation in the message.
3267
+ */
3268
+ end_index: number;
3269
+ /**
3270
+ * Format: int32
3271
+ * @description The index of the first character of the URL citation in the message.
3272
+ */
3273
+ start_index: number;
3274
+ /** @description The title of the web resource. */
3275
+ title: string;
3276
+ /** @description The URL of the web resource. */
3277
+ url: string;
3278
+ };
3279
+ UrlCitationBody: {
3280
+ /**
3281
+ * Format: int32
3282
+ * @description The index of the last character of the URL citation in the message.
3283
+ */
3284
+ end_index: number;
3285
+ /**
3286
+ * Format: int32
3287
+ * @description The index of the first character of the URL citation in the message.
3288
+ */
3289
+ start_index: number;
3290
+ /** @description The title of the web resource. */
3291
+ title: string;
3292
+ /** @description The URL of the web resource. */
3293
+ url: string;
3294
+ };
3295
+ /**
3296
+ * @description o-series reasoning settings.
3297
+ * @enum {string}
3298
+ */
3299
+ Verbosity: "low" | "medium" | "high";
3300
+ WebSearchActionFind: {
3301
+ /** @description The URL of the page searched for the pattern. */
3302
+ url: string;
3303
+ /** @description The pattern or text to search for within the page. */
3304
+ pattern: string;
3305
+ };
3306
+ WebSearchActionOpenPage: {
3307
+ /** @description The URL opened by the model. */
3308
+ url?: string | null;
3309
+ };
3310
+ WebSearchActionSearch: {
3311
+ /** @description The search query. */
3312
+ query: string;
3313
+ /** @description The sources used in the search. */
3314
+ sources?: components["schemas"]["WebSearchActionSearchSource"][] | null;
3315
+ };
3316
+ WebSearchActionSearchSource: {
3317
+ /** @description The type of source. Always `url`. */
3318
+ type: string;
3319
+ /** @description The URL of the source. */
3320
+ url: string;
3321
+ };
3322
+ /** @description Approximate user location for web search. */
3323
+ WebSearchApproximateLocation: {
3324
+ /** @description The type of location approximation. Defaults to `approximate` when omitted in JSON input. */
3325
+ type?: components["schemas"]["WebSearchApproximateLocationType"];
3326
+ /** @description Free text input for the city of the user, e.g. `San Francisco`. */
3327
+ city?: string | null;
3328
+ /** @description The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,
3329
+ * e.g. `US`. */
3330
+ country?: string | null;
3331
+ /** @description Free text input for the region of the user, e.g. `California`. */
3332
+ region?: string | null;
3333
+ /** @description The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g.
3334
+ * `America/Los_Angeles`. */
3335
+ timezone?: string | null;
3336
+ };
3337
+ /** @enum {string} */
3338
+ WebSearchApproximateLocationType: "approximate";
3339
+ /**
3340
+ * @description The amount of context window space to use for the search.
3341
+ * @enum {string}
3342
+ */
3343
+ WebSearchContextSize: "low" | "medium" | "high";
3344
+ /** @description Approximate location parameters for the search. */
3345
+ WebSearchLocation: {
3346
+ /** @description The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. */
3347
+ country?: string | null;
3348
+ /** @description Free text input for the region of the user, e.g. `California`. */
3349
+ region?: string | null;
3350
+ /** @description Free text input for the city of the user, e.g. `San Francisco`. */
3351
+ city?: string | null;
3352
+ /** @description The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. */
3353
+ timezone?: string | null;
3354
+ };
3355
+ /** @description Options for the web search tool. */
3356
+ WebSearchOptions: {
3357
+ search_context_size?: null | components["schemas"]["WebSearchContextSize"];
3358
+ user_location?: null | components["schemas"]["WebSearchUserLocation"];
3359
+ };
3360
+ WebSearchTool: {
3361
+ filters?: null | components["schemas"]["WebSearchToolFilters"];
3362
+ user_location?: null | components["schemas"]["WebSearchApproximateLocation"];
3363
+ search_context_size?: null | components["schemas"]["WebSearchToolSearchContextSize"];
3364
+ /** @description The types of content to search for. */
3365
+ search_content_types?: components["schemas"]["SearchContentType"][] | null;
3366
+ };
3367
+ /** @description Web search tool call output. */
3368
+ WebSearchToolCall: {
3369
+ /** @description An object describing the specific action taken in this web search call. Includes
3370
+ * details on how the model used the web (search, open_page, find, find_in_page). */
3371
+ action: components["schemas"]["WebSearchToolCallAction"];
3372
+ /** @description The unique ID of the web search tool call. */
3373
+ id: string;
3374
+ /** @description The status of the web search tool call. */
3375
+ status: components["schemas"]["WebSearchToolCallStatus"];
3376
+ };
3377
+ WebSearchToolCallAction: (components["schemas"]["WebSearchActionSearch"] & {
3378
+ /** @enum {string} */
3379
+ type: "search";
3380
+ }) | (components["schemas"]["WebSearchActionOpenPage"] & {
3381
+ /** @enum {string} */
3382
+ type: "open_page";
3383
+ }) | (components["schemas"]["WebSearchActionFind"] & {
3384
+ /** @enum {string} */
3385
+ type: "find";
3386
+ }) | (components["schemas"]["WebSearchActionFind"] & {
3387
+ /** @enum {string} */
3388
+ type: "find_in_page";
3389
+ });
3390
+ /** @enum {string} */
3391
+ WebSearchToolCallStatus: "in_progress" | "searching" | "completed" | "failed";
3392
+ WebSearchToolFilters: {
3393
+ /** @description Allowed domains for the search. If not provided, all domains are allowed.
3394
+ * Subdomains of the provided domains are allowed as well.
3395
+ *
3396
+ * Example: `["pubmed.ncbi.nlm.nih.gov"]` */
3397
+ allowed_domains?: string[] | null;
3398
+ };
3399
+ /** @enum {string} */
3400
+ WebSearchToolSearchContextSize: "low" | "medium" | "high";
3401
+ WebSearchUserLocation: {
3402
+ type: components["schemas"]["WebSearchUserLocationType"];
3403
+ approximate: components["schemas"]["WebSearchLocation"];
3404
+ };
3405
+ /** @enum {string} */
3406
+ WebSearchUserLocationType: "approximate";
3407
+ /** @description Wrapper to deserialize the error object nested in "error" JSON key */
3408
+ WrappedError: {
3409
+ error: components["schemas"]["ApiError"];
3410
+ };
3411
+ };
3412
+ responses: never;
3413
+ parameters: never;
3414
+ requestBodies: never;
3415
+ headers: never;
3416
+ pathItems: never;
3417
+ }
3418
+ export type $defs = Record<string, never>;
3419
+ export interface operations {
3420
+ chatOllamaModel: {
3421
+ parameters: {
3422
+ query?: never;
3423
+ header?: never;
3424
+ path?: never;
3425
+ cookie?: never;
3426
+ };
3427
+ /** @description Chat request in Ollama format */
3428
+ requestBody: {
3429
+ content: {
3430
+ /** @example {
3431
+ * "messages": [
3432
+ * {
3433
+ * "content": "You are a helpful assistant.",
3434
+ * "role": "system"
3435
+ * },
3436
+ * {
3437
+ * "content": "Hello!",
3438
+ * "role": "user"
3439
+ * }
3440
+ * ],
3441
+ * "model": "llama2:chat",
3442
+ * "options": {
3443
+ * "num_predict": 100,
3444
+ * "temperature": 0.7
3445
+ * },
3446
+ * "stream": true
3447
+ * } */
3448
+ "application/json": components["schemas"]["ChatRequest"];
3449
+ };
3450
+ };
3451
+ responses: {
3452
+ /** @description Chat response */
3453
+ 200: {
3454
+ headers: {
3455
+ [name: string]: unknown;
3456
+ };
3457
+ content: {
3458
+ /** @example {
3459
+ * "created_at": "2024-01-20T12:00:00.000000000Z",
3460
+ * "done": true,
3461
+ * "done_reason": "stop",
3462
+ * "eval_count": 10,
3463
+ * "eval_duration": "-1",
3464
+ * "load_duration": "-1",
3465
+ * "message": {
3466
+ * "content": "Hello! How can I help you today?",
3467
+ * "images": null,
3468
+ * "role": "assistant"
3469
+ * },
3470
+ * "model": "llama2:chat",
3471
+ * "prompt_eval_count": 20,
3472
+ * "prompt_eval_duration": "-1",
3473
+ * "total_duration": 0
3474
+ * } */
3475
+ "application/json": unknown;
3476
+ };
3477
+ };
3478
+ /** @description Invalid request parameters */
3479
+ 400: {
3480
+ headers: {
3481
+ [name: string]: unknown;
3482
+ };
3483
+ content: {
3484
+ "application/json": components["schemas"]["WrappedError"];
3485
+ };
3486
+ };
3487
+ /** @description Not authenticated */
3488
+ 401: {
3489
+ headers: {
3490
+ [name: string]: unknown;
3491
+ };
3492
+ content: {
3493
+ "application/json": components["schemas"]["WrappedError"];
3494
+ };
3495
+ };
3496
+ /** @description Insufficient permissions */
3497
+ 403: {
3498
+ headers: {
3499
+ [name: string]: unknown;
3500
+ };
3501
+ content: {
3502
+ "application/json": components["schemas"]["WrappedError"];
3503
+ };
3504
+ };
3505
+ /** @description Model not found */
3506
+ 404: {
3507
+ headers: {
3508
+ [name: string]: unknown;
3509
+ };
3510
+ content: {
3511
+ /** @example {
3512
+ * "error": "model not found"
3513
+ * } */
3514
+ "application/json": components["schemas"]["OllamaError"];
3515
+ };
3516
+ };
3517
+ /** @description Internal server error */
3518
+ 500: {
3519
+ headers: {
3520
+ [name: string]: unknown;
3521
+ };
3522
+ content: {
3523
+ "application/json": components["schemas"]["WrappedError"];
3524
+ };
3525
+ };
3526
+ };
3527
+ };
3528
+ showOllamaModel: {
3529
+ parameters: {
3530
+ query?: never;
3531
+ header?: never;
3532
+ path?: never;
3533
+ cookie?: never;
3534
+ };
3535
+ /** @description Model name to get details for */
3536
+ requestBody: {
3537
+ content: {
3538
+ /** @example {
3539
+ * "name": "llama2:chat"
3540
+ * } */
3541
+ "application/json": components["schemas"]["ShowRequest"];
3542
+ };
3543
+ };
3544
+ responses: {
3545
+ /** @description Model details */
3546
+ 200: {
3547
+ headers: {
3548
+ [name: string]: unknown;
3549
+ };
3550
+ content: {
3551
+ /** @example {
3552
+ * "details": {
3553
+ * "families": null,
3554
+ * "family": "unknown",
3555
+ * "format": "gguf",
3556
+ * "parameter_size": "",
3557
+ * "parent_model": null,
3558
+ * "quantization_level": ""
3559
+ * },
3560
+ * "license": "",
3561
+ * "model_info": {},
3562
+ * "modelfile": "",
3563
+ * "modified_at": "2024-01-20T12:00:00.000000000Z",
3564
+ * "parameters": "n_keep: 24\nstop:\n- <|start_header_id|>\n- <|end_header_id|>\n- <|eot_id|>\n",
3565
+ * "template": "llama2"
3566
+ * } */
3567
+ "application/json": components["schemas"]["ShowResponse"];
3568
+ };
3569
+ };
3570
+ /** @description Invalid request parameters */
3571
+ 400: {
3572
+ headers: {
3573
+ [name: string]: unknown;
3574
+ };
3575
+ content: {
3576
+ "application/json": components["schemas"]["WrappedError"];
3577
+ };
3578
+ };
3579
+ /** @description Not authenticated */
3580
+ 401: {
3581
+ headers: {
3582
+ [name: string]: unknown;
3583
+ };
3584
+ content: {
3585
+ "application/json": components["schemas"]["WrappedError"];
3586
+ };
3587
+ };
3588
+ /** @description Insufficient permissions */
3589
+ 403: {
3590
+ headers: {
3591
+ [name: string]: unknown;
3592
+ };
3593
+ content: {
3594
+ "application/json": components["schemas"]["WrappedError"];
3595
+ };
3596
+ };
3597
+ /** @description Model not found */
3598
+ 404: {
3599
+ headers: {
3600
+ [name: string]: unknown;
3601
+ };
3602
+ content: {
3603
+ /** @example {
3604
+ * "error": "model not found"
3605
+ * } */
3606
+ "application/json": components["schemas"]["OllamaError"];
3607
+ };
3608
+ };
3609
+ /** @description Internal server error */
3610
+ 500: {
3611
+ headers: {
3612
+ [name: string]: unknown;
3613
+ };
3614
+ content: {
3615
+ "application/json": components["schemas"]["WrappedError"];
3616
+ };
3617
+ };
3618
+ };
3619
+ };
3620
+ listOllamaModels: {
3621
+ parameters: {
3622
+ query?: never;
3623
+ header?: never;
3624
+ path?: never;
3625
+ cookie?: never;
3626
+ };
3627
+ requestBody?: never;
3628
+ responses: {
3629
+ /** @description List of available models */
3630
+ 200: {
3631
+ headers: {
3632
+ [name: string]: unknown;
3633
+ };
3634
+ content: {
3635
+ /** @example {
3636
+ * "models": [
3637
+ * {
3638
+ * "details": {
3639
+ * "families": null,
3640
+ * "family": "unknown",
3641
+ * "format": "gguf",
3642
+ * "parameter_size": "",
3643
+ * "parent_model": null,
3644
+ * "quantization_level": ""
3645
+ * },
3646
+ * "digest": "sha256:abc123",
3647
+ * "model": "llama2:chat",
3648
+ * "modified_at": "2024-01-20T12:00:00.000000000Z",
3649
+ * "size": 0
3650
+ * }
3651
+ * ]
3652
+ * } */
3653
+ "application/json": components["schemas"]["ModelsResponse"];
3654
+ };
3655
+ };
3656
+ /** @description Invalid request parameters */
3657
+ 400: {
3658
+ headers: {
3659
+ [name: string]: unknown;
3660
+ };
3661
+ content: {
3662
+ "application/json": components["schemas"]["WrappedError"];
3663
+ };
3664
+ };
3665
+ /** @description Not authenticated */
3666
+ 401: {
3667
+ headers: {
3668
+ [name: string]: unknown;
3669
+ };
3670
+ content: {
3671
+ "application/json": components["schemas"]["WrappedError"];
3672
+ };
3673
+ };
3674
+ /** @description Insufficient permissions */
3675
+ 403: {
3676
+ headers: {
3677
+ [name: string]: unknown;
3678
+ };
3679
+ content: {
3680
+ "application/json": components["schemas"]["WrappedError"];
3681
+ };
3682
+ };
3683
+ /** @description Internal server error */
3684
+ 500: {
3685
+ headers: {
3686
+ [name: string]: unknown;
3687
+ };
3688
+ content: {
3689
+ "application/json": components["schemas"]["WrappedError"];
3690
+ };
3691
+ };
3692
+ };
3693
+ };
3694
+ createChatCompletion: {
3695
+ parameters: {
3696
+ query?: never;
3697
+ header?: never;
3698
+ path?: never;
3699
+ cookie?: never;
3700
+ };
3701
+ requestBody: {
3702
+ content: {
3703
+ /** @example {
3704
+ * "max_tokens": 100,
3705
+ * "messages": [
3706
+ * {
3707
+ * "content": "You are a helpful assistant.",
3708
+ * "role": "system"
3709
+ * },
3710
+ * {
3711
+ * "content": "Hello!",
3712
+ * "role": "user"
3713
+ * }
3714
+ * ],
3715
+ * "model": "llama2:chat",
3716
+ * "stream": false,
3717
+ * "temperature": 0.7
3718
+ * } */
3719
+ "application/json": components["schemas"]["CreateChatCompletionRequest"];
3720
+ };
3721
+ };
3722
+ responses: {
3723
+ /** @description Chat completion response */
3724
+ 200: {
3725
+ headers: {
3726
+ [name: string]: unknown;
3727
+ };
3728
+ content: {
3729
+ /** @example {
3730
+ * "choices": [
3731
+ * {
3732
+ * "finish_reason": "stop",
3733
+ * "index": 0,
3734
+ * "message": {
3735
+ * "content": "Hello! How can I help you today?",
3736
+ * "role": "assistant"
3737
+ * }
3738
+ * }
3739
+ * ],
3740
+ * "created": 1677610602,
3741
+ * "id": "chatcmpl-123",
3742
+ * "model": "llama2:chat",
3743
+ * "object": "chat.completion",
3744
+ * "usage": {
3745
+ * "completion_tokens": 10,
3746
+ * "prompt_tokens": 20,
3747
+ * "total_tokens": 30
3748
+ * }
3749
+ * } */
3750
+ "application/json": components["schemas"]["CreateChatCompletionResponse"];
3751
+ };
3752
+ };
3753
+ /** @description Chat completion stream, the status is 200, using 201 to avoid OpenAPI format limitation. */
3754
+ 201: {
3755
+ headers: {
3756
+ /** @description No-cache directive */
3757
+ "Cache-Control"?: string;
3758
+ [name: string]: unknown;
3759
+ };
3760
+ content: {
3761
+ /** @example {
3762
+ * "choices": [
3763
+ * {
3764
+ * "delta": {
3765
+ * "content": "Hello"
3766
+ * },
3767
+ * "finish_reason": null,
3768
+ * "index": 0
3769
+ * }
3770
+ * ],
3771
+ * "created": 1694268190,
3772
+ * "id": "chatcmpl-123",
3773
+ * "model": "llama2:chat",
3774
+ * "object": "chat.completion.chunk"
3775
+ * } */
3776
+ "text/event-stream": components["schemas"]["CreateChatCompletionStreamResponse"];
3777
+ };
3778
+ };
3779
+ /** @description Invalid request parameters */
3780
+ 400: {
3781
+ headers: {
3782
+ [name: string]: unknown;
3783
+ };
3784
+ content: {
3785
+ "application/json": components["schemas"]["WrappedError"];
3786
+ };
3787
+ };
3788
+ /** @description Not authenticated */
3789
+ 401: {
3790
+ headers: {
3791
+ [name: string]: unknown;
3792
+ };
3793
+ content: {
3794
+ "application/json": components["schemas"]["WrappedError"];
3795
+ };
3796
+ };
3797
+ /** @description Insufficient permissions */
3798
+ 403: {
3799
+ headers: {
3800
+ [name: string]: unknown;
3801
+ };
3802
+ content: {
3803
+ "application/json": components["schemas"]["WrappedError"];
3804
+ };
3805
+ };
3806
+ /** @description Internal server error */
3807
+ 500: {
3808
+ headers: {
3809
+ [name: string]: unknown;
3810
+ };
3811
+ content: {
3812
+ "application/json": components["schemas"]["WrappedError"];
3813
+ };
3814
+ };
3815
+ };
3816
+ };
3817
+ createEmbedding: {
3818
+ parameters: {
3819
+ query?: never;
3820
+ header?: never;
3821
+ path?: never;
3822
+ cookie?: never;
3823
+ };
3824
+ requestBody: {
3825
+ content: {
3826
+ /** @example {
3827
+ * "input": "The quick brown fox jumps over the lazy dog",
3828
+ * "model": "text-embedding-model"
3829
+ * } */
3830
+ "application/json": components["schemas"]["CreateEmbeddingRequest"];
3831
+ };
3832
+ };
3833
+ responses: {
3834
+ /** @description Embedding response */
3835
+ 200: {
3836
+ headers: {
3837
+ [name: string]: unknown;
3838
+ };
3839
+ content: {
3840
+ /** @example {
3841
+ * "data": [
3842
+ * {
3843
+ * "embedding": [
3844
+ * 0.1,
3845
+ * 0.2,
3846
+ * 0.3
3847
+ * ],
3848
+ * "index": 0,
3849
+ * "object": "embedding"
3850
+ * }
3851
+ * ],
3852
+ * "model": "text-embedding-model",
3853
+ * "object": "list",
3854
+ * "usage": {
3855
+ * "prompt_tokens": 8,
3856
+ * "total_tokens": 8
3857
+ * }
3858
+ * } */
3859
+ "application/json": components["schemas"]["CreateEmbeddingResponse"];
3860
+ };
3861
+ };
3862
+ /** @description Invalid request parameters */
3863
+ 400: {
3864
+ headers: {
3865
+ [name: string]: unknown;
3866
+ };
3867
+ content: {
3868
+ "application/json": components["schemas"]["WrappedError"];
3869
+ };
3870
+ };
3871
+ /** @description Not authenticated */
3872
+ 401: {
3873
+ headers: {
3874
+ [name: string]: unknown;
3875
+ };
3876
+ content: {
3877
+ "application/json": components["schemas"]["WrappedError"];
3878
+ };
3879
+ };
3880
+ /** @description Insufficient permissions */
3881
+ 403: {
3882
+ headers: {
3883
+ [name: string]: unknown;
3884
+ };
3885
+ content: {
3886
+ "application/json": components["schemas"]["WrappedError"];
3887
+ };
3888
+ };
3889
+ /** @description Internal server error */
3890
+ 500: {
3891
+ headers: {
3892
+ [name: string]: unknown;
3893
+ };
3894
+ content: {
3895
+ "application/json": components["schemas"]["WrappedError"];
3896
+ };
3897
+ };
3898
+ };
3899
+ };
3900
+ listModels: {
3901
+ parameters: {
3902
+ query?: never;
3903
+ header?: never;
3904
+ path?: never;
3905
+ cookie?: never;
3906
+ };
3907
+ requestBody?: never;
3908
+ responses: {
3909
+ /** @description List of available models */
3910
+ 200: {
3911
+ headers: {
3912
+ [name: string]: unknown;
3913
+ };
3914
+ content: {
3915
+ /** @example {
3916
+ * "data": [
3917
+ * {
3918
+ * "created": 1677610602,
3919
+ * "id": "llama2:chat",
3920
+ * "object": "model",
3921
+ * "owned_by": "bodhi"
3922
+ * },
3923
+ * {
3924
+ * "created": 1677610602,
3925
+ * "id": "mistral:instruct",
3926
+ * "object": "model",
3927
+ * "owned_by": "bodhi"
3928
+ * }
3929
+ * ],
3930
+ * "object": "list"
3931
+ * } */
3932
+ "application/json": components["schemas"]["ListModelResponse"];
3933
+ };
3934
+ };
3935
+ /** @description Invalid request parameters */
3936
+ 400: {
3937
+ headers: {
3938
+ [name: string]: unknown;
3939
+ };
3940
+ content: {
3941
+ "application/json": components["schemas"]["WrappedError"];
3942
+ };
3943
+ };
3944
+ /** @description Not authenticated */
3945
+ 401: {
3946
+ headers: {
3947
+ [name: string]: unknown;
3948
+ };
3949
+ content: {
3950
+ "application/json": components["schemas"]["WrappedError"];
3951
+ };
3952
+ };
3953
+ /** @description Insufficient permissions */
3954
+ 403: {
3955
+ headers: {
3956
+ [name: string]: unknown;
3957
+ };
3958
+ content: {
3959
+ "application/json": components["schemas"]["WrappedError"];
3960
+ };
3961
+ };
3962
+ /** @description Internal server error */
3963
+ 500: {
3964
+ headers: {
3965
+ [name: string]: unknown;
3966
+ };
3967
+ content: {
3968
+ "application/json": components["schemas"]["WrappedError"];
3969
+ };
3970
+ };
3971
+ };
3972
+ };
3973
+ getModel: {
3974
+ parameters: {
3975
+ query?: never;
3976
+ header?: never;
3977
+ path: {
3978
+ /**
3979
+ * @description Model identifier - can be user alias (e.g., 'llama2:chat'), model alias, or API provider alias
3980
+ * @example llama2:chat
3981
+ */
3982
+ id: string;
3983
+ };
3984
+ cookie?: never;
3985
+ };
3986
+ requestBody?: never;
3987
+ responses: {
3988
+ /** @description Model details */
3989
+ 200: {
3990
+ headers: {
3991
+ [name: string]: unknown;
3992
+ };
3993
+ content: {
3994
+ /** @example {
3995
+ * "created": 1677610602,
3996
+ * "id": "llama2:chat",
3997
+ * "object": "model",
3998
+ * "owned_by": "system"
3999
+ * } */
4000
+ "application/json": components["schemas"]["Model"];
4001
+ };
4002
+ };
4003
+ /** @description Invalid request parameters */
4004
+ 400: {
4005
+ headers: {
4006
+ [name: string]: unknown;
4007
+ };
4008
+ content: {
4009
+ "application/json": components["schemas"]["WrappedError"];
4010
+ };
4011
+ };
4012
+ /** @description Not authenticated */
4013
+ 401: {
4014
+ headers: {
4015
+ [name: string]: unknown;
4016
+ };
4017
+ content: {
4018
+ "application/json": components["schemas"]["WrappedError"];
4019
+ };
4020
+ };
4021
+ /** @description Insufficient permissions */
4022
+ 403: {
4023
+ headers: {
4024
+ [name: string]: unknown;
4025
+ };
4026
+ content: {
4027
+ "application/json": components["schemas"]["WrappedError"];
4028
+ };
4029
+ };
4030
+ /** @description Model not found */
4031
+ 404: {
4032
+ headers: {
4033
+ [name: string]: unknown;
4034
+ };
4035
+ content: {
4036
+ /** @example {
4037
+ * "error": {
4038
+ * "code": "model_not_found",
4039
+ * "message": "Model 'unknown:model' not found",
4040
+ * "type": "not_found_error"
4041
+ * }
4042
+ * } */
4043
+ "application/json": components["schemas"]["WrappedError"];
4044
+ };
4045
+ };
4046
+ /** @description Internal server error */
4047
+ 500: {
4048
+ headers: {
4049
+ [name: string]: unknown;
4050
+ };
4051
+ content: {
4052
+ "application/json": components["schemas"]["WrappedError"];
4053
+ };
4054
+ };
4055
+ };
4056
+ };
4057
+ createResponse: {
4058
+ parameters: {
4059
+ query?: never;
4060
+ header?: never;
4061
+ path?: never;
4062
+ cookie?: never;
4063
+ };
4064
+ requestBody: {
4065
+ content: {
4066
+ "application/json": components["schemas"]["CreateResponse"];
4067
+ };
4068
+ };
4069
+ responses: {
4070
+ /** @description Response created */
4071
+ 200: {
4072
+ headers: {
4073
+ [name: string]: unknown;
4074
+ };
4075
+ content: {
4076
+ "application/json": components["schemas"]["Response"];
4077
+ };
4078
+ };
4079
+ /** @description Response stream (actual status is 200, using 201 to avoid OpenAPI limitation). */
4080
+ 201: {
4081
+ headers: {
4082
+ [name: string]: unknown;
4083
+ };
4084
+ content: {
4085
+ "text/event-stream": unknown;
4086
+ };
4087
+ };
4088
+ /** @description Invalid request parameters */
4089
+ 400: {
4090
+ headers: {
4091
+ [name: string]: unknown;
4092
+ };
4093
+ content: {
4094
+ "application/json": components["schemas"]["WrappedError"];
4095
+ };
4096
+ };
4097
+ /** @description Not authenticated */
4098
+ 401: {
4099
+ headers: {
4100
+ [name: string]: unknown;
4101
+ };
4102
+ content: {
4103
+ "application/json": components["schemas"]["WrappedError"];
4104
+ };
4105
+ };
4106
+ /** @description Insufficient permissions */
4107
+ 403: {
4108
+ headers: {
4109
+ [name: string]: unknown;
4110
+ };
4111
+ content: {
4112
+ "application/json": components["schemas"]["WrappedError"];
4113
+ };
4114
+ };
4115
+ /** @description Internal server error */
4116
+ 500: {
4117
+ headers: {
4118
+ [name: string]: unknown;
4119
+ };
4120
+ content: {
4121
+ "application/json": components["schemas"]["WrappedError"];
4122
+ };
4123
+ };
4124
+ };
4125
+ };
4126
+ getResponse: {
4127
+ parameters: {
4128
+ query: {
4129
+ /** @description Model name for routing to the correct upstream provider */
4130
+ model: string;
4131
+ };
4132
+ header?: never;
4133
+ path: {
4134
+ /** @description The response ID */
4135
+ response_id: string;
4136
+ };
4137
+ cookie?: never;
4138
+ };
4139
+ requestBody?: never;
4140
+ responses: {
4141
+ /** @description Response retrieved */
4142
+ 200: {
4143
+ headers: {
4144
+ [name: string]: unknown;
4145
+ };
4146
+ content: {
4147
+ "application/json": components["schemas"]["Response"];
4148
+ };
4149
+ };
4150
+ /** @description Invalid request parameters */
4151
+ 400: {
4152
+ headers: {
4153
+ [name: string]: unknown;
4154
+ };
4155
+ content: {
4156
+ "application/json": components["schemas"]["WrappedError"];
4157
+ };
4158
+ };
4159
+ /** @description Not authenticated */
4160
+ 401: {
4161
+ headers: {
4162
+ [name: string]: unknown;
4163
+ };
4164
+ content: {
4165
+ "application/json": components["schemas"]["WrappedError"];
4166
+ };
4167
+ };
4168
+ /** @description Insufficient permissions */
4169
+ 403: {
4170
+ headers: {
4171
+ [name: string]: unknown;
4172
+ };
4173
+ content: {
4174
+ "application/json": components["schemas"]["WrappedError"];
4175
+ };
4176
+ };
4177
+ /** @description Internal server error */
4178
+ 500: {
4179
+ headers: {
4180
+ [name: string]: unknown;
4181
+ };
4182
+ content: {
4183
+ "application/json": components["schemas"]["WrappedError"];
4184
+ };
4185
+ };
4186
+ };
4187
+ };
4188
+ deleteResponse: {
4189
+ parameters: {
4190
+ query: {
4191
+ /** @description Model name for routing to the correct upstream provider */
4192
+ model: string;
4193
+ };
4194
+ header?: never;
4195
+ path: {
4196
+ /** @description The response ID */
4197
+ response_id: string;
4198
+ };
4199
+ cookie?: never;
4200
+ };
4201
+ requestBody?: never;
4202
+ responses: {
4203
+ /** @description Response deleted */
4204
+ 200: {
4205
+ headers: {
4206
+ [name: string]: unknown;
4207
+ };
4208
+ content: {
4209
+ "application/json": components["schemas"]["DeleteResponse"];
4210
+ };
4211
+ };
4212
+ /** @description Invalid request parameters */
4213
+ 400: {
4214
+ headers: {
4215
+ [name: string]: unknown;
4216
+ };
4217
+ content: {
4218
+ "application/json": components["schemas"]["WrappedError"];
4219
+ };
4220
+ };
4221
+ /** @description Not authenticated */
4222
+ 401: {
4223
+ headers: {
4224
+ [name: string]: unknown;
4225
+ };
4226
+ content: {
4227
+ "application/json": components["schemas"]["WrappedError"];
4228
+ };
4229
+ };
4230
+ /** @description Insufficient permissions */
4231
+ 403: {
4232
+ headers: {
4233
+ [name: string]: unknown;
4234
+ };
4235
+ content: {
4236
+ "application/json": components["schemas"]["WrappedError"];
4237
+ };
4238
+ };
4239
+ /** @description Internal server error */
4240
+ 500: {
4241
+ headers: {
4242
+ [name: string]: unknown;
4243
+ };
4244
+ content: {
4245
+ "application/json": components["schemas"]["WrappedError"];
4246
+ };
4247
+ };
4248
+ };
4249
+ };
4250
+ cancelResponse: {
4251
+ parameters: {
4252
+ query: {
4253
+ /** @description Model name for routing to the correct upstream provider */
4254
+ model: string;
4255
+ };
4256
+ header?: never;
4257
+ path: {
4258
+ /** @description The response ID */
4259
+ response_id: string;
4260
+ };
4261
+ cookie?: never;
4262
+ };
4263
+ requestBody?: never;
4264
+ responses: {
4265
+ /** @description Response cancelled */
4266
+ 200: {
4267
+ headers: {
4268
+ [name: string]: unknown;
4269
+ };
4270
+ content: {
4271
+ "application/json": components["schemas"]["Response"];
4272
+ };
4273
+ };
4274
+ /** @description Invalid request parameters */
4275
+ 400: {
4276
+ headers: {
4277
+ [name: string]: unknown;
4278
+ };
4279
+ content: {
4280
+ "application/json": components["schemas"]["WrappedError"];
4281
+ };
4282
+ };
4283
+ /** @description Not authenticated */
4284
+ 401: {
4285
+ headers: {
4286
+ [name: string]: unknown;
4287
+ };
4288
+ content: {
4289
+ "application/json": components["schemas"]["WrappedError"];
4290
+ };
4291
+ };
4292
+ /** @description Insufficient permissions */
4293
+ 403: {
4294
+ headers: {
4295
+ [name: string]: unknown;
4296
+ };
4297
+ content: {
4298
+ "application/json": components["schemas"]["WrappedError"];
4299
+ };
4300
+ };
4301
+ /** @description Internal server error */
4302
+ 500: {
4303
+ headers: {
4304
+ [name: string]: unknown;
4305
+ };
4306
+ content: {
4307
+ "application/json": components["schemas"]["WrappedError"];
4308
+ };
4309
+ };
4310
+ };
4311
+ };
4312
+ listResponseInputItems: {
4313
+ parameters: {
4314
+ query: {
4315
+ /** @description Model name for routing to the correct upstream provider */
4316
+ model: string;
4317
+ };
4318
+ header?: never;
4319
+ path: {
4320
+ /** @description The response ID */
4321
+ response_id: string;
4322
+ };
4323
+ cookie?: never;
4324
+ };
4325
+ requestBody?: never;
4326
+ responses: {
4327
+ /** @description Input items retrieved */
4328
+ 200: {
4329
+ headers: {
4330
+ [name: string]: unknown;
4331
+ };
4332
+ content?: never;
4333
+ };
4334
+ /** @description Invalid request parameters */
4335
+ 400: {
4336
+ headers: {
4337
+ [name: string]: unknown;
4338
+ };
4339
+ content: {
4340
+ "application/json": components["schemas"]["WrappedError"];
4341
+ };
4342
+ };
4343
+ /** @description Not authenticated */
4344
+ 401: {
4345
+ headers: {
4346
+ [name: string]: unknown;
4347
+ };
4348
+ content: {
4349
+ "application/json": components["schemas"]["WrappedError"];
4350
+ };
4351
+ };
4352
+ /** @description Insufficient permissions */
4353
+ 403: {
4354
+ headers: {
4355
+ [name: string]: unknown;
4356
+ };
4357
+ content: {
4358
+ "application/json": components["schemas"]["WrappedError"];
4359
+ };
4360
+ };
4361
+ /** @description Internal server error */
4362
+ 500: {
4363
+ headers: {
4364
+ [name: string]: unknown;
4365
+ };
4366
+ content: {
4367
+ "application/json": components["schemas"]["WrappedError"];
4368
+ };
4369
+ };
4370
+ };
4371
+ };
4372
+ }