@bodhiapp/ts-client 0.1.27 → 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.
- package/dist/anthropic.d.ts +1 -0
- package/dist/anthropic.js +20 -0
- package/dist/anthropic.mjs +2 -0
- package/dist/gemini.d.ts +1 -0
- package/dist/gemini.js +20 -0
- package/dist/gemini.mjs +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/openapi-typescript/openapi-schema-anthropic.d.ts +3391 -0
- package/dist/openapi-typescript/openapi-schema-anthropic.ts +3392 -0
- package/dist/openapi-typescript/openapi-schema-gemini.d.ts +3708 -0
- package/dist/openapi-typescript/openapi-schema-gemini.ts +3709 -0
- package/dist/openapi-typescript/openapi-schema.d.ts +139 -11
- package/dist/openapi-typescript/openapi-schema.ts +139 -11
- package/dist/types/types.gen.d.ts +166 -7
- package/dist/types/types.gen.ts +177 -7
- package/dist/types-anthropic/index.d.ts +1 -0
- package/dist/types-anthropic/index.ts +2 -0
- package/dist/types-anthropic/types.gen.d.ts +2241 -0
- package/dist/types-anthropic/types.gen.ts +2416 -0
- package/dist/types-gemini/index.d.ts +1 -0
- package/dist/types-gemini/index.ts +2 -0
- package/dist/types-gemini/types.gen.d.ts +4622 -0
- package/dist/types-gemini/types.gen.ts +4849 -0
- package/package.json +23 -7
|
@@ -0,0 +1,3392 @@
|
|
|
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
|
+
"/v1/messages": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
14
|
+
get?: never;
|
|
15
|
+
put?: never;
|
|
16
|
+
/**
|
|
17
|
+
* Create a Message
|
|
18
|
+
* @description Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.
|
|
19
|
+
*
|
|
20
|
+
* The Messages API can be used for either single queries or stateless multi-turn conversations.
|
|
21
|
+
*
|
|
22
|
+
* Learn more about the Messages API in our [user guide](https://docs.claude.com/en/docs/initial-setup)
|
|
23
|
+
*/
|
|
24
|
+
post: operations["messages_post"];
|
|
25
|
+
delete?: never;
|
|
26
|
+
options?: never;
|
|
27
|
+
head?: never;
|
|
28
|
+
patch?: never;
|
|
29
|
+
trace?: never;
|
|
30
|
+
};
|
|
31
|
+
"/v1/models": {
|
|
32
|
+
parameters: {
|
|
33
|
+
query?: never;
|
|
34
|
+
header?: never;
|
|
35
|
+
path?: never;
|
|
36
|
+
cookie?: never;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* List Models
|
|
40
|
+
* @description List available models.
|
|
41
|
+
*
|
|
42
|
+
* The Models API response can be used to determine which models are available for use in the API. More recently released models are listed first.
|
|
43
|
+
*/
|
|
44
|
+
get: operations["models_list"];
|
|
45
|
+
put?: never;
|
|
46
|
+
post?: never;
|
|
47
|
+
delete?: never;
|
|
48
|
+
options?: never;
|
|
49
|
+
head?: never;
|
|
50
|
+
patch?: never;
|
|
51
|
+
trace?: never;
|
|
52
|
+
};
|
|
53
|
+
"/v1/models/{model_id}": {
|
|
54
|
+
parameters: {
|
|
55
|
+
query?: never;
|
|
56
|
+
header?: never;
|
|
57
|
+
path?: never;
|
|
58
|
+
cookie?: never;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Get a Model
|
|
62
|
+
* @description Get a specific model.
|
|
63
|
+
*
|
|
64
|
+
* The Models API response can be used to determine information about a specific model or resolve a model alias to a model ID.
|
|
65
|
+
*/
|
|
66
|
+
get: operations["models_get"];
|
|
67
|
+
put?: never;
|
|
68
|
+
post?: never;
|
|
69
|
+
delete?: never;
|
|
70
|
+
options?: never;
|
|
71
|
+
head?: never;
|
|
72
|
+
patch?: never;
|
|
73
|
+
trace?: never;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export type webhooks = Record<string, never>;
|
|
77
|
+
export interface components {
|
|
78
|
+
schemas: {
|
|
79
|
+
/** APIError */
|
|
80
|
+
APIError: {
|
|
81
|
+
/**
|
|
82
|
+
* Message
|
|
83
|
+
* @default Internal server error
|
|
84
|
+
*/
|
|
85
|
+
message: string;
|
|
86
|
+
/**
|
|
87
|
+
* @description discriminator enum property added by openapi-typescript
|
|
88
|
+
* @enum {string}
|
|
89
|
+
*/
|
|
90
|
+
type: "api_error";
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* AllowedCaller
|
|
94
|
+
* @description Specifies who can invoke a tool.
|
|
95
|
+
*
|
|
96
|
+
* Values:
|
|
97
|
+
* direct: The model can call this tool directly.
|
|
98
|
+
* code_execution_20250825: The tool can be called from the code execution environment (v1).
|
|
99
|
+
* code_execution_20260120: The tool can be called from the code execution environment (v2 with persistence).
|
|
100
|
+
* @enum {string}
|
|
101
|
+
*/
|
|
102
|
+
AllowedCaller: "direct" | "code_execution_20250825" | "code_execution_20260120";
|
|
103
|
+
/** AuthenticationError */
|
|
104
|
+
AuthenticationError: {
|
|
105
|
+
/**
|
|
106
|
+
* Message
|
|
107
|
+
* @default Authentication error
|
|
108
|
+
*/
|
|
109
|
+
message: string;
|
|
110
|
+
/**
|
|
111
|
+
* @description discriminator enum property added by openapi-typescript
|
|
112
|
+
* @enum {string}
|
|
113
|
+
*/
|
|
114
|
+
type: "authentication_error";
|
|
115
|
+
};
|
|
116
|
+
/** Base64ImageSource */
|
|
117
|
+
Base64ImageSource: {
|
|
118
|
+
/**
|
|
119
|
+
* Data
|
|
120
|
+
* Format: byte
|
|
121
|
+
*/
|
|
122
|
+
data: string;
|
|
123
|
+
/**
|
|
124
|
+
* Media Type
|
|
125
|
+
* @enum {string}
|
|
126
|
+
*/
|
|
127
|
+
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
128
|
+
/**
|
|
129
|
+
* @description discriminator enum property added by openapi-typescript
|
|
130
|
+
* @enum {string}
|
|
131
|
+
*/
|
|
132
|
+
type: "base64";
|
|
133
|
+
};
|
|
134
|
+
/** Base64PDFSource */
|
|
135
|
+
Base64PDFSource: {
|
|
136
|
+
/**
|
|
137
|
+
* Data
|
|
138
|
+
* Format: byte
|
|
139
|
+
*/
|
|
140
|
+
data: string;
|
|
141
|
+
/**
|
|
142
|
+
* Media Type
|
|
143
|
+
* @constant
|
|
144
|
+
*/
|
|
145
|
+
media_type: "application/pdf";
|
|
146
|
+
/**
|
|
147
|
+
* @description discriminator enum property added by openapi-typescript
|
|
148
|
+
* @enum {string}
|
|
149
|
+
*/
|
|
150
|
+
type: "base64";
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* BashCodeExecutionToolResultErrorCode
|
|
154
|
+
* @enum {string}
|
|
155
|
+
*/
|
|
156
|
+
BashCodeExecutionToolResultErrorCode: "invalid_tool_input" | "unavailable" | "too_many_requests" | "execution_time_exceeded" | "output_file_too_large";
|
|
157
|
+
/** BashTool_20250124 */
|
|
158
|
+
BashTool_20250124: {
|
|
159
|
+
/** Allowed Callers */
|
|
160
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
161
|
+
/**
|
|
162
|
+
* Cache Control
|
|
163
|
+
* @description Create a cache control breakpoint at this content block.
|
|
164
|
+
*/
|
|
165
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
166
|
+
/**
|
|
167
|
+
* Defer Loading
|
|
168
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
169
|
+
*/
|
|
170
|
+
defer_loading?: boolean;
|
|
171
|
+
/** Input Examples */
|
|
172
|
+
input_examples?: {
|
|
173
|
+
[key: string]: components["schemas"]["JsonValue"];
|
|
174
|
+
}[];
|
|
175
|
+
/**
|
|
176
|
+
* Name
|
|
177
|
+
* @description Name of the tool.
|
|
178
|
+
*
|
|
179
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
180
|
+
* @constant
|
|
181
|
+
*/
|
|
182
|
+
name: "bash";
|
|
183
|
+
/**
|
|
184
|
+
* Strict
|
|
185
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
186
|
+
*/
|
|
187
|
+
strict?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Type
|
|
190
|
+
* @constant
|
|
191
|
+
*/
|
|
192
|
+
type: "bash_20250124";
|
|
193
|
+
};
|
|
194
|
+
/** BillingError */
|
|
195
|
+
BillingError: {
|
|
196
|
+
/**
|
|
197
|
+
* Message
|
|
198
|
+
* @default Billing error
|
|
199
|
+
*/
|
|
200
|
+
message: string;
|
|
201
|
+
/**
|
|
202
|
+
* @description discriminator enum property added by openapi-typescript
|
|
203
|
+
* @enum {string}
|
|
204
|
+
*/
|
|
205
|
+
type: "billing_error";
|
|
206
|
+
};
|
|
207
|
+
/** CacheControlEphemeral */
|
|
208
|
+
CacheControlEphemeral: {
|
|
209
|
+
/**
|
|
210
|
+
* Ttl
|
|
211
|
+
* @description The time-to-live for the cache control breakpoint.
|
|
212
|
+
*
|
|
213
|
+
* This may be one the following values:
|
|
214
|
+
* - `5m`: 5 minutes
|
|
215
|
+
* - `1h`: 1 hour
|
|
216
|
+
*
|
|
217
|
+
* Defaults to `5m`.
|
|
218
|
+
* @enum {string}
|
|
219
|
+
*/
|
|
220
|
+
ttl?: "5m" | "1h";
|
|
221
|
+
/**
|
|
222
|
+
* @description discriminator enum property added by openapi-typescript
|
|
223
|
+
* @enum {string}
|
|
224
|
+
*/
|
|
225
|
+
type: "ephemeral";
|
|
226
|
+
};
|
|
227
|
+
/** CacheCreation */
|
|
228
|
+
CacheCreation: {
|
|
229
|
+
/**
|
|
230
|
+
* Ephemeral 1H Input Tokens
|
|
231
|
+
* @description The number of input tokens used to create the 1 hour cache entry.
|
|
232
|
+
* @default 0
|
|
233
|
+
*/
|
|
234
|
+
ephemeral_1h_input_tokens: number;
|
|
235
|
+
/**
|
|
236
|
+
* Ephemeral 5M Input Tokens
|
|
237
|
+
* @description The number of input tokens used to create the 5 minute cache entry.
|
|
238
|
+
* @default 0
|
|
239
|
+
*/
|
|
240
|
+
ephemeral_5m_input_tokens: number;
|
|
241
|
+
};
|
|
242
|
+
/**
|
|
243
|
+
* CapabilitySupport
|
|
244
|
+
* @description Indicates whether a capability is supported.
|
|
245
|
+
*/
|
|
246
|
+
CapabilitySupport: {
|
|
247
|
+
/**
|
|
248
|
+
* Supported
|
|
249
|
+
* @description Whether this capability is supported by the model.
|
|
250
|
+
*/
|
|
251
|
+
supported: boolean;
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* CodeExecutionToolResultErrorCode
|
|
255
|
+
* @enum {string}
|
|
256
|
+
*/
|
|
257
|
+
CodeExecutionToolResultErrorCode: "invalid_tool_input" | "unavailable" | "too_many_requests" | "execution_time_exceeded";
|
|
258
|
+
/** CodeExecutionTool_20250522 */
|
|
259
|
+
CodeExecutionTool_20250522: {
|
|
260
|
+
/** Allowed Callers */
|
|
261
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
262
|
+
/**
|
|
263
|
+
* Cache Control
|
|
264
|
+
* @description Create a cache control breakpoint at this content block.
|
|
265
|
+
*/
|
|
266
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
267
|
+
/**
|
|
268
|
+
* Defer Loading
|
|
269
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
270
|
+
*/
|
|
271
|
+
defer_loading?: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* Name
|
|
274
|
+
* @description Name of the tool.
|
|
275
|
+
*
|
|
276
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
277
|
+
* @constant
|
|
278
|
+
*/
|
|
279
|
+
name: "code_execution";
|
|
280
|
+
/**
|
|
281
|
+
* Strict
|
|
282
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
283
|
+
*/
|
|
284
|
+
strict?: boolean;
|
|
285
|
+
/**
|
|
286
|
+
* Type
|
|
287
|
+
* @constant
|
|
288
|
+
*/
|
|
289
|
+
type: "code_execution_20250522";
|
|
290
|
+
};
|
|
291
|
+
/** CodeExecutionTool_20250825 */
|
|
292
|
+
CodeExecutionTool_20250825: {
|
|
293
|
+
/** Allowed Callers */
|
|
294
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
295
|
+
/**
|
|
296
|
+
* Cache Control
|
|
297
|
+
* @description Create a cache control breakpoint at this content block.
|
|
298
|
+
*/
|
|
299
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
300
|
+
/**
|
|
301
|
+
* Defer Loading
|
|
302
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
303
|
+
*/
|
|
304
|
+
defer_loading?: boolean;
|
|
305
|
+
/**
|
|
306
|
+
* Name
|
|
307
|
+
* @description Name of the tool.
|
|
308
|
+
*
|
|
309
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
310
|
+
* @constant
|
|
311
|
+
*/
|
|
312
|
+
name: "code_execution";
|
|
313
|
+
/**
|
|
314
|
+
* Strict
|
|
315
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
316
|
+
*/
|
|
317
|
+
strict?: boolean;
|
|
318
|
+
/**
|
|
319
|
+
* Type
|
|
320
|
+
* @constant
|
|
321
|
+
*/
|
|
322
|
+
type: "code_execution_20250825";
|
|
323
|
+
};
|
|
324
|
+
/**
|
|
325
|
+
* CodeExecutionTool_20260120
|
|
326
|
+
* @description Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
|
|
327
|
+
*/
|
|
328
|
+
CodeExecutionTool_20260120: {
|
|
329
|
+
/** Allowed Callers */
|
|
330
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
331
|
+
/**
|
|
332
|
+
* Cache Control
|
|
333
|
+
* @description Create a cache control breakpoint at this content block.
|
|
334
|
+
*/
|
|
335
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
336
|
+
/**
|
|
337
|
+
* Defer Loading
|
|
338
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
339
|
+
*/
|
|
340
|
+
defer_loading?: boolean;
|
|
341
|
+
/**
|
|
342
|
+
* Name
|
|
343
|
+
* @description Name of the tool.
|
|
344
|
+
*
|
|
345
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
346
|
+
* @constant
|
|
347
|
+
*/
|
|
348
|
+
name: "code_execution";
|
|
349
|
+
/**
|
|
350
|
+
* Strict
|
|
351
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
352
|
+
*/
|
|
353
|
+
strict?: boolean;
|
|
354
|
+
/**
|
|
355
|
+
* Type
|
|
356
|
+
* @constant
|
|
357
|
+
*/
|
|
358
|
+
type: "code_execution_20260120";
|
|
359
|
+
};
|
|
360
|
+
/**
|
|
361
|
+
* Container
|
|
362
|
+
* @description Information about the container used in the request (for the code execution tool)
|
|
363
|
+
*/
|
|
364
|
+
Container: {
|
|
365
|
+
/**
|
|
366
|
+
* Expires At
|
|
367
|
+
* Format: date-time
|
|
368
|
+
* @description The time at which the container will expire.
|
|
369
|
+
*/
|
|
370
|
+
expires_at: string;
|
|
371
|
+
/**
|
|
372
|
+
* Id
|
|
373
|
+
* @description Identifier for the container used in this request
|
|
374
|
+
*/
|
|
375
|
+
id: string;
|
|
376
|
+
};
|
|
377
|
+
/** ContentBlockSource */
|
|
378
|
+
ContentBlockSource: {
|
|
379
|
+
/** Content */
|
|
380
|
+
content: string | (components["schemas"]["RequestTextBlock"] | components["schemas"]["RequestImageBlock"])[];
|
|
381
|
+
/**
|
|
382
|
+
* @description discriminator enum property added by openapi-typescript
|
|
383
|
+
* @enum {string}
|
|
384
|
+
*/
|
|
385
|
+
type: "content";
|
|
386
|
+
};
|
|
387
|
+
/**
|
|
388
|
+
* ContextManagementCapability
|
|
389
|
+
* @description Context management capability details.
|
|
390
|
+
*/
|
|
391
|
+
ContextManagementCapability: {
|
|
392
|
+
/** @description Whether the clear_thinking_20251015 strategy is supported. */
|
|
393
|
+
clear_thinking_20251015: components["schemas"]["CapabilitySupport"] | null;
|
|
394
|
+
/** @description Whether the clear_tool_uses_20250919 strategy is supported. */
|
|
395
|
+
clear_tool_uses_20250919: components["schemas"]["CapabilitySupport"] | null;
|
|
396
|
+
/** @description Whether the compact_20260112 strategy is supported. */
|
|
397
|
+
compact_20260112: components["schemas"]["CapabilitySupport"] | null;
|
|
398
|
+
/**
|
|
399
|
+
* Supported
|
|
400
|
+
* @description Whether this capability is supported by the model.
|
|
401
|
+
*/
|
|
402
|
+
supported: boolean;
|
|
403
|
+
};
|
|
404
|
+
/**
|
|
405
|
+
* CreateMessageParams
|
|
406
|
+
* @example {
|
|
407
|
+
* "max_tokens": 1024,
|
|
408
|
+
* "messages": [
|
|
409
|
+
* {
|
|
410
|
+
* "content": "Hello, world",
|
|
411
|
+
* "role": "user"
|
|
412
|
+
* }
|
|
413
|
+
* ],
|
|
414
|
+
* "model": "claude-opus-4-6"
|
|
415
|
+
* }
|
|
416
|
+
*/
|
|
417
|
+
CreateMessageParams: {
|
|
418
|
+
model: components["schemas"]["Model"];
|
|
419
|
+
/**
|
|
420
|
+
* Messages
|
|
421
|
+
* @description Input messages.
|
|
422
|
+
*
|
|
423
|
+
* Our models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.
|
|
424
|
+
*
|
|
425
|
+
* Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.
|
|
426
|
+
*
|
|
427
|
+
* If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response.
|
|
428
|
+
*
|
|
429
|
+
* Example with a single `user` message:
|
|
430
|
+
*
|
|
431
|
+
* ```json
|
|
432
|
+
* [{"role": "user", "content": "Hello, Claude"}]
|
|
433
|
+
* ```
|
|
434
|
+
*
|
|
435
|
+
* Example with multiple conversational turns:
|
|
436
|
+
*
|
|
437
|
+
* ```json
|
|
438
|
+
* [
|
|
439
|
+
* {"role": "user", "content": "Hello there."},
|
|
440
|
+
* {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"},
|
|
441
|
+
* {"role": "user", "content": "Can you explain LLMs in plain English?"},
|
|
442
|
+
* ]
|
|
443
|
+
* ```
|
|
444
|
+
*
|
|
445
|
+
* Example with a partially-filled response from Claude:
|
|
446
|
+
*
|
|
447
|
+
* ```json
|
|
448
|
+
* [
|
|
449
|
+
* {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},
|
|
450
|
+
* {"role": "assistant", "content": "The best answer is ("},
|
|
451
|
+
* ]
|
|
452
|
+
* ```
|
|
453
|
+
*
|
|
454
|
+
* Each input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `"text"`. The following input messages are equivalent:
|
|
455
|
+
*
|
|
456
|
+
* ```json
|
|
457
|
+
* {"role": "user", "content": "Hello, Claude"}
|
|
458
|
+
* ```
|
|
459
|
+
*
|
|
460
|
+
* ```json
|
|
461
|
+
* {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
|
|
462
|
+
* ```
|
|
463
|
+
*
|
|
464
|
+
* See [input examples](https://docs.claude.com/en/api/messages-examples).
|
|
465
|
+
*
|
|
466
|
+
* Note that if you want to include a [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
|
|
467
|
+
*
|
|
468
|
+
* There is a limit of 100,000 messages in a single request.
|
|
469
|
+
*/
|
|
470
|
+
messages: components["schemas"]["InputMessage"][];
|
|
471
|
+
/**
|
|
472
|
+
* Cache Control
|
|
473
|
+
* @description Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.
|
|
474
|
+
*/
|
|
475
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
476
|
+
/**
|
|
477
|
+
* Container
|
|
478
|
+
* @description Container identifier for reuse across requests.
|
|
479
|
+
*/
|
|
480
|
+
container?: string | null;
|
|
481
|
+
/**
|
|
482
|
+
* Inference Geo
|
|
483
|
+
* @description Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used.
|
|
484
|
+
*/
|
|
485
|
+
inference_geo?: string | null;
|
|
486
|
+
/**
|
|
487
|
+
* Max Tokens
|
|
488
|
+
* @description The maximum number of tokens to generate before stopping.
|
|
489
|
+
*
|
|
490
|
+
* Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.
|
|
491
|
+
*
|
|
492
|
+
* Different models have different maximum values for this parameter. See [models](https://docs.claude.com/en/docs/models-overview) for details.
|
|
493
|
+
* @example 1024
|
|
494
|
+
*/
|
|
495
|
+
max_tokens: number;
|
|
496
|
+
/** @description An object describing metadata about the request. */
|
|
497
|
+
metadata?: components["schemas"]["Metadata"];
|
|
498
|
+
/** @description Configuration options for the model's output, such as the output format. */
|
|
499
|
+
output_config?: components["schemas"]["OutputConfig"];
|
|
500
|
+
/**
|
|
501
|
+
* Service Tier
|
|
502
|
+
* @description Determines whether to use priority capacity (if available) or standard capacity for this request.
|
|
503
|
+
*
|
|
504
|
+
* Anthropic offers different levels of service for your API requests. See [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
|
|
505
|
+
* @enum {string}
|
|
506
|
+
*/
|
|
507
|
+
service_tier?: "auto" | "standard_only";
|
|
508
|
+
/**
|
|
509
|
+
* Stop Sequences
|
|
510
|
+
* @description Custom text sequences that will cause the model to stop generating.
|
|
511
|
+
*
|
|
512
|
+
* Our models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `"end_turn"`.
|
|
513
|
+
*
|
|
514
|
+
* If you want the model to stop generating when it encounters custom strings of text, you can use the `stop_sequences` parameter. If the model encounters one of the custom sequences, the response `stop_reason` value will be `"stop_sequence"` and the response `stop_sequence` value will contain the matched stop sequence.
|
|
515
|
+
*/
|
|
516
|
+
stop_sequences?: string[];
|
|
517
|
+
/**
|
|
518
|
+
* Stream
|
|
519
|
+
* @description Whether to incrementally stream the response using server-sent events.
|
|
520
|
+
*
|
|
521
|
+
* See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
|
|
522
|
+
*/
|
|
523
|
+
stream?: boolean;
|
|
524
|
+
/**
|
|
525
|
+
* System
|
|
526
|
+
* @description System prompt.
|
|
527
|
+
*
|
|
528
|
+
* A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
|
529
|
+
* @example [
|
|
530
|
+
* {
|
|
531
|
+
* "text": "Today's date is 2024-06-01.",
|
|
532
|
+
* "type": "text"
|
|
533
|
+
* }
|
|
534
|
+
* ]
|
|
535
|
+
* @example Today's date is 2023-01-01.
|
|
536
|
+
*/
|
|
537
|
+
system?: string | components["schemas"]["RequestTextBlock"][];
|
|
538
|
+
/**
|
|
539
|
+
* Temperature
|
|
540
|
+
* @deprecated
|
|
541
|
+
* @description Amount of randomness injected into the response.
|
|
542
|
+
*
|
|
543
|
+
* Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks.
|
|
544
|
+
*
|
|
545
|
+
* Note that even with `temperature` of `0.0`, the results will not be fully deterministic.
|
|
546
|
+
* @example 1
|
|
547
|
+
*/
|
|
548
|
+
temperature?: number;
|
|
549
|
+
thinking?: components["schemas"]["ThinkingConfigParam"];
|
|
550
|
+
tool_choice?: components["schemas"]["ToolChoice"];
|
|
551
|
+
/**
|
|
552
|
+
* Tools
|
|
553
|
+
* @description Definitions of tools that the model may use.
|
|
554
|
+
*
|
|
555
|
+
* If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.
|
|
556
|
+
*
|
|
557
|
+
* There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview\#server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
|
558
|
+
*
|
|
559
|
+
* Each tool definition includes:
|
|
560
|
+
*
|
|
561
|
+
* * `name`: Name of the tool.
|
|
562
|
+
* * `description`: Optional, but strongly-recommended description of the tool.
|
|
563
|
+
* * `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.
|
|
564
|
+
*
|
|
565
|
+
* For example, if you defined `tools` as:
|
|
566
|
+
*
|
|
567
|
+
* ```json
|
|
568
|
+
* [
|
|
569
|
+
* {
|
|
570
|
+
* "name": "get_stock_price",
|
|
571
|
+
* "description": "Get the current stock price for a given ticker symbol.",
|
|
572
|
+
* "input_schema": {
|
|
573
|
+
* "type": "object",
|
|
574
|
+
* "properties": {
|
|
575
|
+
* "ticker": {
|
|
576
|
+
* "type": "string",
|
|
577
|
+
* "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
|
|
578
|
+
* }
|
|
579
|
+
* },
|
|
580
|
+
* "required": ["ticker"]
|
|
581
|
+
* }
|
|
582
|
+
* }
|
|
583
|
+
* ]
|
|
584
|
+
* ```
|
|
585
|
+
*
|
|
586
|
+
* And then asked the model "What's the S&P 500 at today?", the model might produce `tool_use` content blocks in the response like this:
|
|
587
|
+
*
|
|
588
|
+
* ```json
|
|
589
|
+
* [
|
|
590
|
+
* {
|
|
591
|
+
* "type": "tool_use",
|
|
592
|
+
* "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
|
|
593
|
+
* "name": "get_stock_price",
|
|
594
|
+
* "input": { "ticker": "^GSPC" }
|
|
595
|
+
* }
|
|
596
|
+
* ]
|
|
597
|
+
* ```
|
|
598
|
+
*
|
|
599
|
+
* You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an input, and return the following back to the model in a subsequent `user` message:
|
|
600
|
+
*
|
|
601
|
+
* ```json
|
|
602
|
+
* [
|
|
603
|
+
* {
|
|
604
|
+
* "type": "tool_result",
|
|
605
|
+
* "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
|
|
606
|
+
* "content": "259.75 USD"
|
|
607
|
+
* }
|
|
608
|
+
* ]
|
|
609
|
+
* ```
|
|
610
|
+
*
|
|
611
|
+
* Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.
|
|
612
|
+
*
|
|
613
|
+
* See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
614
|
+
* @example {
|
|
615
|
+
* "description": "Get the current weather in a given location",
|
|
616
|
+
* "input_schema": {
|
|
617
|
+
* "properties": {
|
|
618
|
+
* "location": {
|
|
619
|
+
* "description": "The city and state, e.g. San Francisco, CA",
|
|
620
|
+
* "type": "string"
|
|
621
|
+
* },
|
|
622
|
+
* "unit": {
|
|
623
|
+
* "description": "Unit for the output - one of (celsius, fahrenheit)",
|
|
624
|
+
* "type": "string"
|
|
625
|
+
* }
|
|
626
|
+
* },
|
|
627
|
+
* "required": [
|
|
628
|
+
* "location"
|
|
629
|
+
* ],
|
|
630
|
+
* "type": "object"
|
|
631
|
+
* },
|
|
632
|
+
* "name": "get_weather"
|
|
633
|
+
* }
|
|
634
|
+
*/
|
|
635
|
+
tools?: (components["schemas"]["Tool"] | components["schemas"]["BashTool_20250124"] | components["schemas"]["CodeExecutionTool_20250522"] | components["schemas"]["CodeExecutionTool_20250825"] | components["schemas"]["CodeExecutionTool_20260120"] | components["schemas"]["MemoryTool_20250818"] | components["schemas"]["TextEditor_20250124"] | components["schemas"]["TextEditor_20250429"] | components["schemas"]["TextEditor_20250728"] | components["schemas"]["WebSearchTool_20250305"] | components["schemas"]["WebFetchTool_20250910"] | components["schemas"]["WebSearchTool_20260209"] | components["schemas"]["WebFetchTool_20260209"] | components["schemas"]["WebFetchTool_20260309"] | components["schemas"]["ToolSearchToolBM25_20251119"] | components["schemas"]["ToolSearchToolRegex_20251119"])[];
|
|
636
|
+
/**
|
|
637
|
+
* Top K
|
|
638
|
+
* @deprecated
|
|
639
|
+
* @description Only sample from the top K options for each subsequent token.
|
|
640
|
+
*
|
|
641
|
+
* Used to remove "long tail" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
|
|
642
|
+
*
|
|
643
|
+
* Recommended for advanced use cases only. You usually only need to use `temperature`.
|
|
644
|
+
* @example 5
|
|
645
|
+
*/
|
|
646
|
+
top_k?: number;
|
|
647
|
+
/**
|
|
648
|
+
* Top P
|
|
649
|
+
* @deprecated
|
|
650
|
+
* @description Use nucleus sampling.
|
|
651
|
+
*
|
|
652
|
+
* In nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`. You should either alter `temperature` or `top_p`, but not both.
|
|
653
|
+
*
|
|
654
|
+
* Recommended for advanced use cases only. You usually only need to use `temperature`.
|
|
655
|
+
* @example 0.7
|
|
656
|
+
*/
|
|
657
|
+
top_p?: number;
|
|
658
|
+
};
|
|
659
|
+
/**
|
|
660
|
+
* DirectCaller
|
|
661
|
+
* @description Tool invocation directly from the model.
|
|
662
|
+
*/
|
|
663
|
+
DirectCaller: {
|
|
664
|
+
/**
|
|
665
|
+
* @description discriminator enum property added by openapi-typescript
|
|
666
|
+
* @enum {string}
|
|
667
|
+
*/
|
|
668
|
+
type: "direct";
|
|
669
|
+
};
|
|
670
|
+
/**
|
|
671
|
+
* EffortCapability
|
|
672
|
+
* @description Effort (reasoning_effort) capability details.
|
|
673
|
+
*/
|
|
674
|
+
EffortCapability: {
|
|
675
|
+
/** @description Whether the model supports high effort level. */
|
|
676
|
+
high: components["schemas"]["CapabilitySupport"];
|
|
677
|
+
/** @description Whether the model supports low effort level. */
|
|
678
|
+
low: components["schemas"]["CapabilitySupport"];
|
|
679
|
+
/** @description Whether the model supports max effort level. */
|
|
680
|
+
max: components["schemas"]["CapabilitySupport"];
|
|
681
|
+
/** @description Whether the model supports medium effort level. */
|
|
682
|
+
medium: components["schemas"]["CapabilitySupport"];
|
|
683
|
+
/**
|
|
684
|
+
* Supported
|
|
685
|
+
* @description Whether this capability is supported by the model.
|
|
686
|
+
*/
|
|
687
|
+
supported: boolean;
|
|
688
|
+
};
|
|
689
|
+
/**
|
|
690
|
+
* EffortLevel
|
|
691
|
+
* @description All possible effort levels.
|
|
692
|
+
* @enum {string}
|
|
693
|
+
*/
|
|
694
|
+
EffortLevel: "low" | "medium" | "high" | "max";
|
|
695
|
+
/** ErrorResponse */
|
|
696
|
+
ErrorResponse: {
|
|
697
|
+
/** Error */
|
|
698
|
+
error: components["schemas"]["InvalidRequestError"] | components["schemas"]["AuthenticationError"] | components["schemas"]["BillingError"] | components["schemas"]["PermissionError"] | components["schemas"]["NotFoundError"] | components["schemas"]["RateLimitError"] | components["schemas"]["GatewayTimeoutError"] | components["schemas"]["APIError"] | components["schemas"]["OverloadedError"];
|
|
699
|
+
/**
|
|
700
|
+
* Request Id
|
|
701
|
+
* @default null
|
|
702
|
+
*/
|
|
703
|
+
request_id: string | null;
|
|
704
|
+
/**
|
|
705
|
+
* Type
|
|
706
|
+
* @default error
|
|
707
|
+
* @constant
|
|
708
|
+
*/
|
|
709
|
+
type: "error";
|
|
710
|
+
};
|
|
711
|
+
/** GatewayTimeoutError */
|
|
712
|
+
GatewayTimeoutError: {
|
|
713
|
+
/**
|
|
714
|
+
* Message
|
|
715
|
+
* @default Request timeout
|
|
716
|
+
*/
|
|
717
|
+
message: string;
|
|
718
|
+
/**
|
|
719
|
+
* @description discriminator enum property added by openapi-typescript
|
|
720
|
+
* @enum {string}
|
|
721
|
+
*/
|
|
722
|
+
type: "timeout_error";
|
|
723
|
+
};
|
|
724
|
+
/** InputMessage */
|
|
725
|
+
InputMessage: {
|
|
726
|
+
/** Content */
|
|
727
|
+
content: string | components["schemas"]["InputContentBlock"][];
|
|
728
|
+
/**
|
|
729
|
+
* Role
|
|
730
|
+
* @enum {string}
|
|
731
|
+
*/
|
|
732
|
+
role: "user" | "assistant";
|
|
733
|
+
};
|
|
734
|
+
/** InputSchema */
|
|
735
|
+
InputSchema: {
|
|
736
|
+
/** Properties */
|
|
737
|
+
properties?: {
|
|
738
|
+
[key: string]: unknown;
|
|
739
|
+
} | null;
|
|
740
|
+
/** Required */
|
|
741
|
+
required?: string[] | null;
|
|
742
|
+
/**
|
|
743
|
+
* Type
|
|
744
|
+
* @constant
|
|
745
|
+
*/
|
|
746
|
+
type: "object";
|
|
747
|
+
} & {
|
|
748
|
+
[key: string]: unknown;
|
|
749
|
+
};
|
|
750
|
+
/** InvalidRequestError */
|
|
751
|
+
InvalidRequestError: {
|
|
752
|
+
/**
|
|
753
|
+
* Message
|
|
754
|
+
* @default Invalid request
|
|
755
|
+
*/
|
|
756
|
+
message: string;
|
|
757
|
+
/**
|
|
758
|
+
* @description discriminator enum property added by openapi-typescript
|
|
759
|
+
* @enum {string}
|
|
760
|
+
*/
|
|
761
|
+
type: "invalid_request_error";
|
|
762
|
+
};
|
|
763
|
+
/** JsonOutputFormat */
|
|
764
|
+
JsonOutputFormat: {
|
|
765
|
+
/**
|
|
766
|
+
* Schema
|
|
767
|
+
* @description The JSON schema of the format
|
|
768
|
+
*/
|
|
769
|
+
schema: {
|
|
770
|
+
[key: string]: unknown;
|
|
771
|
+
};
|
|
772
|
+
/**
|
|
773
|
+
* Type
|
|
774
|
+
* @constant
|
|
775
|
+
*/
|
|
776
|
+
type: "json_schema";
|
|
777
|
+
};
|
|
778
|
+
JsonValue: unknown;
|
|
779
|
+
/** ListResponse[ModelInfo] */
|
|
780
|
+
ListResponse_ModelInfo_: {
|
|
781
|
+
/** Data */
|
|
782
|
+
data: components["schemas"]["ModelInfo"][];
|
|
783
|
+
/**
|
|
784
|
+
* First Id
|
|
785
|
+
* @description First ID in the `data` list. Can be used as the `before_id` for the previous page.
|
|
786
|
+
*/
|
|
787
|
+
first_id: string | null;
|
|
788
|
+
/**
|
|
789
|
+
* Has More
|
|
790
|
+
* @description Indicates if there are more results in the requested page direction.
|
|
791
|
+
*/
|
|
792
|
+
has_more: boolean;
|
|
793
|
+
/**
|
|
794
|
+
* Last Id
|
|
795
|
+
* @description Last ID in the `data` list. Can be used as the `after_id` for the next page.
|
|
796
|
+
*/
|
|
797
|
+
last_id: string | null;
|
|
798
|
+
};
|
|
799
|
+
/** MemoryTool_20250818 */
|
|
800
|
+
MemoryTool_20250818: {
|
|
801
|
+
/** Allowed Callers */
|
|
802
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
803
|
+
/**
|
|
804
|
+
* Cache Control
|
|
805
|
+
* @description Create a cache control breakpoint at this content block.
|
|
806
|
+
*/
|
|
807
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
808
|
+
/**
|
|
809
|
+
* Defer Loading
|
|
810
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
811
|
+
*/
|
|
812
|
+
defer_loading?: boolean;
|
|
813
|
+
/** Input Examples */
|
|
814
|
+
input_examples?: {
|
|
815
|
+
[key: string]: components["schemas"]["JsonValue"];
|
|
816
|
+
}[];
|
|
817
|
+
/**
|
|
818
|
+
* Name
|
|
819
|
+
* @description Name of the tool.
|
|
820
|
+
*
|
|
821
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
822
|
+
* @constant
|
|
823
|
+
*/
|
|
824
|
+
name: "memory";
|
|
825
|
+
/**
|
|
826
|
+
* Strict
|
|
827
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
828
|
+
*/
|
|
829
|
+
strict?: boolean;
|
|
830
|
+
/**
|
|
831
|
+
* Type
|
|
832
|
+
* @constant
|
|
833
|
+
*/
|
|
834
|
+
type: "memory_20250818";
|
|
835
|
+
};
|
|
836
|
+
/**
|
|
837
|
+
* Message
|
|
838
|
+
* @example {
|
|
839
|
+
* "content": [
|
|
840
|
+
* {
|
|
841
|
+
* "citations": null,
|
|
842
|
+
* "text": "Hi! My name is Claude.",
|
|
843
|
+
* "type": "text"
|
|
844
|
+
* }
|
|
845
|
+
* ],
|
|
846
|
+
* "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF",
|
|
847
|
+
* "model": "claude-opus-4-6",
|
|
848
|
+
* "role": "assistant",
|
|
849
|
+
* "stop_details": null,
|
|
850
|
+
* "stop_reason": "end_turn",
|
|
851
|
+
* "stop_sequence": null,
|
|
852
|
+
* "type": "message",
|
|
853
|
+
* "usage": {
|
|
854
|
+
* "input_tokens": 2095,
|
|
855
|
+
* "output_tokens": 503
|
|
856
|
+
* }
|
|
857
|
+
* }
|
|
858
|
+
*/
|
|
859
|
+
Message: {
|
|
860
|
+
/**
|
|
861
|
+
* Id
|
|
862
|
+
* @description Unique object identifier.
|
|
863
|
+
*
|
|
864
|
+
* The format and length of IDs may change over time.
|
|
865
|
+
* @example msg_013Zva2CMHLNnXjNJJKqJ2EF
|
|
866
|
+
*/
|
|
867
|
+
id: string;
|
|
868
|
+
/**
|
|
869
|
+
* Type
|
|
870
|
+
* @description Object type.
|
|
871
|
+
*
|
|
872
|
+
* For Messages, this is always `"message"`.
|
|
873
|
+
* @default message
|
|
874
|
+
* @constant
|
|
875
|
+
*/
|
|
876
|
+
type: "message";
|
|
877
|
+
/**
|
|
878
|
+
* Role
|
|
879
|
+
* @description Conversational role of the generated message.
|
|
880
|
+
*
|
|
881
|
+
* This will always be `"assistant"`.
|
|
882
|
+
* @default assistant
|
|
883
|
+
* @constant
|
|
884
|
+
*/
|
|
885
|
+
role: "assistant";
|
|
886
|
+
/**
|
|
887
|
+
* Content
|
|
888
|
+
* @description Content generated by the model.
|
|
889
|
+
*
|
|
890
|
+
* This is an array of content blocks, each of which has a `type` that determines its shape.
|
|
891
|
+
*
|
|
892
|
+
* Example:
|
|
893
|
+
*
|
|
894
|
+
* ```json
|
|
895
|
+
* [{"type": "text", "text": "Hi, I'm Claude."}]
|
|
896
|
+
* ```
|
|
897
|
+
*
|
|
898
|
+
* If the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output.
|
|
899
|
+
*
|
|
900
|
+
* For example, if the input `messages` were:
|
|
901
|
+
* ```json
|
|
902
|
+
* [
|
|
903
|
+
* {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},
|
|
904
|
+
* {"role": "assistant", "content": "The best answer is ("}
|
|
905
|
+
* ]
|
|
906
|
+
* ```
|
|
907
|
+
*
|
|
908
|
+
* Then the response `content` might be:
|
|
909
|
+
*
|
|
910
|
+
* ```json
|
|
911
|
+
* [{"type": "text", "text": "B)"}]
|
|
912
|
+
* ```
|
|
913
|
+
* @example [
|
|
914
|
+
* {
|
|
915
|
+
* "citations": null,
|
|
916
|
+
* "text": "Hi! My name is Claude.",
|
|
917
|
+
* "type": "text"
|
|
918
|
+
* }
|
|
919
|
+
* ]
|
|
920
|
+
*/
|
|
921
|
+
content: components["schemas"]["ContentBlock"][];
|
|
922
|
+
model: components["schemas"]["Model"];
|
|
923
|
+
/**
|
|
924
|
+
* Stop Reason
|
|
925
|
+
* @description The reason that we stopped.
|
|
926
|
+
*
|
|
927
|
+
* This may be one the following values:
|
|
928
|
+
* * `"end_turn"`: the model reached a natural stopping point
|
|
929
|
+
* * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum
|
|
930
|
+
* * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated
|
|
931
|
+
* * `"tool_use"`: the model invoked one or more tools
|
|
932
|
+
* * `"pause_turn"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue.
|
|
933
|
+
* * `"refusal"`: when streaming classifiers intervene to handle potential policy violations
|
|
934
|
+
*
|
|
935
|
+
* In non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise.
|
|
936
|
+
*/
|
|
937
|
+
stop_reason: components["schemas"]["StopReason"] | null;
|
|
938
|
+
/**
|
|
939
|
+
* Stop Sequence
|
|
940
|
+
* @description Which custom stop sequence was generated, if any.
|
|
941
|
+
*
|
|
942
|
+
* This value will be a non-null string if one of your custom stop sequences was generated.
|
|
943
|
+
* @default null
|
|
944
|
+
*/
|
|
945
|
+
stop_sequence: string | null;
|
|
946
|
+
/**
|
|
947
|
+
* @description Structured information about why model output stopped.
|
|
948
|
+
*
|
|
949
|
+
* This is `null` when the `stop_reason` has no additional detail to report.
|
|
950
|
+
* @default null
|
|
951
|
+
*/
|
|
952
|
+
stop_details: components["schemas"]["RefusalStopDetails"] | null;
|
|
953
|
+
/**
|
|
954
|
+
* @description Billing and rate-limit usage.
|
|
955
|
+
*
|
|
956
|
+
* Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.
|
|
957
|
+
*
|
|
958
|
+
* Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.
|
|
959
|
+
*
|
|
960
|
+
* For example, `output_tokens` will be non-zero, even for an empty string response from Claude.
|
|
961
|
+
*
|
|
962
|
+
* Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.
|
|
963
|
+
* @example {
|
|
964
|
+
* "input_tokens": 2095,
|
|
965
|
+
* "output_tokens": 503
|
|
966
|
+
* }
|
|
967
|
+
*/
|
|
968
|
+
usage: components["schemas"]["Usage"];
|
|
969
|
+
/**
|
|
970
|
+
* @description Information about the container used in this request.
|
|
971
|
+
*
|
|
972
|
+
* This will be non-null if a container tool (e.g. code execution) was used.
|
|
973
|
+
* @default null
|
|
974
|
+
*/
|
|
975
|
+
container: components["schemas"]["Container"] | null;
|
|
976
|
+
};
|
|
977
|
+
/** Metadata */
|
|
978
|
+
Metadata: {
|
|
979
|
+
/**
|
|
980
|
+
* User Id
|
|
981
|
+
* @description An external identifier for the user who is associated with the request.
|
|
982
|
+
*
|
|
983
|
+
* This should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number.
|
|
984
|
+
* @example 13803d75-b4b5-4c3e-b2a2-6f21399b021b
|
|
985
|
+
*/
|
|
986
|
+
user_id?: string | null;
|
|
987
|
+
};
|
|
988
|
+
/**
|
|
989
|
+
* ModelCapabilities
|
|
990
|
+
* @description Model capability information.
|
|
991
|
+
*/
|
|
992
|
+
ModelCapabilities: {
|
|
993
|
+
/** @description Whether the model supports the Batch API. */
|
|
994
|
+
batch: components["schemas"]["CapabilitySupport"];
|
|
995
|
+
/** @description Whether the model supports citation generation. */
|
|
996
|
+
citations: components["schemas"]["CapabilitySupport"];
|
|
997
|
+
/** @description Whether the model supports code execution tools. */
|
|
998
|
+
code_execution: components["schemas"]["CapabilitySupport"];
|
|
999
|
+
/** @description Context management support and available strategies. */
|
|
1000
|
+
context_management: components["schemas"]["ContextManagementCapability"];
|
|
1001
|
+
/** @description Effort (reasoning_effort) support and available levels. */
|
|
1002
|
+
effort: components["schemas"]["EffortCapability"];
|
|
1003
|
+
/** @description Whether the model accepts image content blocks. */
|
|
1004
|
+
image_input: components["schemas"]["CapabilitySupport"];
|
|
1005
|
+
/** @description Whether the model accepts PDF content blocks. */
|
|
1006
|
+
pdf_input: components["schemas"]["CapabilitySupport"];
|
|
1007
|
+
/** @description Whether the model supports structured output / JSON mode / strict tool schemas. */
|
|
1008
|
+
structured_outputs: components["schemas"]["CapabilitySupport"];
|
|
1009
|
+
/** @description Thinking capability and supported type configurations. */
|
|
1010
|
+
thinking: components["schemas"]["ThinkingCapability"];
|
|
1011
|
+
};
|
|
1012
|
+
/** ModelInfo */
|
|
1013
|
+
ModelInfo: {
|
|
1014
|
+
/** @description Object mapping capability names to their support details. Keys are always present for all known capabilities. */
|
|
1015
|
+
capabilities: components["schemas"]["ModelCapabilities"] | null;
|
|
1016
|
+
/**
|
|
1017
|
+
* Created At
|
|
1018
|
+
* Format: date-time
|
|
1019
|
+
* @description RFC 3339 datetime string representing the time at which the model was released. May be set to an epoch value if the release date is unknown.
|
|
1020
|
+
* @example 2026-02-04T00:00:00Z
|
|
1021
|
+
*/
|
|
1022
|
+
created_at: string;
|
|
1023
|
+
/**
|
|
1024
|
+
* Display Name
|
|
1025
|
+
* @description A human-readable name for the model.
|
|
1026
|
+
* @example Claude Opus 4.6
|
|
1027
|
+
*/
|
|
1028
|
+
display_name: string;
|
|
1029
|
+
/**
|
|
1030
|
+
* Id
|
|
1031
|
+
* @description Unique model identifier.
|
|
1032
|
+
* @example claude-opus-4-6
|
|
1033
|
+
*/
|
|
1034
|
+
id: string;
|
|
1035
|
+
/**
|
|
1036
|
+
* Max Input Tokens
|
|
1037
|
+
* @description Maximum input context window size in tokens for this model.
|
|
1038
|
+
*/
|
|
1039
|
+
max_input_tokens: number | null;
|
|
1040
|
+
/**
|
|
1041
|
+
* Max Tokens
|
|
1042
|
+
* @description Maximum value for the `max_tokens` parameter when using this model.
|
|
1043
|
+
*/
|
|
1044
|
+
max_tokens: number | null;
|
|
1045
|
+
/**
|
|
1046
|
+
* Type
|
|
1047
|
+
* @description Object type.
|
|
1048
|
+
*
|
|
1049
|
+
* For Models, this is always `"model"`.
|
|
1050
|
+
* @default model
|
|
1051
|
+
* @constant
|
|
1052
|
+
*/
|
|
1053
|
+
type: "model";
|
|
1054
|
+
};
|
|
1055
|
+
/** NotFoundError */
|
|
1056
|
+
NotFoundError: {
|
|
1057
|
+
/**
|
|
1058
|
+
* Message
|
|
1059
|
+
* @default Not found
|
|
1060
|
+
*/
|
|
1061
|
+
message: string;
|
|
1062
|
+
/**
|
|
1063
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1064
|
+
* @enum {string}
|
|
1065
|
+
*/
|
|
1066
|
+
type: "not_found_error";
|
|
1067
|
+
};
|
|
1068
|
+
/** OutputConfig */
|
|
1069
|
+
OutputConfig: {
|
|
1070
|
+
/** @description How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer.
|
|
1071
|
+
*
|
|
1072
|
+
* Valid values are `low`, `medium`, `high`, or `max`. */
|
|
1073
|
+
effort?: components["schemas"]["EffortLevel"] | null;
|
|
1074
|
+
/** @description A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) */
|
|
1075
|
+
format?: components["schemas"]["JsonOutputFormat"] | null;
|
|
1076
|
+
};
|
|
1077
|
+
/** OverloadedError */
|
|
1078
|
+
OverloadedError: {
|
|
1079
|
+
/**
|
|
1080
|
+
* Message
|
|
1081
|
+
* @default Overloaded
|
|
1082
|
+
*/
|
|
1083
|
+
message: string;
|
|
1084
|
+
/**
|
|
1085
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1086
|
+
* @enum {string}
|
|
1087
|
+
*/
|
|
1088
|
+
type: "overloaded_error";
|
|
1089
|
+
};
|
|
1090
|
+
/** PermissionError */
|
|
1091
|
+
PermissionError: {
|
|
1092
|
+
/**
|
|
1093
|
+
* Message
|
|
1094
|
+
* @default Permission denied
|
|
1095
|
+
*/
|
|
1096
|
+
message: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1099
|
+
* @enum {string}
|
|
1100
|
+
*/
|
|
1101
|
+
type: "permission_error";
|
|
1102
|
+
};
|
|
1103
|
+
/** PlainTextSource */
|
|
1104
|
+
PlainTextSource: {
|
|
1105
|
+
/** Data */
|
|
1106
|
+
data: string;
|
|
1107
|
+
/**
|
|
1108
|
+
* Media Type
|
|
1109
|
+
* @constant
|
|
1110
|
+
*/
|
|
1111
|
+
media_type: "text/plain";
|
|
1112
|
+
/**
|
|
1113
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1114
|
+
* @enum {string}
|
|
1115
|
+
*/
|
|
1116
|
+
type: "text";
|
|
1117
|
+
};
|
|
1118
|
+
/** RateLimitError */
|
|
1119
|
+
RateLimitError: {
|
|
1120
|
+
/**
|
|
1121
|
+
* Message
|
|
1122
|
+
* @default Rate limited
|
|
1123
|
+
*/
|
|
1124
|
+
message: string;
|
|
1125
|
+
/**
|
|
1126
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1127
|
+
* @enum {string}
|
|
1128
|
+
*/
|
|
1129
|
+
type: "rate_limit_error";
|
|
1130
|
+
};
|
|
1131
|
+
/**
|
|
1132
|
+
* RefusalStopDetails
|
|
1133
|
+
* @description Structured information about a refusal.
|
|
1134
|
+
*/
|
|
1135
|
+
RefusalStopDetails: {
|
|
1136
|
+
/**
|
|
1137
|
+
* Category
|
|
1138
|
+
* @description The policy category that triggered the refusal.
|
|
1139
|
+
*
|
|
1140
|
+
* `null` when the refusal doesn't map to a named category.
|
|
1141
|
+
* @default null
|
|
1142
|
+
*/
|
|
1143
|
+
category: ("cyber" | "bio") | null;
|
|
1144
|
+
/**
|
|
1145
|
+
* Explanation
|
|
1146
|
+
* @description Human-readable explanation of the refusal.
|
|
1147
|
+
*
|
|
1148
|
+
* This text is not guaranteed to be stable. `null` when no explanation is available for the category.
|
|
1149
|
+
* @default null
|
|
1150
|
+
*/
|
|
1151
|
+
explanation: string | null;
|
|
1152
|
+
/**
|
|
1153
|
+
* Type
|
|
1154
|
+
* @default refusal
|
|
1155
|
+
* @constant
|
|
1156
|
+
*/
|
|
1157
|
+
type: "refusal";
|
|
1158
|
+
};
|
|
1159
|
+
/** RequestBashCodeExecutionOutputBlock */
|
|
1160
|
+
RequestBashCodeExecutionOutputBlock: {
|
|
1161
|
+
/** File Id */
|
|
1162
|
+
file_id: string;
|
|
1163
|
+
/**
|
|
1164
|
+
* Type
|
|
1165
|
+
* @constant
|
|
1166
|
+
*/
|
|
1167
|
+
type: "bash_code_execution_output";
|
|
1168
|
+
};
|
|
1169
|
+
/** RequestBashCodeExecutionResultBlock */
|
|
1170
|
+
RequestBashCodeExecutionResultBlock: {
|
|
1171
|
+
/** Content */
|
|
1172
|
+
content: components["schemas"]["RequestBashCodeExecutionOutputBlock"][];
|
|
1173
|
+
/** Return Code */
|
|
1174
|
+
return_code: number;
|
|
1175
|
+
/** Stderr */
|
|
1176
|
+
stderr: string;
|
|
1177
|
+
/** Stdout */
|
|
1178
|
+
stdout: string;
|
|
1179
|
+
/**
|
|
1180
|
+
* Type
|
|
1181
|
+
* @constant
|
|
1182
|
+
*/
|
|
1183
|
+
type: "bash_code_execution_result";
|
|
1184
|
+
};
|
|
1185
|
+
/** RequestBashCodeExecutionToolResultBlock */
|
|
1186
|
+
RequestBashCodeExecutionToolResultBlock: {
|
|
1187
|
+
/**
|
|
1188
|
+
* Cache Control
|
|
1189
|
+
* @description Create a cache control breakpoint at this content block.
|
|
1190
|
+
*/
|
|
1191
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
1192
|
+
/** Content */
|
|
1193
|
+
content: components["schemas"]["RequestBashCodeExecutionToolResultError"] | components["schemas"]["RequestBashCodeExecutionResultBlock"];
|
|
1194
|
+
/** Tool Use Id */
|
|
1195
|
+
tool_use_id: string;
|
|
1196
|
+
/**
|
|
1197
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1198
|
+
* @enum {string}
|
|
1199
|
+
*/
|
|
1200
|
+
type: "bash_code_execution_tool_result";
|
|
1201
|
+
};
|
|
1202
|
+
/** RequestBashCodeExecutionToolResultError */
|
|
1203
|
+
RequestBashCodeExecutionToolResultError: {
|
|
1204
|
+
error_code: components["schemas"]["BashCodeExecutionToolResultErrorCode"];
|
|
1205
|
+
/**
|
|
1206
|
+
* Type
|
|
1207
|
+
* @constant
|
|
1208
|
+
*/
|
|
1209
|
+
type: "bash_code_execution_tool_result_error";
|
|
1210
|
+
};
|
|
1211
|
+
/** RequestCharLocationCitation */
|
|
1212
|
+
RequestCharLocationCitation: {
|
|
1213
|
+
/** Cited Text */
|
|
1214
|
+
cited_text: string;
|
|
1215
|
+
/** Document Index */
|
|
1216
|
+
document_index: number;
|
|
1217
|
+
/** Document Title */
|
|
1218
|
+
document_title: string | null;
|
|
1219
|
+
/** End Char Index */
|
|
1220
|
+
end_char_index: number;
|
|
1221
|
+
/** Start Char Index */
|
|
1222
|
+
start_char_index: number;
|
|
1223
|
+
/**
|
|
1224
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1225
|
+
* @enum {string}
|
|
1226
|
+
*/
|
|
1227
|
+
type: "char_location";
|
|
1228
|
+
};
|
|
1229
|
+
/** RequestCitationsConfig */
|
|
1230
|
+
RequestCitationsConfig: {
|
|
1231
|
+
/** Enabled */
|
|
1232
|
+
enabled?: boolean;
|
|
1233
|
+
};
|
|
1234
|
+
/** RequestCodeExecutionOutputBlock */
|
|
1235
|
+
RequestCodeExecutionOutputBlock: {
|
|
1236
|
+
/** File Id */
|
|
1237
|
+
file_id: string;
|
|
1238
|
+
/**
|
|
1239
|
+
* Type
|
|
1240
|
+
* @constant
|
|
1241
|
+
*/
|
|
1242
|
+
type: "code_execution_output";
|
|
1243
|
+
};
|
|
1244
|
+
/** RequestCodeExecutionResultBlock */
|
|
1245
|
+
RequestCodeExecutionResultBlock: {
|
|
1246
|
+
/** Content */
|
|
1247
|
+
content: components["schemas"]["RequestCodeExecutionOutputBlock"][];
|
|
1248
|
+
/** Return Code */
|
|
1249
|
+
return_code: number;
|
|
1250
|
+
/** Stderr */
|
|
1251
|
+
stderr: string;
|
|
1252
|
+
/** Stdout */
|
|
1253
|
+
stdout: string;
|
|
1254
|
+
/**
|
|
1255
|
+
* Type
|
|
1256
|
+
* @constant
|
|
1257
|
+
*/
|
|
1258
|
+
type: "code_execution_result";
|
|
1259
|
+
};
|
|
1260
|
+
/** RequestCodeExecutionToolResultBlock */
|
|
1261
|
+
RequestCodeExecutionToolResultBlock: {
|
|
1262
|
+
/**
|
|
1263
|
+
* Cache Control
|
|
1264
|
+
* @description Create a cache control breakpoint at this content block.
|
|
1265
|
+
*/
|
|
1266
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
1267
|
+
/** Content */
|
|
1268
|
+
content: components["schemas"]["RequestCodeExecutionToolResultError"] | components["schemas"]["RequestCodeExecutionResultBlock"] | components["schemas"]["RequestEncryptedCodeExecutionResultBlock"];
|
|
1269
|
+
/** Tool Use Id */
|
|
1270
|
+
tool_use_id: string;
|
|
1271
|
+
/**
|
|
1272
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1273
|
+
* @enum {string}
|
|
1274
|
+
*/
|
|
1275
|
+
type: "code_execution_tool_result";
|
|
1276
|
+
};
|
|
1277
|
+
/** RequestCodeExecutionToolResultError */
|
|
1278
|
+
RequestCodeExecutionToolResultError: {
|
|
1279
|
+
error_code: components["schemas"]["CodeExecutionToolResultErrorCode"];
|
|
1280
|
+
/**
|
|
1281
|
+
* Type
|
|
1282
|
+
* @constant
|
|
1283
|
+
*/
|
|
1284
|
+
type: "code_execution_tool_result_error";
|
|
1285
|
+
};
|
|
1286
|
+
/**
|
|
1287
|
+
* RequestContainerUploadBlock
|
|
1288
|
+
* @description A content block that represents a file to be uploaded to the container
|
|
1289
|
+
* Files uploaded via this block will be available in the container's input directory.
|
|
1290
|
+
*/
|
|
1291
|
+
RequestContainerUploadBlock: {
|
|
1292
|
+
/**
|
|
1293
|
+
* Cache Control
|
|
1294
|
+
* @description Create a cache control breakpoint at this content block.
|
|
1295
|
+
*/
|
|
1296
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
1297
|
+
/** File Id */
|
|
1298
|
+
file_id: string;
|
|
1299
|
+
/**
|
|
1300
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1301
|
+
* @enum {string}
|
|
1302
|
+
*/
|
|
1303
|
+
type: "container_upload";
|
|
1304
|
+
};
|
|
1305
|
+
/** RequestContentBlockLocationCitation */
|
|
1306
|
+
RequestContentBlockLocationCitation: {
|
|
1307
|
+
/** Cited Text */
|
|
1308
|
+
cited_text: string;
|
|
1309
|
+
/** Document Index */
|
|
1310
|
+
document_index: number;
|
|
1311
|
+
/** Document Title */
|
|
1312
|
+
document_title: string | null;
|
|
1313
|
+
/** End Block Index */
|
|
1314
|
+
end_block_index: number;
|
|
1315
|
+
/** Start Block Index */
|
|
1316
|
+
start_block_index: number;
|
|
1317
|
+
/**
|
|
1318
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1319
|
+
* @enum {string}
|
|
1320
|
+
*/
|
|
1321
|
+
type: "content_block_location";
|
|
1322
|
+
};
|
|
1323
|
+
/** RequestDocumentBlock */
|
|
1324
|
+
RequestDocumentBlock: {
|
|
1325
|
+
/**
|
|
1326
|
+
* Cache Control
|
|
1327
|
+
* @description Create a cache control breakpoint at this content block.
|
|
1328
|
+
*/
|
|
1329
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
1330
|
+
citations?: components["schemas"]["RequestCitationsConfig"] | null;
|
|
1331
|
+
/** Context */
|
|
1332
|
+
context?: string | null;
|
|
1333
|
+
/** Source */
|
|
1334
|
+
source: components["schemas"]["Base64PDFSource"] | components["schemas"]["PlainTextSource"] | components["schemas"]["ContentBlockSource"] | components["schemas"]["URLPDFSource"];
|
|
1335
|
+
/** Title */
|
|
1336
|
+
title?: string | null;
|
|
1337
|
+
/**
|
|
1338
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1339
|
+
* @enum {string}
|
|
1340
|
+
*/
|
|
1341
|
+
type: "document";
|
|
1342
|
+
};
|
|
1343
|
+
/**
|
|
1344
|
+
* RequestEncryptedCodeExecutionResultBlock
|
|
1345
|
+
* @description Code execution result with encrypted stdout for PFC + web_search results.
|
|
1346
|
+
*/
|
|
1347
|
+
RequestEncryptedCodeExecutionResultBlock: {
|
|
1348
|
+
/** Content */
|
|
1349
|
+
content: components["schemas"]["RequestCodeExecutionOutputBlock"][];
|
|
1350
|
+
/** Encrypted Stdout */
|
|
1351
|
+
encrypted_stdout: string;
|
|
1352
|
+
/** Return Code */
|
|
1353
|
+
return_code: number;
|
|
1354
|
+
/** Stderr */
|
|
1355
|
+
stderr: string;
|
|
1356
|
+
/**
|
|
1357
|
+
* Type
|
|
1358
|
+
* @constant
|
|
1359
|
+
*/
|
|
1360
|
+
type: "encrypted_code_execution_result";
|
|
1361
|
+
};
|
|
1362
|
+
/** RequestImageBlock */
|
|
1363
|
+
RequestImageBlock: {
|
|
1364
|
+
/**
|
|
1365
|
+
* Cache Control
|
|
1366
|
+
* @description Create a cache control breakpoint at this content block.
|
|
1367
|
+
*/
|
|
1368
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
1369
|
+
/** Source */
|
|
1370
|
+
source: components["schemas"]["Base64ImageSource"] | components["schemas"]["URLImageSource"];
|
|
1371
|
+
/**
|
|
1372
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1373
|
+
* @enum {string}
|
|
1374
|
+
*/
|
|
1375
|
+
type: "image";
|
|
1376
|
+
};
|
|
1377
|
+
/** RequestPageLocationCitation */
|
|
1378
|
+
RequestPageLocationCitation: {
|
|
1379
|
+
/** Cited Text */
|
|
1380
|
+
cited_text: string;
|
|
1381
|
+
/** Document Index */
|
|
1382
|
+
document_index: number;
|
|
1383
|
+
/** Document Title */
|
|
1384
|
+
document_title: string | null;
|
|
1385
|
+
/** End Page Number */
|
|
1386
|
+
end_page_number: number;
|
|
1387
|
+
/** Start Page Number */
|
|
1388
|
+
start_page_number: number;
|
|
1389
|
+
/**
|
|
1390
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1391
|
+
* @enum {string}
|
|
1392
|
+
*/
|
|
1393
|
+
type: "page_location";
|
|
1394
|
+
};
|
|
1395
|
+
/** RequestRedactedThinkingBlock */
|
|
1396
|
+
RequestRedactedThinkingBlock: {
|
|
1397
|
+
/** Data */
|
|
1398
|
+
data: string;
|
|
1399
|
+
/**
|
|
1400
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1401
|
+
* @enum {string}
|
|
1402
|
+
*/
|
|
1403
|
+
type: "redacted_thinking";
|
|
1404
|
+
};
|
|
1405
|
+
/** RequestSearchResultBlock */
|
|
1406
|
+
RequestSearchResultBlock: {
|
|
1407
|
+
/**
|
|
1408
|
+
* Cache Control
|
|
1409
|
+
* @description Create a cache control breakpoint at this content block.
|
|
1410
|
+
*/
|
|
1411
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
1412
|
+
citations?: components["schemas"]["RequestCitationsConfig"];
|
|
1413
|
+
/** Content */
|
|
1414
|
+
content: components["schemas"]["RequestTextBlock"][];
|
|
1415
|
+
/** Source */
|
|
1416
|
+
source: string;
|
|
1417
|
+
/** Title */
|
|
1418
|
+
title: string;
|
|
1419
|
+
/**
|
|
1420
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1421
|
+
* @enum {string}
|
|
1422
|
+
*/
|
|
1423
|
+
type: "search_result";
|
|
1424
|
+
};
|
|
1425
|
+
/** RequestSearchResultLocationCitation */
|
|
1426
|
+
RequestSearchResultLocationCitation: {
|
|
1427
|
+
/** Cited Text */
|
|
1428
|
+
cited_text: string;
|
|
1429
|
+
/** End Block Index */
|
|
1430
|
+
end_block_index: number;
|
|
1431
|
+
/** Search Result Index */
|
|
1432
|
+
search_result_index: number;
|
|
1433
|
+
/** Source */
|
|
1434
|
+
source: string;
|
|
1435
|
+
/** Start Block Index */
|
|
1436
|
+
start_block_index: number;
|
|
1437
|
+
/** Title */
|
|
1438
|
+
title: string | null;
|
|
1439
|
+
/**
|
|
1440
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1441
|
+
* @enum {string}
|
|
1442
|
+
*/
|
|
1443
|
+
type: "search_result_location";
|
|
1444
|
+
};
|
|
1445
|
+
/** RequestServerToolUseBlock */
|
|
1446
|
+
RequestServerToolUseBlock: {
|
|
1447
|
+
/**
|
|
1448
|
+
* Cache Control
|
|
1449
|
+
* @description Create a cache control breakpoint at this content block.
|
|
1450
|
+
*/
|
|
1451
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
1452
|
+
/** Caller */
|
|
1453
|
+
caller?: components["schemas"]["DirectCaller"] | components["schemas"]["ServerToolCaller"] | components["schemas"]["ServerToolCaller_20260120"];
|
|
1454
|
+
/** Id */
|
|
1455
|
+
id: string;
|
|
1456
|
+
/** Input */
|
|
1457
|
+
input: {
|
|
1458
|
+
[key: string]: unknown;
|
|
1459
|
+
};
|
|
1460
|
+
/**
|
|
1461
|
+
* Name
|
|
1462
|
+
* @enum {string}
|
|
1463
|
+
*/
|
|
1464
|
+
name: "web_search" | "web_fetch" | "code_execution" | "bash_code_execution" | "text_editor_code_execution" | "tool_search_tool_regex" | "tool_search_tool_bm25";
|
|
1465
|
+
/**
|
|
1466
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1467
|
+
* @enum {string}
|
|
1468
|
+
*/
|
|
1469
|
+
type: "server_tool_use";
|
|
1470
|
+
};
|
|
1471
|
+
/** RequestTextBlock */
|
|
1472
|
+
RequestTextBlock: {
|
|
1473
|
+
/**
|
|
1474
|
+
* Cache Control
|
|
1475
|
+
* @description Create a cache control breakpoint at this content block.
|
|
1476
|
+
*/
|
|
1477
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
1478
|
+
/** Citations */
|
|
1479
|
+
citations?: (components["schemas"]["RequestCharLocationCitation"] | components["schemas"]["RequestPageLocationCitation"] | components["schemas"]["RequestContentBlockLocationCitation"] | components["schemas"]["RequestWebSearchResultLocationCitation"] | components["schemas"]["RequestSearchResultLocationCitation"])[] | null;
|
|
1480
|
+
/** Text */
|
|
1481
|
+
text: string;
|
|
1482
|
+
/**
|
|
1483
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1484
|
+
* @enum {string}
|
|
1485
|
+
*/
|
|
1486
|
+
type: "text";
|
|
1487
|
+
};
|
|
1488
|
+
/** RequestTextEditorCodeExecutionCreateResultBlock */
|
|
1489
|
+
RequestTextEditorCodeExecutionCreateResultBlock: {
|
|
1490
|
+
/** Is File Update */
|
|
1491
|
+
is_file_update: boolean;
|
|
1492
|
+
/**
|
|
1493
|
+
* Type
|
|
1494
|
+
* @constant
|
|
1495
|
+
*/
|
|
1496
|
+
type: "text_editor_code_execution_create_result";
|
|
1497
|
+
};
|
|
1498
|
+
/** RequestTextEditorCodeExecutionStrReplaceResultBlock */
|
|
1499
|
+
RequestTextEditorCodeExecutionStrReplaceResultBlock: {
|
|
1500
|
+
/** Lines */
|
|
1501
|
+
lines?: string[] | null;
|
|
1502
|
+
/** New Lines */
|
|
1503
|
+
new_lines?: number | null;
|
|
1504
|
+
/** New Start */
|
|
1505
|
+
new_start?: number | null;
|
|
1506
|
+
/** Old Lines */
|
|
1507
|
+
old_lines?: number | null;
|
|
1508
|
+
/** Old Start */
|
|
1509
|
+
old_start?: number | null;
|
|
1510
|
+
/**
|
|
1511
|
+
* Type
|
|
1512
|
+
* @constant
|
|
1513
|
+
*/
|
|
1514
|
+
type: "text_editor_code_execution_str_replace_result";
|
|
1515
|
+
};
|
|
1516
|
+
/** RequestTextEditorCodeExecutionToolResultBlock */
|
|
1517
|
+
RequestTextEditorCodeExecutionToolResultBlock: {
|
|
1518
|
+
/**
|
|
1519
|
+
* Cache Control
|
|
1520
|
+
* @description Create a cache control breakpoint at this content block.
|
|
1521
|
+
*/
|
|
1522
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
1523
|
+
/** Content */
|
|
1524
|
+
content: components["schemas"]["RequestTextEditorCodeExecutionToolResultError"] | components["schemas"]["RequestTextEditorCodeExecutionViewResultBlock"] | components["schemas"]["RequestTextEditorCodeExecutionCreateResultBlock"] | components["schemas"]["RequestTextEditorCodeExecutionStrReplaceResultBlock"];
|
|
1525
|
+
/** Tool Use Id */
|
|
1526
|
+
tool_use_id: string;
|
|
1527
|
+
/**
|
|
1528
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1529
|
+
* @enum {string}
|
|
1530
|
+
*/
|
|
1531
|
+
type: "text_editor_code_execution_tool_result";
|
|
1532
|
+
};
|
|
1533
|
+
/** RequestTextEditorCodeExecutionToolResultError */
|
|
1534
|
+
RequestTextEditorCodeExecutionToolResultError: {
|
|
1535
|
+
error_code: components["schemas"]["TextEditorCodeExecutionToolResultErrorCode"];
|
|
1536
|
+
/** Error Message */
|
|
1537
|
+
error_message?: string | null;
|
|
1538
|
+
/**
|
|
1539
|
+
* Type
|
|
1540
|
+
* @constant
|
|
1541
|
+
*/
|
|
1542
|
+
type: "text_editor_code_execution_tool_result_error";
|
|
1543
|
+
};
|
|
1544
|
+
/** RequestTextEditorCodeExecutionViewResultBlock */
|
|
1545
|
+
RequestTextEditorCodeExecutionViewResultBlock: {
|
|
1546
|
+
/** Content */
|
|
1547
|
+
content: string;
|
|
1548
|
+
/**
|
|
1549
|
+
* File Type
|
|
1550
|
+
* @enum {string}
|
|
1551
|
+
*/
|
|
1552
|
+
file_type: "text" | "image" | "pdf";
|
|
1553
|
+
/** Num Lines */
|
|
1554
|
+
num_lines?: number | null;
|
|
1555
|
+
/** Start Line */
|
|
1556
|
+
start_line?: number | null;
|
|
1557
|
+
/** Total Lines */
|
|
1558
|
+
total_lines?: number | null;
|
|
1559
|
+
/**
|
|
1560
|
+
* Type
|
|
1561
|
+
* @constant
|
|
1562
|
+
*/
|
|
1563
|
+
type: "text_editor_code_execution_view_result";
|
|
1564
|
+
};
|
|
1565
|
+
/** RequestThinkingBlock */
|
|
1566
|
+
RequestThinkingBlock: {
|
|
1567
|
+
/** Signature */
|
|
1568
|
+
signature: string;
|
|
1569
|
+
/** Thinking */
|
|
1570
|
+
thinking: string;
|
|
1571
|
+
/**
|
|
1572
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1573
|
+
* @enum {string}
|
|
1574
|
+
*/
|
|
1575
|
+
type: "thinking";
|
|
1576
|
+
};
|
|
1577
|
+
/**
|
|
1578
|
+
* RequestToolReferenceBlock
|
|
1579
|
+
* @description Tool reference block that can be included in tool_result content.
|
|
1580
|
+
*/
|
|
1581
|
+
RequestToolReferenceBlock: {
|
|
1582
|
+
/**
|
|
1583
|
+
* Cache Control
|
|
1584
|
+
* @description Create a cache control breakpoint at this content block.
|
|
1585
|
+
*/
|
|
1586
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
1587
|
+
/** Tool Name */
|
|
1588
|
+
tool_name: string;
|
|
1589
|
+
/**
|
|
1590
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1591
|
+
* @enum {string}
|
|
1592
|
+
*/
|
|
1593
|
+
type: "tool_reference";
|
|
1594
|
+
};
|
|
1595
|
+
/** RequestToolResultBlock */
|
|
1596
|
+
RequestToolResultBlock: {
|
|
1597
|
+
/**
|
|
1598
|
+
* Cache Control
|
|
1599
|
+
* @description Create a cache control breakpoint at this content block.
|
|
1600
|
+
*/
|
|
1601
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
1602
|
+
/** Content */
|
|
1603
|
+
content?: string | (components["schemas"]["RequestTextBlock"] | components["schemas"]["RequestImageBlock"] | components["schemas"]["RequestSearchResultBlock"] | components["schemas"]["RequestDocumentBlock"] | components["schemas"]["RequestToolReferenceBlock"])[];
|
|
1604
|
+
/** Is Error */
|
|
1605
|
+
is_error?: boolean;
|
|
1606
|
+
/** Tool Use Id */
|
|
1607
|
+
tool_use_id: string;
|
|
1608
|
+
/**
|
|
1609
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1610
|
+
* @enum {string}
|
|
1611
|
+
*/
|
|
1612
|
+
type: "tool_result";
|
|
1613
|
+
};
|
|
1614
|
+
/** RequestToolSearchToolResultBlock */
|
|
1615
|
+
RequestToolSearchToolResultBlock: {
|
|
1616
|
+
/**
|
|
1617
|
+
* Cache Control
|
|
1618
|
+
* @description Create a cache control breakpoint at this content block.
|
|
1619
|
+
*/
|
|
1620
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
1621
|
+
/** Content */
|
|
1622
|
+
content: components["schemas"]["RequestToolSearchToolResultError"] | components["schemas"]["RequestToolSearchToolSearchResultBlock"];
|
|
1623
|
+
/** Tool Use Id */
|
|
1624
|
+
tool_use_id: string;
|
|
1625
|
+
/**
|
|
1626
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1627
|
+
* @enum {string}
|
|
1628
|
+
*/
|
|
1629
|
+
type: "tool_search_tool_result";
|
|
1630
|
+
};
|
|
1631
|
+
/** RequestToolSearchToolResultError */
|
|
1632
|
+
RequestToolSearchToolResultError: {
|
|
1633
|
+
error_code: components["schemas"]["ToolSearchToolResultErrorCode"];
|
|
1634
|
+
/**
|
|
1635
|
+
* Type
|
|
1636
|
+
* @constant
|
|
1637
|
+
*/
|
|
1638
|
+
type: "tool_search_tool_result_error";
|
|
1639
|
+
};
|
|
1640
|
+
/** RequestToolSearchToolSearchResultBlock */
|
|
1641
|
+
RequestToolSearchToolSearchResultBlock: {
|
|
1642
|
+
/** Tool References */
|
|
1643
|
+
tool_references: components["schemas"]["RequestToolReferenceBlock"][];
|
|
1644
|
+
/**
|
|
1645
|
+
* Type
|
|
1646
|
+
* @constant
|
|
1647
|
+
*/
|
|
1648
|
+
type: "tool_search_tool_search_result";
|
|
1649
|
+
};
|
|
1650
|
+
/** RequestToolUseBlock */
|
|
1651
|
+
RequestToolUseBlock: {
|
|
1652
|
+
/**
|
|
1653
|
+
* Cache Control
|
|
1654
|
+
* @description Create a cache control breakpoint at this content block.
|
|
1655
|
+
*/
|
|
1656
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
1657
|
+
/** Caller */
|
|
1658
|
+
caller?: components["schemas"]["DirectCaller"] | components["schemas"]["ServerToolCaller"] | components["schemas"]["ServerToolCaller_20260120"];
|
|
1659
|
+
/** Id */
|
|
1660
|
+
id: string;
|
|
1661
|
+
/** Input */
|
|
1662
|
+
input: {
|
|
1663
|
+
[key: string]: unknown;
|
|
1664
|
+
};
|
|
1665
|
+
/** Name */
|
|
1666
|
+
name: string;
|
|
1667
|
+
/**
|
|
1668
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1669
|
+
* @enum {string}
|
|
1670
|
+
*/
|
|
1671
|
+
type: "tool_use";
|
|
1672
|
+
};
|
|
1673
|
+
/** RequestWebFetchResultBlock */
|
|
1674
|
+
RequestWebFetchResultBlock: {
|
|
1675
|
+
content: components["schemas"]["RequestDocumentBlock"];
|
|
1676
|
+
/**
|
|
1677
|
+
* Retrieved At
|
|
1678
|
+
* @description ISO 8601 timestamp when the content was retrieved
|
|
1679
|
+
*/
|
|
1680
|
+
retrieved_at?: string | null;
|
|
1681
|
+
/**
|
|
1682
|
+
* Type
|
|
1683
|
+
* @constant
|
|
1684
|
+
*/
|
|
1685
|
+
type: "web_fetch_result";
|
|
1686
|
+
/**
|
|
1687
|
+
* Url
|
|
1688
|
+
* @description Fetched content URL
|
|
1689
|
+
*/
|
|
1690
|
+
url: string;
|
|
1691
|
+
};
|
|
1692
|
+
/** RequestWebFetchToolResultBlock */
|
|
1693
|
+
RequestWebFetchToolResultBlock: {
|
|
1694
|
+
/**
|
|
1695
|
+
* Cache Control
|
|
1696
|
+
* @description Create a cache control breakpoint at this content block.
|
|
1697
|
+
*/
|
|
1698
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
1699
|
+
/** Caller */
|
|
1700
|
+
caller?: components["schemas"]["DirectCaller"] | components["schemas"]["ServerToolCaller"] | components["schemas"]["ServerToolCaller_20260120"];
|
|
1701
|
+
/** Content */
|
|
1702
|
+
content: components["schemas"]["RequestWebFetchToolResultError"] | components["schemas"]["RequestWebFetchResultBlock"];
|
|
1703
|
+
/** Tool Use Id */
|
|
1704
|
+
tool_use_id: string;
|
|
1705
|
+
/**
|
|
1706
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1707
|
+
* @enum {string}
|
|
1708
|
+
*/
|
|
1709
|
+
type: "web_fetch_tool_result";
|
|
1710
|
+
};
|
|
1711
|
+
/** RequestWebFetchToolResultError */
|
|
1712
|
+
RequestWebFetchToolResultError: {
|
|
1713
|
+
error_code: components["schemas"]["WebFetchToolResultErrorCode"];
|
|
1714
|
+
/**
|
|
1715
|
+
* Type
|
|
1716
|
+
* @constant
|
|
1717
|
+
*/
|
|
1718
|
+
type: "web_fetch_tool_result_error";
|
|
1719
|
+
};
|
|
1720
|
+
/** RequestWebSearchResultBlock */
|
|
1721
|
+
RequestWebSearchResultBlock: {
|
|
1722
|
+
/** Encrypted Content */
|
|
1723
|
+
encrypted_content: string;
|
|
1724
|
+
/** Page Age */
|
|
1725
|
+
page_age?: string | null;
|
|
1726
|
+
/** Title */
|
|
1727
|
+
title: string;
|
|
1728
|
+
/**
|
|
1729
|
+
* Type
|
|
1730
|
+
* @constant
|
|
1731
|
+
*/
|
|
1732
|
+
type: "web_search_result";
|
|
1733
|
+
/** Url */
|
|
1734
|
+
url: string;
|
|
1735
|
+
};
|
|
1736
|
+
/** RequestWebSearchResultLocationCitation */
|
|
1737
|
+
RequestWebSearchResultLocationCitation: {
|
|
1738
|
+
/** Cited Text */
|
|
1739
|
+
cited_text: string;
|
|
1740
|
+
/** Encrypted Index */
|
|
1741
|
+
encrypted_index: string;
|
|
1742
|
+
/** Title */
|
|
1743
|
+
title: string | null;
|
|
1744
|
+
/**
|
|
1745
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1746
|
+
* @enum {string}
|
|
1747
|
+
*/
|
|
1748
|
+
type: "web_search_result_location";
|
|
1749
|
+
/** Url */
|
|
1750
|
+
url: string;
|
|
1751
|
+
};
|
|
1752
|
+
/** RequestWebSearchToolResultBlock */
|
|
1753
|
+
RequestWebSearchToolResultBlock: {
|
|
1754
|
+
/**
|
|
1755
|
+
* Cache Control
|
|
1756
|
+
* @description Create a cache control breakpoint at this content block.
|
|
1757
|
+
*/
|
|
1758
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
1759
|
+
/** Caller */
|
|
1760
|
+
caller?: components["schemas"]["DirectCaller"] | components["schemas"]["ServerToolCaller"] | components["schemas"]["ServerToolCaller_20260120"];
|
|
1761
|
+
/** Content */
|
|
1762
|
+
content: components["schemas"]["RequestWebSearchResultBlock"][] | components["schemas"]["RequestWebSearchToolResultError"];
|
|
1763
|
+
/** Tool Use Id */
|
|
1764
|
+
tool_use_id: string;
|
|
1765
|
+
/**
|
|
1766
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1767
|
+
* @enum {string}
|
|
1768
|
+
*/
|
|
1769
|
+
type: "web_search_tool_result";
|
|
1770
|
+
};
|
|
1771
|
+
/** RequestWebSearchToolResultError */
|
|
1772
|
+
RequestWebSearchToolResultError: {
|
|
1773
|
+
error_code: components["schemas"]["WebSearchToolResultErrorCode"];
|
|
1774
|
+
/**
|
|
1775
|
+
* Type
|
|
1776
|
+
* @constant
|
|
1777
|
+
*/
|
|
1778
|
+
type: "web_search_tool_result_error";
|
|
1779
|
+
};
|
|
1780
|
+
/** ResponseBashCodeExecutionOutputBlock */
|
|
1781
|
+
ResponseBashCodeExecutionOutputBlock: {
|
|
1782
|
+
/** File Id */
|
|
1783
|
+
file_id: string;
|
|
1784
|
+
/**
|
|
1785
|
+
* Type
|
|
1786
|
+
* @default bash_code_execution_output
|
|
1787
|
+
* @constant
|
|
1788
|
+
*/
|
|
1789
|
+
type: "bash_code_execution_output";
|
|
1790
|
+
};
|
|
1791
|
+
/** ResponseBashCodeExecutionResultBlock */
|
|
1792
|
+
ResponseBashCodeExecutionResultBlock: {
|
|
1793
|
+
/** Content */
|
|
1794
|
+
content: components["schemas"]["ResponseBashCodeExecutionOutputBlock"][];
|
|
1795
|
+
/** Return Code */
|
|
1796
|
+
return_code: number;
|
|
1797
|
+
/** Stderr */
|
|
1798
|
+
stderr: string;
|
|
1799
|
+
/** Stdout */
|
|
1800
|
+
stdout: string;
|
|
1801
|
+
/**
|
|
1802
|
+
* Type
|
|
1803
|
+
* @default bash_code_execution_result
|
|
1804
|
+
* @constant
|
|
1805
|
+
*/
|
|
1806
|
+
type: "bash_code_execution_result";
|
|
1807
|
+
};
|
|
1808
|
+
/** ResponseBashCodeExecutionToolResultBlock */
|
|
1809
|
+
ResponseBashCodeExecutionToolResultBlock: {
|
|
1810
|
+
/** Content */
|
|
1811
|
+
content: components["schemas"]["ResponseBashCodeExecutionToolResultError"] | components["schemas"]["ResponseBashCodeExecutionResultBlock"];
|
|
1812
|
+
/** Tool Use Id */
|
|
1813
|
+
tool_use_id: string;
|
|
1814
|
+
/**
|
|
1815
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1816
|
+
* @enum {string}
|
|
1817
|
+
*/
|
|
1818
|
+
type: "bash_code_execution_tool_result";
|
|
1819
|
+
};
|
|
1820
|
+
/** ResponseBashCodeExecutionToolResultError */
|
|
1821
|
+
ResponseBashCodeExecutionToolResultError: {
|
|
1822
|
+
error_code: components["schemas"]["BashCodeExecutionToolResultErrorCode"];
|
|
1823
|
+
/**
|
|
1824
|
+
* Type
|
|
1825
|
+
* @default bash_code_execution_tool_result_error
|
|
1826
|
+
* @constant
|
|
1827
|
+
*/
|
|
1828
|
+
type: "bash_code_execution_tool_result_error";
|
|
1829
|
+
};
|
|
1830
|
+
/** ResponseCharLocationCitation */
|
|
1831
|
+
ResponseCharLocationCitation: {
|
|
1832
|
+
/** Cited Text */
|
|
1833
|
+
cited_text: string;
|
|
1834
|
+
/** Document Index */
|
|
1835
|
+
document_index: number;
|
|
1836
|
+
/** Document Title */
|
|
1837
|
+
document_title: string | null;
|
|
1838
|
+
/** End Char Index */
|
|
1839
|
+
end_char_index: number;
|
|
1840
|
+
/**
|
|
1841
|
+
* File Id
|
|
1842
|
+
* @default null
|
|
1843
|
+
*/
|
|
1844
|
+
file_id: string | null;
|
|
1845
|
+
/** Start Char Index */
|
|
1846
|
+
start_char_index: number;
|
|
1847
|
+
/**
|
|
1848
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1849
|
+
* @enum {string}
|
|
1850
|
+
*/
|
|
1851
|
+
type: "char_location";
|
|
1852
|
+
};
|
|
1853
|
+
/** ResponseCitationsConfig */
|
|
1854
|
+
ResponseCitationsConfig: {
|
|
1855
|
+
/**
|
|
1856
|
+
* Enabled
|
|
1857
|
+
* @default false
|
|
1858
|
+
*/
|
|
1859
|
+
enabled: boolean;
|
|
1860
|
+
};
|
|
1861
|
+
/** ResponseCodeExecutionOutputBlock */
|
|
1862
|
+
ResponseCodeExecutionOutputBlock: {
|
|
1863
|
+
/** File Id */
|
|
1864
|
+
file_id: string;
|
|
1865
|
+
/**
|
|
1866
|
+
* Type
|
|
1867
|
+
* @default code_execution_output
|
|
1868
|
+
* @constant
|
|
1869
|
+
*/
|
|
1870
|
+
type: "code_execution_output";
|
|
1871
|
+
};
|
|
1872
|
+
/** ResponseCodeExecutionResultBlock */
|
|
1873
|
+
ResponseCodeExecutionResultBlock: {
|
|
1874
|
+
/** Content */
|
|
1875
|
+
content: components["schemas"]["ResponseCodeExecutionOutputBlock"][];
|
|
1876
|
+
/** Return Code */
|
|
1877
|
+
return_code: number;
|
|
1878
|
+
/** Stderr */
|
|
1879
|
+
stderr: string;
|
|
1880
|
+
/** Stdout */
|
|
1881
|
+
stdout: string;
|
|
1882
|
+
/**
|
|
1883
|
+
* Type
|
|
1884
|
+
* @default code_execution_result
|
|
1885
|
+
* @constant
|
|
1886
|
+
*/
|
|
1887
|
+
type: "code_execution_result";
|
|
1888
|
+
};
|
|
1889
|
+
/** ResponseCodeExecutionToolResultBlock */
|
|
1890
|
+
ResponseCodeExecutionToolResultBlock: {
|
|
1891
|
+
/** Content */
|
|
1892
|
+
content: components["schemas"]["ResponseCodeExecutionToolResultError"] | components["schemas"]["ResponseCodeExecutionResultBlock"] | components["schemas"]["ResponseEncryptedCodeExecutionResultBlock"];
|
|
1893
|
+
/** Tool Use Id */
|
|
1894
|
+
tool_use_id: string;
|
|
1895
|
+
/**
|
|
1896
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1897
|
+
* @enum {string}
|
|
1898
|
+
*/
|
|
1899
|
+
type: "code_execution_tool_result";
|
|
1900
|
+
};
|
|
1901
|
+
/** ResponseCodeExecutionToolResultError */
|
|
1902
|
+
ResponseCodeExecutionToolResultError: {
|
|
1903
|
+
error_code: components["schemas"]["CodeExecutionToolResultErrorCode"];
|
|
1904
|
+
/**
|
|
1905
|
+
* Type
|
|
1906
|
+
* @default code_execution_tool_result_error
|
|
1907
|
+
* @constant
|
|
1908
|
+
*/
|
|
1909
|
+
type: "code_execution_tool_result_error";
|
|
1910
|
+
};
|
|
1911
|
+
/**
|
|
1912
|
+
* ResponseContainerUploadBlock
|
|
1913
|
+
* @description Response model for a file uploaded to the container.
|
|
1914
|
+
*/
|
|
1915
|
+
ResponseContainerUploadBlock: {
|
|
1916
|
+
/** File Id */
|
|
1917
|
+
file_id: string;
|
|
1918
|
+
/**
|
|
1919
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1920
|
+
* @enum {string}
|
|
1921
|
+
*/
|
|
1922
|
+
type: "container_upload";
|
|
1923
|
+
};
|
|
1924
|
+
/** ResponseContentBlockLocationCitation */
|
|
1925
|
+
ResponseContentBlockLocationCitation: {
|
|
1926
|
+
/** Cited Text */
|
|
1927
|
+
cited_text: string;
|
|
1928
|
+
/** Document Index */
|
|
1929
|
+
document_index: number;
|
|
1930
|
+
/** Document Title */
|
|
1931
|
+
document_title: string | null;
|
|
1932
|
+
/** End Block Index */
|
|
1933
|
+
end_block_index: number;
|
|
1934
|
+
/**
|
|
1935
|
+
* File Id
|
|
1936
|
+
* @default null
|
|
1937
|
+
*/
|
|
1938
|
+
file_id: string | null;
|
|
1939
|
+
/** Start Block Index */
|
|
1940
|
+
start_block_index: number;
|
|
1941
|
+
/**
|
|
1942
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1943
|
+
* @enum {string}
|
|
1944
|
+
*/
|
|
1945
|
+
type: "content_block_location";
|
|
1946
|
+
};
|
|
1947
|
+
/** ResponseDocumentBlock */
|
|
1948
|
+
ResponseDocumentBlock: {
|
|
1949
|
+
/**
|
|
1950
|
+
* @description Citation configuration for the document
|
|
1951
|
+
* @default null
|
|
1952
|
+
*/
|
|
1953
|
+
citations: components["schemas"]["ResponseCitationsConfig"] | null;
|
|
1954
|
+
/** Source */
|
|
1955
|
+
source: components["schemas"]["Base64PDFSource"] | components["schemas"]["PlainTextSource"];
|
|
1956
|
+
/**
|
|
1957
|
+
* Title
|
|
1958
|
+
* @description The title of the document
|
|
1959
|
+
* @default null
|
|
1960
|
+
*/
|
|
1961
|
+
title: string | null;
|
|
1962
|
+
/**
|
|
1963
|
+
* Type
|
|
1964
|
+
* @default document
|
|
1965
|
+
* @constant
|
|
1966
|
+
*/
|
|
1967
|
+
type: "document";
|
|
1968
|
+
};
|
|
1969
|
+
/**
|
|
1970
|
+
* ResponseEncryptedCodeExecutionResultBlock
|
|
1971
|
+
* @description Code execution result with encrypted stdout for PFC + web_search results.
|
|
1972
|
+
*/
|
|
1973
|
+
ResponseEncryptedCodeExecutionResultBlock: {
|
|
1974
|
+
/** Content */
|
|
1975
|
+
content: components["schemas"]["ResponseCodeExecutionOutputBlock"][];
|
|
1976
|
+
/** Encrypted Stdout */
|
|
1977
|
+
encrypted_stdout: string;
|
|
1978
|
+
/** Return Code */
|
|
1979
|
+
return_code: number;
|
|
1980
|
+
/** Stderr */
|
|
1981
|
+
stderr: string;
|
|
1982
|
+
/**
|
|
1983
|
+
* Type
|
|
1984
|
+
* @default encrypted_code_execution_result
|
|
1985
|
+
* @constant
|
|
1986
|
+
*/
|
|
1987
|
+
type: "encrypted_code_execution_result";
|
|
1988
|
+
};
|
|
1989
|
+
/** ResponsePageLocationCitation */
|
|
1990
|
+
ResponsePageLocationCitation: {
|
|
1991
|
+
/** Cited Text */
|
|
1992
|
+
cited_text: string;
|
|
1993
|
+
/** Document Index */
|
|
1994
|
+
document_index: number;
|
|
1995
|
+
/** Document Title */
|
|
1996
|
+
document_title: string | null;
|
|
1997
|
+
/** End Page Number */
|
|
1998
|
+
end_page_number: number;
|
|
1999
|
+
/**
|
|
2000
|
+
* File Id
|
|
2001
|
+
* @default null
|
|
2002
|
+
*/
|
|
2003
|
+
file_id: string | null;
|
|
2004
|
+
/** Start Page Number */
|
|
2005
|
+
start_page_number: number;
|
|
2006
|
+
/**
|
|
2007
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2008
|
+
* @enum {string}
|
|
2009
|
+
*/
|
|
2010
|
+
type: "page_location";
|
|
2011
|
+
};
|
|
2012
|
+
/** ResponseRedactedThinkingBlock */
|
|
2013
|
+
ResponseRedactedThinkingBlock: {
|
|
2014
|
+
/** Data */
|
|
2015
|
+
data: string;
|
|
2016
|
+
/**
|
|
2017
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2018
|
+
* @enum {string}
|
|
2019
|
+
*/
|
|
2020
|
+
type: "redacted_thinking";
|
|
2021
|
+
};
|
|
2022
|
+
/** ResponseSearchResultLocationCitation */
|
|
2023
|
+
ResponseSearchResultLocationCitation: {
|
|
2024
|
+
/** Cited Text */
|
|
2025
|
+
cited_text: string;
|
|
2026
|
+
/** End Block Index */
|
|
2027
|
+
end_block_index: number;
|
|
2028
|
+
/** Search Result Index */
|
|
2029
|
+
search_result_index: number;
|
|
2030
|
+
/** Source */
|
|
2031
|
+
source: string;
|
|
2032
|
+
/** Start Block Index */
|
|
2033
|
+
start_block_index: number;
|
|
2034
|
+
/** Title */
|
|
2035
|
+
title: string | null;
|
|
2036
|
+
/**
|
|
2037
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2038
|
+
* @enum {string}
|
|
2039
|
+
*/
|
|
2040
|
+
type: "search_result_location";
|
|
2041
|
+
};
|
|
2042
|
+
/** ResponseServerToolUseBlock */
|
|
2043
|
+
ResponseServerToolUseBlock: {
|
|
2044
|
+
/**
|
|
2045
|
+
* Caller
|
|
2046
|
+
* @default {
|
|
2047
|
+
* "type": "direct"
|
|
2048
|
+
* }
|
|
2049
|
+
*/
|
|
2050
|
+
caller: components["schemas"]["DirectCaller"] | components["schemas"]["ServerToolCaller"] | components["schemas"]["ServerToolCaller_20260120"];
|
|
2051
|
+
/** Id */
|
|
2052
|
+
id: string;
|
|
2053
|
+
/** Input */
|
|
2054
|
+
input: {
|
|
2055
|
+
[key: string]: unknown;
|
|
2056
|
+
};
|
|
2057
|
+
/**
|
|
2058
|
+
* Name
|
|
2059
|
+
* @enum {string}
|
|
2060
|
+
*/
|
|
2061
|
+
name: "web_search" | "web_fetch" | "code_execution" | "bash_code_execution" | "text_editor_code_execution" | "tool_search_tool_regex" | "tool_search_tool_bm25";
|
|
2062
|
+
/**
|
|
2063
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2064
|
+
* @enum {string}
|
|
2065
|
+
*/
|
|
2066
|
+
type: "server_tool_use";
|
|
2067
|
+
};
|
|
2068
|
+
/** ResponseTextBlock */
|
|
2069
|
+
ResponseTextBlock: {
|
|
2070
|
+
/**
|
|
2071
|
+
* Citations
|
|
2072
|
+
* @description Citations supporting the text block.
|
|
2073
|
+
*
|
|
2074
|
+
* The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.
|
|
2075
|
+
* @default null
|
|
2076
|
+
*/
|
|
2077
|
+
citations: (components["schemas"]["ResponseCharLocationCitation"] | components["schemas"]["ResponsePageLocationCitation"] | components["schemas"]["ResponseContentBlockLocationCitation"] | components["schemas"]["ResponseWebSearchResultLocationCitation"] | components["schemas"]["ResponseSearchResultLocationCitation"])[] | null;
|
|
2078
|
+
/** Text */
|
|
2079
|
+
text: string;
|
|
2080
|
+
/**
|
|
2081
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2082
|
+
* @enum {string}
|
|
2083
|
+
*/
|
|
2084
|
+
type: "text";
|
|
2085
|
+
};
|
|
2086
|
+
/** ResponseTextEditorCodeExecutionCreateResultBlock */
|
|
2087
|
+
ResponseTextEditorCodeExecutionCreateResultBlock: {
|
|
2088
|
+
/** Is File Update */
|
|
2089
|
+
is_file_update: boolean;
|
|
2090
|
+
/**
|
|
2091
|
+
* Type
|
|
2092
|
+
* @default text_editor_code_execution_create_result
|
|
2093
|
+
* @constant
|
|
2094
|
+
*/
|
|
2095
|
+
type: "text_editor_code_execution_create_result";
|
|
2096
|
+
};
|
|
2097
|
+
/** ResponseTextEditorCodeExecutionStrReplaceResultBlock */
|
|
2098
|
+
ResponseTextEditorCodeExecutionStrReplaceResultBlock: {
|
|
2099
|
+
/**
|
|
2100
|
+
* Lines
|
|
2101
|
+
* @default null
|
|
2102
|
+
*/
|
|
2103
|
+
lines: string[] | null;
|
|
2104
|
+
/**
|
|
2105
|
+
* New Lines
|
|
2106
|
+
* @default null
|
|
2107
|
+
*/
|
|
2108
|
+
new_lines: number | null;
|
|
2109
|
+
/**
|
|
2110
|
+
* New Start
|
|
2111
|
+
* @default null
|
|
2112
|
+
*/
|
|
2113
|
+
new_start: number | null;
|
|
2114
|
+
/**
|
|
2115
|
+
* Old Lines
|
|
2116
|
+
* @default null
|
|
2117
|
+
*/
|
|
2118
|
+
old_lines: number | null;
|
|
2119
|
+
/**
|
|
2120
|
+
* Old Start
|
|
2121
|
+
* @default null
|
|
2122
|
+
*/
|
|
2123
|
+
old_start: number | null;
|
|
2124
|
+
/**
|
|
2125
|
+
* Type
|
|
2126
|
+
* @default text_editor_code_execution_str_replace_result
|
|
2127
|
+
* @constant
|
|
2128
|
+
*/
|
|
2129
|
+
type: "text_editor_code_execution_str_replace_result";
|
|
2130
|
+
};
|
|
2131
|
+
/** ResponseTextEditorCodeExecutionToolResultBlock */
|
|
2132
|
+
ResponseTextEditorCodeExecutionToolResultBlock: {
|
|
2133
|
+
/** Content */
|
|
2134
|
+
content: components["schemas"]["ResponseTextEditorCodeExecutionToolResultError"] | components["schemas"]["ResponseTextEditorCodeExecutionViewResultBlock"] | components["schemas"]["ResponseTextEditorCodeExecutionCreateResultBlock"] | components["schemas"]["ResponseTextEditorCodeExecutionStrReplaceResultBlock"];
|
|
2135
|
+
/** Tool Use Id */
|
|
2136
|
+
tool_use_id: string;
|
|
2137
|
+
/**
|
|
2138
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2139
|
+
* @enum {string}
|
|
2140
|
+
*/
|
|
2141
|
+
type: "text_editor_code_execution_tool_result";
|
|
2142
|
+
};
|
|
2143
|
+
/** ResponseTextEditorCodeExecutionToolResultError */
|
|
2144
|
+
ResponseTextEditorCodeExecutionToolResultError: {
|
|
2145
|
+
error_code: components["schemas"]["TextEditorCodeExecutionToolResultErrorCode"];
|
|
2146
|
+
/**
|
|
2147
|
+
* Error Message
|
|
2148
|
+
* @default null
|
|
2149
|
+
*/
|
|
2150
|
+
error_message: string | null;
|
|
2151
|
+
/**
|
|
2152
|
+
* Type
|
|
2153
|
+
* @default text_editor_code_execution_tool_result_error
|
|
2154
|
+
* @constant
|
|
2155
|
+
*/
|
|
2156
|
+
type: "text_editor_code_execution_tool_result_error";
|
|
2157
|
+
};
|
|
2158
|
+
/** ResponseTextEditorCodeExecutionViewResultBlock */
|
|
2159
|
+
ResponseTextEditorCodeExecutionViewResultBlock: {
|
|
2160
|
+
/** Content */
|
|
2161
|
+
content: string;
|
|
2162
|
+
/**
|
|
2163
|
+
* File Type
|
|
2164
|
+
* @enum {string}
|
|
2165
|
+
*/
|
|
2166
|
+
file_type: "text" | "image" | "pdf";
|
|
2167
|
+
/**
|
|
2168
|
+
* Num Lines
|
|
2169
|
+
* @default null
|
|
2170
|
+
*/
|
|
2171
|
+
num_lines: number | null;
|
|
2172
|
+
/**
|
|
2173
|
+
* Start Line
|
|
2174
|
+
* @default null
|
|
2175
|
+
*/
|
|
2176
|
+
start_line: number | null;
|
|
2177
|
+
/**
|
|
2178
|
+
* Total Lines
|
|
2179
|
+
* @default null
|
|
2180
|
+
*/
|
|
2181
|
+
total_lines: number | null;
|
|
2182
|
+
/**
|
|
2183
|
+
* Type
|
|
2184
|
+
* @default text_editor_code_execution_view_result
|
|
2185
|
+
* @constant
|
|
2186
|
+
*/
|
|
2187
|
+
type: "text_editor_code_execution_view_result";
|
|
2188
|
+
};
|
|
2189
|
+
/** ResponseThinkingBlock */
|
|
2190
|
+
ResponseThinkingBlock: {
|
|
2191
|
+
/** Signature */
|
|
2192
|
+
signature: string;
|
|
2193
|
+
/** Thinking */
|
|
2194
|
+
thinking: string;
|
|
2195
|
+
/**
|
|
2196
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2197
|
+
* @enum {string}
|
|
2198
|
+
*/
|
|
2199
|
+
type: "thinking";
|
|
2200
|
+
};
|
|
2201
|
+
/** ResponseToolReferenceBlock */
|
|
2202
|
+
ResponseToolReferenceBlock: {
|
|
2203
|
+
/** Tool Name */
|
|
2204
|
+
tool_name: string;
|
|
2205
|
+
/**
|
|
2206
|
+
* Type
|
|
2207
|
+
* @default tool_reference
|
|
2208
|
+
* @constant
|
|
2209
|
+
*/
|
|
2210
|
+
type: "tool_reference";
|
|
2211
|
+
};
|
|
2212
|
+
/** ResponseToolSearchToolResultBlock */
|
|
2213
|
+
ResponseToolSearchToolResultBlock: {
|
|
2214
|
+
/** Content */
|
|
2215
|
+
content: components["schemas"]["ResponseToolSearchToolResultError"] | components["schemas"]["ResponseToolSearchToolSearchResultBlock"];
|
|
2216
|
+
/** Tool Use Id */
|
|
2217
|
+
tool_use_id: string;
|
|
2218
|
+
/**
|
|
2219
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2220
|
+
* @enum {string}
|
|
2221
|
+
*/
|
|
2222
|
+
type: "tool_search_tool_result";
|
|
2223
|
+
};
|
|
2224
|
+
/** ResponseToolSearchToolResultError */
|
|
2225
|
+
ResponseToolSearchToolResultError: {
|
|
2226
|
+
error_code: components["schemas"]["ToolSearchToolResultErrorCode"];
|
|
2227
|
+
/**
|
|
2228
|
+
* Error Message
|
|
2229
|
+
* @default null
|
|
2230
|
+
*/
|
|
2231
|
+
error_message: string | null;
|
|
2232
|
+
/**
|
|
2233
|
+
* Type
|
|
2234
|
+
* @default tool_search_tool_result_error
|
|
2235
|
+
* @constant
|
|
2236
|
+
*/
|
|
2237
|
+
type: "tool_search_tool_result_error";
|
|
2238
|
+
};
|
|
2239
|
+
/** ResponseToolSearchToolSearchResultBlock */
|
|
2240
|
+
ResponseToolSearchToolSearchResultBlock: {
|
|
2241
|
+
/** Tool References */
|
|
2242
|
+
tool_references: components["schemas"]["ResponseToolReferenceBlock"][];
|
|
2243
|
+
/**
|
|
2244
|
+
* Type
|
|
2245
|
+
* @default tool_search_tool_search_result
|
|
2246
|
+
* @constant
|
|
2247
|
+
*/
|
|
2248
|
+
type: "tool_search_tool_search_result";
|
|
2249
|
+
};
|
|
2250
|
+
/** ResponseToolUseBlock */
|
|
2251
|
+
ResponseToolUseBlock: {
|
|
2252
|
+
/**
|
|
2253
|
+
* Caller
|
|
2254
|
+
* @default {
|
|
2255
|
+
* "type": "direct"
|
|
2256
|
+
* }
|
|
2257
|
+
*/
|
|
2258
|
+
caller: components["schemas"]["DirectCaller"] | components["schemas"]["ServerToolCaller"] | components["schemas"]["ServerToolCaller_20260120"];
|
|
2259
|
+
/** Id */
|
|
2260
|
+
id: string;
|
|
2261
|
+
/** Input */
|
|
2262
|
+
input: {
|
|
2263
|
+
[key: string]: unknown;
|
|
2264
|
+
};
|
|
2265
|
+
/** Name */
|
|
2266
|
+
name: string;
|
|
2267
|
+
/**
|
|
2268
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2269
|
+
* @enum {string}
|
|
2270
|
+
*/
|
|
2271
|
+
type: "tool_use";
|
|
2272
|
+
};
|
|
2273
|
+
/** ResponseWebFetchResultBlock */
|
|
2274
|
+
ResponseWebFetchResultBlock: {
|
|
2275
|
+
content: components["schemas"]["ResponseDocumentBlock"];
|
|
2276
|
+
/**
|
|
2277
|
+
* Retrieved At
|
|
2278
|
+
* @description ISO 8601 timestamp when the content was retrieved
|
|
2279
|
+
* @default null
|
|
2280
|
+
*/
|
|
2281
|
+
retrieved_at: string | null;
|
|
2282
|
+
/**
|
|
2283
|
+
* Type
|
|
2284
|
+
* @default web_fetch_result
|
|
2285
|
+
* @constant
|
|
2286
|
+
*/
|
|
2287
|
+
type: "web_fetch_result";
|
|
2288
|
+
/**
|
|
2289
|
+
* Url
|
|
2290
|
+
* @description Fetched content URL
|
|
2291
|
+
*/
|
|
2292
|
+
url: string;
|
|
2293
|
+
};
|
|
2294
|
+
/** ResponseWebFetchToolResultBlock */
|
|
2295
|
+
ResponseWebFetchToolResultBlock: {
|
|
2296
|
+
/**
|
|
2297
|
+
* Caller
|
|
2298
|
+
* @default {
|
|
2299
|
+
* "type": "direct"
|
|
2300
|
+
* }
|
|
2301
|
+
*/
|
|
2302
|
+
caller: components["schemas"]["DirectCaller"] | components["schemas"]["ServerToolCaller"] | components["schemas"]["ServerToolCaller_20260120"];
|
|
2303
|
+
/** Content */
|
|
2304
|
+
content: components["schemas"]["ResponseWebFetchToolResultError"] | components["schemas"]["ResponseWebFetchResultBlock"];
|
|
2305
|
+
/** Tool Use Id */
|
|
2306
|
+
tool_use_id: string;
|
|
2307
|
+
/**
|
|
2308
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2309
|
+
* @enum {string}
|
|
2310
|
+
*/
|
|
2311
|
+
type: "web_fetch_tool_result";
|
|
2312
|
+
};
|
|
2313
|
+
/** ResponseWebFetchToolResultError */
|
|
2314
|
+
ResponseWebFetchToolResultError: {
|
|
2315
|
+
error_code: components["schemas"]["WebFetchToolResultErrorCode"];
|
|
2316
|
+
/**
|
|
2317
|
+
* Type
|
|
2318
|
+
* @default web_fetch_tool_result_error
|
|
2319
|
+
* @constant
|
|
2320
|
+
*/
|
|
2321
|
+
type: "web_fetch_tool_result_error";
|
|
2322
|
+
};
|
|
2323
|
+
/** ResponseWebSearchResultBlock */
|
|
2324
|
+
ResponseWebSearchResultBlock: {
|
|
2325
|
+
/** Encrypted Content */
|
|
2326
|
+
encrypted_content: string;
|
|
2327
|
+
/**
|
|
2328
|
+
* Page Age
|
|
2329
|
+
* @default null
|
|
2330
|
+
*/
|
|
2331
|
+
page_age: string | null;
|
|
2332
|
+
/** Title */
|
|
2333
|
+
title: string;
|
|
2334
|
+
/**
|
|
2335
|
+
* Type
|
|
2336
|
+
* @default web_search_result
|
|
2337
|
+
* @constant
|
|
2338
|
+
*/
|
|
2339
|
+
type: "web_search_result";
|
|
2340
|
+
/** Url */
|
|
2341
|
+
url: string;
|
|
2342
|
+
};
|
|
2343
|
+
/** ResponseWebSearchResultLocationCitation */
|
|
2344
|
+
ResponseWebSearchResultLocationCitation: {
|
|
2345
|
+
/** Cited Text */
|
|
2346
|
+
cited_text: string;
|
|
2347
|
+
/** Encrypted Index */
|
|
2348
|
+
encrypted_index: string;
|
|
2349
|
+
/** Title */
|
|
2350
|
+
title: string | null;
|
|
2351
|
+
/**
|
|
2352
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2353
|
+
* @enum {string}
|
|
2354
|
+
*/
|
|
2355
|
+
type: "web_search_result_location";
|
|
2356
|
+
/** Url */
|
|
2357
|
+
url: string;
|
|
2358
|
+
};
|
|
2359
|
+
/** ResponseWebSearchToolResultBlock */
|
|
2360
|
+
ResponseWebSearchToolResultBlock: {
|
|
2361
|
+
/**
|
|
2362
|
+
* Caller
|
|
2363
|
+
* @default {
|
|
2364
|
+
* "type": "direct"
|
|
2365
|
+
* }
|
|
2366
|
+
*/
|
|
2367
|
+
caller: components["schemas"]["DirectCaller"] | components["schemas"]["ServerToolCaller"] | components["schemas"]["ServerToolCaller_20260120"];
|
|
2368
|
+
/** Content */
|
|
2369
|
+
content: components["schemas"]["ResponseWebSearchToolResultError"] | components["schemas"]["ResponseWebSearchResultBlock"][];
|
|
2370
|
+
/** Tool Use Id */
|
|
2371
|
+
tool_use_id: string;
|
|
2372
|
+
/**
|
|
2373
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2374
|
+
* @enum {string}
|
|
2375
|
+
*/
|
|
2376
|
+
type: "web_search_tool_result";
|
|
2377
|
+
};
|
|
2378
|
+
/** ResponseWebSearchToolResultError */
|
|
2379
|
+
ResponseWebSearchToolResultError: {
|
|
2380
|
+
error_code: components["schemas"]["WebSearchToolResultErrorCode"];
|
|
2381
|
+
/**
|
|
2382
|
+
* Type
|
|
2383
|
+
* @default web_search_tool_result_error
|
|
2384
|
+
* @constant
|
|
2385
|
+
*/
|
|
2386
|
+
type: "web_search_tool_result_error";
|
|
2387
|
+
};
|
|
2388
|
+
/**
|
|
2389
|
+
* ServerToolCaller
|
|
2390
|
+
* @description Tool invocation generated by a server-side tool.
|
|
2391
|
+
*/
|
|
2392
|
+
ServerToolCaller: {
|
|
2393
|
+
/** Tool Id */
|
|
2394
|
+
tool_id: string;
|
|
2395
|
+
/**
|
|
2396
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2397
|
+
* @enum {string}
|
|
2398
|
+
*/
|
|
2399
|
+
type: "code_execution_20250825";
|
|
2400
|
+
};
|
|
2401
|
+
/** ServerToolCaller_20260120 */
|
|
2402
|
+
ServerToolCaller_20260120: {
|
|
2403
|
+
/** Tool Id */
|
|
2404
|
+
tool_id: string;
|
|
2405
|
+
/**
|
|
2406
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2407
|
+
* @enum {string}
|
|
2408
|
+
*/
|
|
2409
|
+
type: "code_execution_20260120";
|
|
2410
|
+
};
|
|
2411
|
+
/** ServerToolUsage */
|
|
2412
|
+
ServerToolUsage: {
|
|
2413
|
+
/**
|
|
2414
|
+
* Web Fetch Requests
|
|
2415
|
+
* @description The number of web fetch tool requests.
|
|
2416
|
+
* @default 0
|
|
2417
|
+
* @example 2
|
|
2418
|
+
*/
|
|
2419
|
+
web_fetch_requests: number;
|
|
2420
|
+
/**
|
|
2421
|
+
* Web Search Requests
|
|
2422
|
+
* @description The number of web search tool requests.
|
|
2423
|
+
* @default 0
|
|
2424
|
+
* @example 0
|
|
2425
|
+
*/
|
|
2426
|
+
web_search_requests: number;
|
|
2427
|
+
};
|
|
2428
|
+
/**
|
|
2429
|
+
* TextEditorCodeExecutionToolResultErrorCode
|
|
2430
|
+
* @enum {string}
|
|
2431
|
+
*/
|
|
2432
|
+
TextEditorCodeExecutionToolResultErrorCode: "invalid_tool_input" | "unavailable" | "too_many_requests" | "execution_time_exceeded" | "file_not_found";
|
|
2433
|
+
/** TextEditor_20250124 */
|
|
2434
|
+
TextEditor_20250124: {
|
|
2435
|
+
/** Allowed Callers */
|
|
2436
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
2437
|
+
/**
|
|
2438
|
+
* Cache Control
|
|
2439
|
+
* @description Create a cache control breakpoint at this content block.
|
|
2440
|
+
*/
|
|
2441
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
2442
|
+
/**
|
|
2443
|
+
* Defer Loading
|
|
2444
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
2445
|
+
*/
|
|
2446
|
+
defer_loading?: boolean;
|
|
2447
|
+
/** Input Examples */
|
|
2448
|
+
input_examples?: {
|
|
2449
|
+
[key: string]: components["schemas"]["JsonValue"];
|
|
2450
|
+
}[];
|
|
2451
|
+
/**
|
|
2452
|
+
* Name
|
|
2453
|
+
* @description Name of the tool.
|
|
2454
|
+
*
|
|
2455
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
2456
|
+
* @constant
|
|
2457
|
+
*/
|
|
2458
|
+
name: "str_replace_editor";
|
|
2459
|
+
/**
|
|
2460
|
+
* Strict
|
|
2461
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
2462
|
+
*/
|
|
2463
|
+
strict?: boolean;
|
|
2464
|
+
/**
|
|
2465
|
+
* Type
|
|
2466
|
+
* @constant
|
|
2467
|
+
*/
|
|
2468
|
+
type: "text_editor_20250124";
|
|
2469
|
+
};
|
|
2470
|
+
/** TextEditor_20250429 */
|
|
2471
|
+
TextEditor_20250429: {
|
|
2472
|
+
/** Allowed Callers */
|
|
2473
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
2474
|
+
/**
|
|
2475
|
+
* Cache Control
|
|
2476
|
+
* @description Create a cache control breakpoint at this content block.
|
|
2477
|
+
*/
|
|
2478
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
2479
|
+
/**
|
|
2480
|
+
* Defer Loading
|
|
2481
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
2482
|
+
*/
|
|
2483
|
+
defer_loading?: boolean;
|
|
2484
|
+
/** Input Examples */
|
|
2485
|
+
input_examples?: {
|
|
2486
|
+
[key: string]: components["schemas"]["JsonValue"];
|
|
2487
|
+
}[];
|
|
2488
|
+
/**
|
|
2489
|
+
* Name
|
|
2490
|
+
* @description Name of the tool.
|
|
2491
|
+
*
|
|
2492
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
2493
|
+
* @constant
|
|
2494
|
+
*/
|
|
2495
|
+
name: "str_replace_based_edit_tool";
|
|
2496
|
+
/**
|
|
2497
|
+
* Strict
|
|
2498
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
2499
|
+
*/
|
|
2500
|
+
strict?: boolean;
|
|
2501
|
+
/**
|
|
2502
|
+
* Type
|
|
2503
|
+
* @constant
|
|
2504
|
+
*/
|
|
2505
|
+
type: "text_editor_20250429";
|
|
2506
|
+
};
|
|
2507
|
+
/** TextEditor_20250728 */
|
|
2508
|
+
TextEditor_20250728: {
|
|
2509
|
+
/** Allowed Callers */
|
|
2510
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
2511
|
+
/**
|
|
2512
|
+
* Cache Control
|
|
2513
|
+
* @description Create a cache control breakpoint at this content block.
|
|
2514
|
+
*/
|
|
2515
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
2516
|
+
/**
|
|
2517
|
+
* Defer Loading
|
|
2518
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
2519
|
+
*/
|
|
2520
|
+
defer_loading?: boolean;
|
|
2521
|
+
/** Input Examples */
|
|
2522
|
+
input_examples?: {
|
|
2523
|
+
[key: string]: components["schemas"]["JsonValue"];
|
|
2524
|
+
}[];
|
|
2525
|
+
/**
|
|
2526
|
+
* Max Characters
|
|
2527
|
+
* @description Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.
|
|
2528
|
+
*/
|
|
2529
|
+
max_characters?: number | null;
|
|
2530
|
+
/**
|
|
2531
|
+
* Name
|
|
2532
|
+
* @description Name of the tool.
|
|
2533
|
+
*
|
|
2534
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
2535
|
+
* @constant
|
|
2536
|
+
*/
|
|
2537
|
+
name: "str_replace_based_edit_tool";
|
|
2538
|
+
/**
|
|
2539
|
+
* Strict
|
|
2540
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
2541
|
+
*/
|
|
2542
|
+
strict?: boolean;
|
|
2543
|
+
/**
|
|
2544
|
+
* Type
|
|
2545
|
+
* @constant
|
|
2546
|
+
*/
|
|
2547
|
+
type: "text_editor_20250728";
|
|
2548
|
+
};
|
|
2549
|
+
/**
|
|
2550
|
+
* ThinkingCapability
|
|
2551
|
+
* @description Thinking capability details.
|
|
2552
|
+
*/
|
|
2553
|
+
ThinkingCapability: {
|
|
2554
|
+
/**
|
|
2555
|
+
* Supported
|
|
2556
|
+
* @description Whether this capability is supported by the model.
|
|
2557
|
+
*/
|
|
2558
|
+
supported: boolean;
|
|
2559
|
+
types: components["schemas"]["ThinkingTypes"];
|
|
2560
|
+
};
|
|
2561
|
+
/** ThinkingConfigAdaptive */
|
|
2562
|
+
ThinkingConfigAdaptive: {
|
|
2563
|
+
/** @description Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. Defaults to `summarized`. */
|
|
2564
|
+
display?: components["schemas"]["ThinkingDisplayMode"] | null;
|
|
2565
|
+
/**
|
|
2566
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2567
|
+
* @enum {string}
|
|
2568
|
+
*/
|
|
2569
|
+
type: "adaptive";
|
|
2570
|
+
};
|
|
2571
|
+
/** ThinkingConfigDisabled */
|
|
2572
|
+
ThinkingConfigDisabled: {
|
|
2573
|
+
/**
|
|
2574
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2575
|
+
* @enum {string}
|
|
2576
|
+
*/
|
|
2577
|
+
type: "disabled";
|
|
2578
|
+
};
|
|
2579
|
+
/** ThinkingConfigEnabled */
|
|
2580
|
+
ThinkingConfigEnabled: {
|
|
2581
|
+
/**
|
|
2582
|
+
* Budget Tokens
|
|
2583
|
+
* @description Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality.
|
|
2584
|
+
*
|
|
2585
|
+
* Must be ≥1024 and less than `max_tokens`.
|
|
2586
|
+
*
|
|
2587
|
+
* See [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.
|
|
2588
|
+
*/
|
|
2589
|
+
budget_tokens: number;
|
|
2590
|
+
/** @description Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. Defaults to `summarized`. */
|
|
2591
|
+
display?: components["schemas"]["ThinkingDisplayMode"] | null;
|
|
2592
|
+
/**
|
|
2593
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2594
|
+
* @enum {string}
|
|
2595
|
+
*/
|
|
2596
|
+
type: "enabled";
|
|
2597
|
+
};
|
|
2598
|
+
/**
|
|
2599
|
+
* ThinkingDisplayMode
|
|
2600
|
+
* @enum {string}
|
|
2601
|
+
*/
|
|
2602
|
+
ThinkingDisplayMode: "summarized" | "omitted";
|
|
2603
|
+
/**
|
|
2604
|
+
* ThinkingTypes
|
|
2605
|
+
* @description Supported thinking type configurations.
|
|
2606
|
+
*/
|
|
2607
|
+
ThinkingTypes: {
|
|
2608
|
+
/** @description Whether the model supports thinking with type 'adaptive' (auto). */
|
|
2609
|
+
adaptive: components["schemas"]["CapabilitySupport"];
|
|
2610
|
+
/** @description Whether the model supports thinking with type 'enabled'. */
|
|
2611
|
+
enabled: components["schemas"]["CapabilitySupport"];
|
|
2612
|
+
};
|
|
2613
|
+
/** Tool */
|
|
2614
|
+
Tool: {
|
|
2615
|
+
/** Type */
|
|
2616
|
+
type?: null | "custom";
|
|
2617
|
+
/**
|
|
2618
|
+
* Description
|
|
2619
|
+
* @description Description of what this tool does.
|
|
2620
|
+
*
|
|
2621
|
+
* Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.
|
|
2622
|
+
* @example Get the current weather in a given location
|
|
2623
|
+
*/
|
|
2624
|
+
description?: string;
|
|
2625
|
+
/**
|
|
2626
|
+
* Name
|
|
2627
|
+
* @description Name of the tool.
|
|
2628
|
+
*
|
|
2629
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
2630
|
+
*/
|
|
2631
|
+
name: string;
|
|
2632
|
+
/**
|
|
2633
|
+
* @description [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.
|
|
2634
|
+
*
|
|
2635
|
+
* This defines the shape of the `input` that your tool accepts and that the model will produce.
|
|
2636
|
+
* @example {
|
|
2637
|
+
* "properties": {
|
|
2638
|
+
* "location": {
|
|
2639
|
+
* "description": "The city and state, e.g. San Francisco, CA",
|
|
2640
|
+
* "type": "string"
|
|
2641
|
+
* },
|
|
2642
|
+
* "unit": {
|
|
2643
|
+
* "description": "Unit for the output - one of (celsius, fahrenheit)",
|
|
2644
|
+
* "type": "string"
|
|
2645
|
+
* }
|
|
2646
|
+
* },
|
|
2647
|
+
* "required": [
|
|
2648
|
+
* "location"
|
|
2649
|
+
* ],
|
|
2650
|
+
* "type": "object"
|
|
2651
|
+
* }
|
|
2652
|
+
*/
|
|
2653
|
+
input_schema: components["schemas"]["InputSchema"];
|
|
2654
|
+
/**
|
|
2655
|
+
* Cache Control
|
|
2656
|
+
* @description Create a cache control breakpoint at this content block.
|
|
2657
|
+
*/
|
|
2658
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
2659
|
+
/**
|
|
2660
|
+
* Strict
|
|
2661
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
2662
|
+
*/
|
|
2663
|
+
strict?: boolean;
|
|
2664
|
+
/**
|
|
2665
|
+
* Eager Input Streaming
|
|
2666
|
+
* @description Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.
|
|
2667
|
+
*/
|
|
2668
|
+
eager_input_streaming?: boolean | null;
|
|
2669
|
+
/** Allowed Callers */
|
|
2670
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
2671
|
+
/**
|
|
2672
|
+
* Defer Loading
|
|
2673
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
2674
|
+
*/
|
|
2675
|
+
defer_loading?: boolean;
|
|
2676
|
+
/** Input Examples */
|
|
2677
|
+
input_examples?: {
|
|
2678
|
+
[key: string]: components["schemas"]["JsonValue"];
|
|
2679
|
+
}[];
|
|
2680
|
+
};
|
|
2681
|
+
/**
|
|
2682
|
+
* ToolChoiceAny
|
|
2683
|
+
* @description The model will use any available tools.
|
|
2684
|
+
*/
|
|
2685
|
+
ToolChoiceAny: {
|
|
2686
|
+
/**
|
|
2687
|
+
* Disable Parallel Tool Use
|
|
2688
|
+
* @description Whether to disable parallel tool use.
|
|
2689
|
+
*
|
|
2690
|
+
* Defaults to `false`. If set to `true`, the model will output exactly one tool use.
|
|
2691
|
+
*/
|
|
2692
|
+
disable_parallel_tool_use?: boolean;
|
|
2693
|
+
/**
|
|
2694
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2695
|
+
* @enum {string}
|
|
2696
|
+
*/
|
|
2697
|
+
type: "any";
|
|
2698
|
+
};
|
|
2699
|
+
/**
|
|
2700
|
+
* ToolChoiceAuto
|
|
2701
|
+
* @description The model will automatically decide whether to use tools.
|
|
2702
|
+
*/
|
|
2703
|
+
ToolChoiceAuto: {
|
|
2704
|
+
/**
|
|
2705
|
+
* Disable Parallel Tool Use
|
|
2706
|
+
* @description Whether to disable parallel tool use.
|
|
2707
|
+
*
|
|
2708
|
+
* Defaults to `false`. If set to `true`, the model will output at most one tool use.
|
|
2709
|
+
*/
|
|
2710
|
+
disable_parallel_tool_use?: boolean;
|
|
2711
|
+
/**
|
|
2712
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2713
|
+
* @enum {string}
|
|
2714
|
+
*/
|
|
2715
|
+
type: "auto";
|
|
2716
|
+
};
|
|
2717
|
+
/**
|
|
2718
|
+
* ToolChoiceNone
|
|
2719
|
+
* @description The model will not be allowed to use tools.
|
|
2720
|
+
*/
|
|
2721
|
+
ToolChoiceNone: {
|
|
2722
|
+
/**
|
|
2723
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2724
|
+
* @enum {string}
|
|
2725
|
+
*/
|
|
2726
|
+
type: "none";
|
|
2727
|
+
};
|
|
2728
|
+
/**
|
|
2729
|
+
* ToolChoiceTool
|
|
2730
|
+
* @description The model will use the specified tool with `tool_choice.name`.
|
|
2731
|
+
*/
|
|
2732
|
+
ToolChoiceTool: {
|
|
2733
|
+
/**
|
|
2734
|
+
* Disable Parallel Tool Use
|
|
2735
|
+
* @description Whether to disable parallel tool use.
|
|
2736
|
+
*
|
|
2737
|
+
* Defaults to `false`. If set to `true`, the model will output exactly one tool use.
|
|
2738
|
+
*/
|
|
2739
|
+
disable_parallel_tool_use?: boolean;
|
|
2740
|
+
/**
|
|
2741
|
+
* Name
|
|
2742
|
+
* @description The name of the tool to use.
|
|
2743
|
+
*/
|
|
2744
|
+
name: string;
|
|
2745
|
+
/**
|
|
2746
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2747
|
+
* @enum {string}
|
|
2748
|
+
*/
|
|
2749
|
+
type: "tool";
|
|
2750
|
+
};
|
|
2751
|
+
/** ToolSearchToolBM25_20251119 */
|
|
2752
|
+
ToolSearchToolBM25_20251119: {
|
|
2753
|
+
/** Allowed Callers */
|
|
2754
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
2755
|
+
/**
|
|
2756
|
+
* Cache Control
|
|
2757
|
+
* @description Create a cache control breakpoint at this content block.
|
|
2758
|
+
*/
|
|
2759
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
2760
|
+
/**
|
|
2761
|
+
* Defer Loading
|
|
2762
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
2763
|
+
*/
|
|
2764
|
+
defer_loading?: boolean;
|
|
2765
|
+
/**
|
|
2766
|
+
* Name
|
|
2767
|
+
* @description Name of the tool.
|
|
2768
|
+
*
|
|
2769
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
2770
|
+
* @constant
|
|
2771
|
+
*/
|
|
2772
|
+
name: "tool_search_tool_bm25";
|
|
2773
|
+
/**
|
|
2774
|
+
* Strict
|
|
2775
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
2776
|
+
*/
|
|
2777
|
+
strict?: boolean;
|
|
2778
|
+
/**
|
|
2779
|
+
* Type
|
|
2780
|
+
* @enum {string}
|
|
2781
|
+
*/
|
|
2782
|
+
type: "tool_search_tool_bm25_20251119" | "tool_search_tool_bm25";
|
|
2783
|
+
};
|
|
2784
|
+
/** ToolSearchToolRegex_20251119 */
|
|
2785
|
+
ToolSearchToolRegex_20251119: {
|
|
2786
|
+
/** Allowed Callers */
|
|
2787
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
2788
|
+
/**
|
|
2789
|
+
* Cache Control
|
|
2790
|
+
* @description Create a cache control breakpoint at this content block.
|
|
2791
|
+
*/
|
|
2792
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
2793
|
+
/**
|
|
2794
|
+
* Defer Loading
|
|
2795
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
2796
|
+
*/
|
|
2797
|
+
defer_loading?: boolean;
|
|
2798
|
+
/**
|
|
2799
|
+
* Name
|
|
2800
|
+
* @description Name of the tool.
|
|
2801
|
+
*
|
|
2802
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
2803
|
+
* @constant
|
|
2804
|
+
*/
|
|
2805
|
+
name: "tool_search_tool_regex";
|
|
2806
|
+
/**
|
|
2807
|
+
* Strict
|
|
2808
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
2809
|
+
*/
|
|
2810
|
+
strict?: boolean;
|
|
2811
|
+
/**
|
|
2812
|
+
* Type
|
|
2813
|
+
* @enum {string}
|
|
2814
|
+
*/
|
|
2815
|
+
type: "tool_search_tool_regex_20251119" | "tool_search_tool_regex";
|
|
2816
|
+
};
|
|
2817
|
+
/**
|
|
2818
|
+
* ToolSearchToolResultErrorCode
|
|
2819
|
+
* @enum {string}
|
|
2820
|
+
*/
|
|
2821
|
+
ToolSearchToolResultErrorCode: "invalid_tool_input" | "unavailable" | "too_many_requests" | "execution_time_exceeded";
|
|
2822
|
+
/** URLImageSource */
|
|
2823
|
+
URLImageSource: {
|
|
2824
|
+
/**
|
|
2825
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2826
|
+
* @enum {string}
|
|
2827
|
+
*/
|
|
2828
|
+
type: "url";
|
|
2829
|
+
/** Url */
|
|
2830
|
+
url: string;
|
|
2831
|
+
};
|
|
2832
|
+
/** URLPDFSource */
|
|
2833
|
+
URLPDFSource: {
|
|
2834
|
+
/**
|
|
2835
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2836
|
+
* @enum {string}
|
|
2837
|
+
*/
|
|
2838
|
+
type: "url";
|
|
2839
|
+
/** Url */
|
|
2840
|
+
url: string;
|
|
2841
|
+
};
|
|
2842
|
+
/** Usage */
|
|
2843
|
+
Usage: {
|
|
2844
|
+
/**
|
|
2845
|
+
* @description Breakdown of cached tokens by TTL
|
|
2846
|
+
* @default null
|
|
2847
|
+
*/
|
|
2848
|
+
cache_creation: components["schemas"]["CacheCreation"] | null;
|
|
2849
|
+
/**
|
|
2850
|
+
* Cache Creation Input Tokens
|
|
2851
|
+
* @description The number of input tokens used to create the cache entry.
|
|
2852
|
+
* @default null
|
|
2853
|
+
* @example 2051
|
|
2854
|
+
*/
|
|
2855
|
+
cache_creation_input_tokens: number | null;
|
|
2856
|
+
/**
|
|
2857
|
+
* Cache Read Input Tokens
|
|
2858
|
+
* @description The number of input tokens read from the cache.
|
|
2859
|
+
* @default null
|
|
2860
|
+
* @example 2051
|
|
2861
|
+
*/
|
|
2862
|
+
cache_read_input_tokens: number | null;
|
|
2863
|
+
/**
|
|
2864
|
+
* Inference Geo
|
|
2865
|
+
* @description The geographic region where inference was performed for this request.
|
|
2866
|
+
* @default null
|
|
2867
|
+
*/
|
|
2868
|
+
inference_geo: string | null;
|
|
2869
|
+
/**
|
|
2870
|
+
* Input Tokens
|
|
2871
|
+
* @description The number of input tokens which were used.
|
|
2872
|
+
* @example 2095
|
|
2873
|
+
*/
|
|
2874
|
+
input_tokens: number;
|
|
2875
|
+
/**
|
|
2876
|
+
* Output Tokens
|
|
2877
|
+
* @description The number of output tokens which were used.
|
|
2878
|
+
* @example 503
|
|
2879
|
+
*/
|
|
2880
|
+
output_tokens: number;
|
|
2881
|
+
/**
|
|
2882
|
+
* @description The number of server tool requests.
|
|
2883
|
+
* @default null
|
|
2884
|
+
*/
|
|
2885
|
+
server_tool_use: components["schemas"]["ServerToolUsage"] | null;
|
|
2886
|
+
/**
|
|
2887
|
+
* Service Tier
|
|
2888
|
+
* @description If the request used the priority, standard, or batch tier.
|
|
2889
|
+
* @default null
|
|
2890
|
+
*/
|
|
2891
|
+
service_tier: ("standard" | "priority" | "batch") | null;
|
|
2892
|
+
};
|
|
2893
|
+
/** UserLocation */
|
|
2894
|
+
UserLocation: {
|
|
2895
|
+
/**
|
|
2896
|
+
* City
|
|
2897
|
+
* @description The city of the user.
|
|
2898
|
+
* @example New York
|
|
2899
|
+
* @example Tokyo
|
|
2900
|
+
* @example Los Angeles
|
|
2901
|
+
*/
|
|
2902
|
+
city?: string | null;
|
|
2903
|
+
/**
|
|
2904
|
+
* Country
|
|
2905
|
+
* @description The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.
|
|
2906
|
+
* @example US
|
|
2907
|
+
* @example JP
|
|
2908
|
+
* @example GB
|
|
2909
|
+
*/
|
|
2910
|
+
country?: string | null;
|
|
2911
|
+
/**
|
|
2912
|
+
* Region
|
|
2913
|
+
* @description The region of the user.
|
|
2914
|
+
* @example California
|
|
2915
|
+
* @example Ontario
|
|
2916
|
+
* @example Wales
|
|
2917
|
+
*/
|
|
2918
|
+
region?: string | null;
|
|
2919
|
+
/**
|
|
2920
|
+
* Timezone
|
|
2921
|
+
* @description The [IANA timezone](https://nodatime.org/TimeZones) of the user.
|
|
2922
|
+
* @example America/New_York
|
|
2923
|
+
* @example Asia/Tokyo
|
|
2924
|
+
* @example Europe/London
|
|
2925
|
+
*/
|
|
2926
|
+
timezone?: string | null;
|
|
2927
|
+
/**
|
|
2928
|
+
* Type
|
|
2929
|
+
* @constant
|
|
2930
|
+
*/
|
|
2931
|
+
type: "approximate";
|
|
2932
|
+
};
|
|
2933
|
+
/**
|
|
2934
|
+
* WebFetchToolResultErrorCode
|
|
2935
|
+
* @enum {string}
|
|
2936
|
+
*/
|
|
2937
|
+
WebFetchToolResultErrorCode: "invalid_tool_input" | "url_too_long" | "url_not_allowed" | "url_not_accessible" | "unsupported_content_type" | "too_many_requests" | "max_uses_exceeded" | "unavailable";
|
|
2938
|
+
/** WebFetchTool_20250910 */
|
|
2939
|
+
WebFetchTool_20250910: {
|
|
2940
|
+
/** Allowed Callers */
|
|
2941
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
2942
|
+
/**
|
|
2943
|
+
* Allowed Domains
|
|
2944
|
+
* @description List of domains to allow fetching from
|
|
2945
|
+
*/
|
|
2946
|
+
allowed_domains?: string[] | null;
|
|
2947
|
+
/**
|
|
2948
|
+
* Blocked Domains
|
|
2949
|
+
* @description List of domains to block fetching from
|
|
2950
|
+
*/
|
|
2951
|
+
blocked_domains?: string[] | null;
|
|
2952
|
+
/**
|
|
2953
|
+
* Cache Control
|
|
2954
|
+
* @description Create a cache control breakpoint at this content block.
|
|
2955
|
+
*/
|
|
2956
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
2957
|
+
/** @description Citations configuration for fetched documents. Citations are disabled by default. */
|
|
2958
|
+
citations?: components["schemas"]["RequestCitationsConfig"] | null;
|
|
2959
|
+
/**
|
|
2960
|
+
* Defer Loading
|
|
2961
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
2962
|
+
*/
|
|
2963
|
+
defer_loading?: boolean;
|
|
2964
|
+
/**
|
|
2965
|
+
* Max Content Tokens
|
|
2966
|
+
* @description Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
|
|
2967
|
+
*/
|
|
2968
|
+
max_content_tokens?: number | null;
|
|
2969
|
+
/**
|
|
2970
|
+
* Max Uses
|
|
2971
|
+
* @description Maximum number of times the tool can be used in the API request.
|
|
2972
|
+
*/
|
|
2973
|
+
max_uses?: number | null;
|
|
2974
|
+
/**
|
|
2975
|
+
* Name
|
|
2976
|
+
* @description Name of the tool.
|
|
2977
|
+
*
|
|
2978
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
2979
|
+
* @constant
|
|
2980
|
+
*/
|
|
2981
|
+
name: "web_fetch";
|
|
2982
|
+
/**
|
|
2983
|
+
* Strict
|
|
2984
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
2985
|
+
*/
|
|
2986
|
+
strict?: boolean;
|
|
2987
|
+
/**
|
|
2988
|
+
* Type
|
|
2989
|
+
* @constant
|
|
2990
|
+
*/
|
|
2991
|
+
type: "web_fetch_20250910";
|
|
2992
|
+
};
|
|
2993
|
+
/** WebFetchTool_20260209 */
|
|
2994
|
+
WebFetchTool_20260209: {
|
|
2995
|
+
/** Allowed Callers */
|
|
2996
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
2997
|
+
/**
|
|
2998
|
+
* Allowed Domains
|
|
2999
|
+
* @description List of domains to allow fetching from
|
|
3000
|
+
*/
|
|
3001
|
+
allowed_domains?: string[] | null;
|
|
3002
|
+
/**
|
|
3003
|
+
* Blocked Domains
|
|
3004
|
+
* @description List of domains to block fetching from
|
|
3005
|
+
*/
|
|
3006
|
+
blocked_domains?: string[] | null;
|
|
3007
|
+
/**
|
|
3008
|
+
* Cache Control
|
|
3009
|
+
* @description Create a cache control breakpoint at this content block.
|
|
3010
|
+
*/
|
|
3011
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
3012
|
+
/** @description Citations configuration for fetched documents. Citations are disabled by default. */
|
|
3013
|
+
citations?: components["schemas"]["RequestCitationsConfig"] | null;
|
|
3014
|
+
/**
|
|
3015
|
+
* Defer Loading
|
|
3016
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
3017
|
+
*/
|
|
3018
|
+
defer_loading?: boolean;
|
|
3019
|
+
/**
|
|
3020
|
+
* Max Content Tokens
|
|
3021
|
+
* @description Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
|
|
3022
|
+
*/
|
|
3023
|
+
max_content_tokens?: number | null;
|
|
3024
|
+
/**
|
|
3025
|
+
* Max Uses
|
|
3026
|
+
* @description Maximum number of times the tool can be used in the API request.
|
|
3027
|
+
*/
|
|
3028
|
+
max_uses?: number | null;
|
|
3029
|
+
/**
|
|
3030
|
+
* Name
|
|
3031
|
+
* @description Name of the tool.
|
|
3032
|
+
*
|
|
3033
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
3034
|
+
* @constant
|
|
3035
|
+
*/
|
|
3036
|
+
name: "web_fetch";
|
|
3037
|
+
/**
|
|
3038
|
+
* Strict
|
|
3039
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
3040
|
+
*/
|
|
3041
|
+
strict?: boolean;
|
|
3042
|
+
/**
|
|
3043
|
+
* Type
|
|
3044
|
+
* @constant
|
|
3045
|
+
*/
|
|
3046
|
+
type: "web_fetch_20260209";
|
|
3047
|
+
};
|
|
3048
|
+
/**
|
|
3049
|
+
* WebFetchTool_20260309
|
|
3050
|
+
* @description Web fetch tool with use_cache parameter for bypassing cached content.
|
|
3051
|
+
*/
|
|
3052
|
+
WebFetchTool_20260309: {
|
|
3053
|
+
/** Allowed Callers */
|
|
3054
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
3055
|
+
/**
|
|
3056
|
+
* Allowed Domains
|
|
3057
|
+
* @description List of domains to allow fetching from
|
|
3058
|
+
*/
|
|
3059
|
+
allowed_domains?: string[] | null;
|
|
3060
|
+
/**
|
|
3061
|
+
* Blocked Domains
|
|
3062
|
+
* @description List of domains to block fetching from
|
|
3063
|
+
*/
|
|
3064
|
+
blocked_domains?: string[] | null;
|
|
3065
|
+
/**
|
|
3066
|
+
* Cache Control
|
|
3067
|
+
* @description Create a cache control breakpoint at this content block.
|
|
3068
|
+
*/
|
|
3069
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
3070
|
+
/** @description Citations configuration for fetched documents. Citations are disabled by default. */
|
|
3071
|
+
citations?: components["schemas"]["RequestCitationsConfig"] | null;
|
|
3072
|
+
/**
|
|
3073
|
+
* Defer Loading
|
|
3074
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
3075
|
+
*/
|
|
3076
|
+
defer_loading?: boolean;
|
|
3077
|
+
/**
|
|
3078
|
+
* Max Content Tokens
|
|
3079
|
+
* @description Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
|
|
3080
|
+
*/
|
|
3081
|
+
max_content_tokens?: number | null;
|
|
3082
|
+
/**
|
|
3083
|
+
* Max Uses
|
|
3084
|
+
* @description Maximum number of times the tool can be used in the API request.
|
|
3085
|
+
*/
|
|
3086
|
+
max_uses?: number | null;
|
|
3087
|
+
/**
|
|
3088
|
+
* Name
|
|
3089
|
+
* @description Name of the tool.
|
|
3090
|
+
*
|
|
3091
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
3092
|
+
* @constant
|
|
3093
|
+
*/
|
|
3094
|
+
name: "web_fetch";
|
|
3095
|
+
/**
|
|
3096
|
+
* Strict
|
|
3097
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
3098
|
+
*/
|
|
3099
|
+
strict?: boolean;
|
|
3100
|
+
/**
|
|
3101
|
+
* Type
|
|
3102
|
+
* @constant
|
|
3103
|
+
*/
|
|
3104
|
+
type: "web_fetch_20260309";
|
|
3105
|
+
/**
|
|
3106
|
+
* Use Cache
|
|
3107
|
+
* @description Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
|
|
3108
|
+
*/
|
|
3109
|
+
use_cache?: boolean;
|
|
3110
|
+
};
|
|
3111
|
+
/**
|
|
3112
|
+
* WebSearchToolResultErrorCode
|
|
3113
|
+
* @enum {string}
|
|
3114
|
+
*/
|
|
3115
|
+
WebSearchToolResultErrorCode: "invalid_tool_input" | "unavailable" | "max_uses_exceeded" | "too_many_requests" | "query_too_long" | "request_too_large";
|
|
3116
|
+
/** WebSearchTool_20250305 */
|
|
3117
|
+
WebSearchTool_20250305: {
|
|
3118
|
+
/** Allowed Callers */
|
|
3119
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
3120
|
+
/**
|
|
3121
|
+
* Allowed Domains
|
|
3122
|
+
* @description If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.
|
|
3123
|
+
*/
|
|
3124
|
+
allowed_domains?: string[] | null;
|
|
3125
|
+
/**
|
|
3126
|
+
* Blocked Domains
|
|
3127
|
+
* @description If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.
|
|
3128
|
+
*/
|
|
3129
|
+
blocked_domains?: string[] | null;
|
|
3130
|
+
/**
|
|
3131
|
+
* Cache Control
|
|
3132
|
+
* @description Create a cache control breakpoint at this content block.
|
|
3133
|
+
*/
|
|
3134
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
3135
|
+
/**
|
|
3136
|
+
* Defer Loading
|
|
3137
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
3138
|
+
*/
|
|
3139
|
+
defer_loading?: boolean;
|
|
3140
|
+
/**
|
|
3141
|
+
* Max Uses
|
|
3142
|
+
* @description Maximum number of times the tool can be used in the API request.
|
|
3143
|
+
*/
|
|
3144
|
+
max_uses?: number | null;
|
|
3145
|
+
/**
|
|
3146
|
+
* Name
|
|
3147
|
+
* @description Name of the tool.
|
|
3148
|
+
*
|
|
3149
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
3150
|
+
* @constant
|
|
3151
|
+
*/
|
|
3152
|
+
name: "web_search";
|
|
3153
|
+
/**
|
|
3154
|
+
* Strict
|
|
3155
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
3156
|
+
*/
|
|
3157
|
+
strict?: boolean;
|
|
3158
|
+
/**
|
|
3159
|
+
* Type
|
|
3160
|
+
* @constant
|
|
3161
|
+
*/
|
|
3162
|
+
type: "web_search_20250305";
|
|
3163
|
+
/** @description Parameters for the user's location. Used to provide more relevant search results. */
|
|
3164
|
+
user_location?: components["schemas"]["UserLocation"] | null;
|
|
3165
|
+
};
|
|
3166
|
+
/** WebSearchTool_20260209 */
|
|
3167
|
+
WebSearchTool_20260209: {
|
|
3168
|
+
/** Allowed Callers */
|
|
3169
|
+
allowed_callers?: components["schemas"]["AllowedCaller"][];
|
|
3170
|
+
/**
|
|
3171
|
+
* Allowed Domains
|
|
3172
|
+
* @description If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.
|
|
3173
|
+
*/
|
|
3174
|
+
allowed_domains?: string[] | null;
|
|
3175
|
+
/**
|
|
3176
|
+
* Blocked Domains
|
|
3177
|
+
* @description If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.
|
|
3178
|
+
*/
|
|
3179
|
+
blocked_domains?: string[] | null;
|
|
3180
|
+
/**
|
|
3181
|
+
* Cache Control
|
|
3182
|
+
* @description Create a cache control breakpoint at this content block.
|
|
3183
|
+
*/
|
|
3184
|
+
cache_control?: components["schemas"]["CacheControlEphemeral"] | null;
|
|
3185
|
+
/**
|
|
3186
|
+
* Defer Loading
|
|
3187
|
+
* @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
|
|
3188
|
+
*/
|
|
3189
|
+
defer_loading?: boolean;
|
|
3190
|
+
/**
|
|
3191
|
+
* Max Uses
|
|
3192
|
+
* @description Maximum number of times the tool can be used in the API request.
|
|
3193
|
+
*/
|
|
3194
|
+
max_uses?: number | null;
|
|
3195
|
+
/**
|
|
3196
|
+
* Name
|
|
3197
|
+
* @description Name of the tool.
|
|
3198
|
+
*
|
|
3199
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
3200
|
+
* @constant
|
|
3201
|
+
*/
|
|
3202
|
+
name: "web_search";
|
|
3203
|
+
/**
|
|
3204
|
+
* Strict
|
|
3205
|
+
* @description When true, guarantees schema validation on tool names and inputs
|
|
3206
|
+
*/
|
|
3207
|
+
strict?: boolean;
|
|
3208
|
+
/**
|
|
3209
|
+
* Type
|
|
3210
|
+
* @constant
|
|
3211
|
+
*/
|
|
3212
|
+
type: "web_search_20260209";
|
|
3213
|
+
/** @description Parameters for the user's location. Used to provide more relevant search results. */
|
|
3214
|
+
user_location?: components["schemas"]["UserLocation"] | null;
|
|
3215
|
+
};
|
|
3216
|
+
AnthropicBeta: string | ("message-batches-2024-09-24" | "prompt-caching-2024-07-31" | "computer-use-2024-10-22" | "computer-use-2025-01-24" | "pdfs-2024-09-25" | "token-counting-2024-11-01" | "token-efficient-tools-2025-02-19" | "output-128k-2025-02-19" | "files-api-2025-04-14" | "mcp-client-2025-04-04" | "mcp-client-2025-11-20" | "dev-full-thinking-2025-05-14" | "interleaved-thinking-2025-05-14" | "code-execution-2025-05-22" | "extended-cache-ttl-2025-04-11" | "context-1m-2025-08-07" | "context-management-2025-06-27" | "model-context-window-exceeded-2025-08-26" | "skills-2025-10-02" | "fast-mode-2026-02-01" | "output-300k-2026-03-24" | "advisor-tool-2026-03-01");
|
|
3217
|
+
/**
|
|
3218
|
+
* Thinking
|
|
3219
|
+
* @description Configuration for enabling Claude's extended thinking.
|
|
3220
|
+
*
|
|
3221
|
+
* When enabled, responses include `thinking` content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your `max_tokens` limit.
|
|
3222
|
+
*
|
|
3223
|
+
* See [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.
|
|
3224
|
+
* @example {
|
|
3225
|
+
* "type": "adaptive"
|
|
3226
|
+
* }
|
|
3227
|
+
*/
|
|
3228
|
+
ThinkingConfigParam: components["schemas"]["ThinkingConfigEnabled"] | components["schemas"]["ThinkingConfigDisabled"] | components["schemas"]["ThinkingConfigAdaptive"];
|
|
3229
|
+
/**
|
|
3230
|
+
* Tool Choice
|
|
3231
|
+
* @description How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.
|
|
3232
|
+
*/
|
|
3233
|
+
ToolChoice: components["schemas"]["ToolChoiceAuto"] | components["schemas"]["ToolChoiceAny"] | components["schemas"]["ToolChoiceTool"] | components["schemas"]["ToolChoiceNone"];
|
|
3234
|
+
ContentBlock: components["schemas"]["ResponseTextBlock"] | components["schemas"]["ResponseThinkingBlock"] | components["schemas"]["ResponseRedactedThinkingBlock"] | components["schemas"]["ResponseToolUseBlock"] | components["schemas"]["ResponseServerToolUseBlock"] | components["schemas"]["ResponseWebSearchToolResultBlock"] | components["schemas"]["ResponseWebFetchToolResultBlock"] | components["schemas"]["ResponseCodeExecutionToolResultBlock"] | components["schemas"]["ResponseBashCodeExecutionToolResultBlock"] | components["schemas"]["ResponseTextEditorCodeExecutionToolResultBlock"] | components["schemas"]["ResponseToolSearchToolResultBlock"] | components["schemas"]["ResponseContainerUploadBlock"];
|
|
3235
|
+
InputContentBlock: components["schemas"]["RequestTextBlock"] | components["schemas"]["RequestImageBlock"] | components["schemas"]["RequestDocumentBlock"] | components["schemas"]["RequestSearchResultBlock"] | components["schemas"]["RequestThinkingBlock"] | components["schemas"]["RequestRedactedThinkingBlock"] | components["schemas"]["RequestToolUseBlock"] | components["schemas"]["RequestToolResultBlock"] | components["schemas"]["RequestServerToolUseBlock"] | components["schemas"]["RequestWebSearchToolResultBlock"] | components["schemas"]["RequestWebFetchToolResultBlock"] | components["schemas"]["RequestCodeExecutionToolResultBlock"] | components["schemas"]["RequestBashCodeExecutionToolResultBlock"] | components["schemas"]["RequestTextEditorCodeExecutionToolResultBlock"] | components["schemas"]["RequestToolSearchToolResultBlock"] | components["schemas"]["RequestContainerUploadBlock"];
|
|
3236
|
+
/** @enum {string} */
|
|
3237
|
+
StopReason: "end_turn" | "max_tokens" | "stop_sequence" | "tool_use" | "pause_turn" | "refusal";
|
|
3238
|
+
/**
|
|
3239
|
+
* Model
|
|
3240
|
+
* @description The model that will complete your prompt.\n\nSee [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.
|
|
3241
|
+
*/
|
|
3242
|
+
Model: string | "claude-mythos-preview" | "claude-opus-4-6" | "claude-sonnet-4-6" | "claude-haiku-4-5" | "claude-haiku-4-5-20251001" | "claude-opus-4-5" | "claude-opus-4-5-20251101" | "claude-sonnet-4-5" | "claude-sonnet-4-5-20250929" | "claude-opus-4-1" | "claude-opus-4-1-20250805" | "claude-opus-4-0" | "claude-opus-4-20250514" | "claude-sonnet-4-0" | "claude-sonnet-4-20250514" | "claude-3-haiku-20240307";
|
|
3243
|
+
};
|
|
3244
|
+
responses: never;
|
|
3245
|
+
parameters: never;
|
|
3246
|
+
requestBodies: never;
|
|
3247
|
+
headers: never;
|
|
3248
|
+
pathItems: never;
|
|
3249
|
+
}
|
|
3250
|
+
export type $defs = Record<string, never>;
|
|
3251
|
+
export interface operations {
|
|
3252
|
+
messages_post: {
|
|
3253
|
+
parameters: {
|
|
3254
|
+
query?: never;
|
|
3255
|
+
header?: {
|
|
3256
|
+
/** @description The version of the Claude API you want to use.
|
|
3257
|
+
*
|
|
3258
|
+
* Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning). */
|
|
3259
|
+
"anthropic-version"?: string;
|
|
3260
|
+
};
|
|
3261
|
+
path?: never;
|
|
3262
|
+
cookie?: never;
|
|
3263
|
+
};
|
|
3264
|
+
requestBody: {
|
|
3265
|
+
content: {
|
|
3266
|
+
"application/json": components["schemas"]["CreateMessageParams"];
|
|
3267
|
+
};
|
|
3268
|
+
};
|
|
3269
|
+
responses: {
|
|
3270
|
+
/** @description Message object. */
|
|
3271
|
+
200: {
|
|
3272
|
+
headers: {
|
|
3273
|
+
[name: string]: unknown;
|
|
3274
|
+
};
|
|
3275
|
+
content: {
|
|
3276
|
+
"application/json": components["schemas"]["Message"];
|
|
3277
|
+
};
|
|
3278
|
+
};
|
|
3279
|
+
/** @description Error response.
|
|
3280
|
+
*
|
|
3281
|
+
* See our [errors documentation](https://docs.claude.com/en/api/errors) for more details. */
|
|
3282
|
+
"4XX": {
|
|
3283
|
+
headers: {
|
|
3284
|
+
[name: string]: unknown;
|
|
3285
|
+
};
|
|
3286
|
+
content: {
|
|
3287
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3288
|
+
};
|
|
3289
|
+
};
|
|
3290
|
+
};
|
|
3291
|
+
};
|
|
3292
|
+
models_list: {
|
|
3293
|
+
parameters: {
|
|
3294
|
+
query?: {
|
|
3295
|
+
/** @description ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. */
|
|
3296
|
+
before_id?: string;
|
|
3297
|
+
/** @description ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. */
|
|
3298
|
+
after_id?: string;
|
|
3299
|
+
/** @description Number of items to return per page.
|
|
3300
|
+
*
|
|
3301
|
+
* Defaults to `20`. Ranges from `1` to `1000`. */
|
|
3302
|
+
limit?: number;
|
|
3303
|
+
};
|
|
3304
|
+
header?: {
|
|
3305
|
+
/** @description The version of the Claude API you want to use.
|
|
3306
|
+
*
|
|
3307
|
+
* Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning). */
|
|
3308
|
+
"anthropic-version"?: string;
|
|
3309
|
+
/** @description Your unique API key for authentication.
|
|
3310
|
+
*
|
|
3311
|
+
* This key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace. */
|
|
3312
|
+
"x-api-key"?: string;
|
|
3313
|
+
/** @description Optional header to specify the beta version(s) you want to use.
|
|
3314
|
+
*
|
|
3315
|
+
* To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta. */
|
|
3316
|
+
"anthropic-beta"?: string;
|
|
3317
|
+
};
|
|
3318
|
+
path?: never;
|
|
3319
|
+
cookie?: never;
|
|
3320
|
+
};
|
|
3321
|
+
requestBody?: never;
|
|
3322
|
+
responses: {
|
|
3323
|
+
/** @description Successful Response */
|
|
3324
|
+
200: {
|
|
3325
|
+
headers: {
|
|
3326
|
+
[name: string]: unknown;
|
|
3327
|
+
};
|
|
3328
|
+
content: {
|
|
3329
|
+
"application/json": components["schemas"]["ListResponse_ModelInfo_"];
|
|
3330
|
+
};
|
|
3331
|
+
};
|
|
3332
|
+
/** @description Error response.
|
|
3333
|
+
*
|
|
3334
|
+
* See our [errors documentation](https://docs.claude.com/en/api/errors) for more details. */
|
|
3335
|
+
"4XX": {
|
|
3336
|
+
headers: {
|
|
3337
|
+
[name: string]: unknown;
|
|
3338
|
+
};
|
|
3339
|
+
content: {
|
|
3340
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3341
|
+
};
|
|
3342
|
+
};
|
|
3343
|
+
};
|
|
3344
|
+
};
|
|
3345
|
+
models_get: {
|
|
3346
|
+
parameters: {
|
|
3347
|
+
query?: never;
|
|
3348
|
+
header?: {
|
|
3349
|
+
/** @description The version of the Claude API you want to use.
|
|
3350
|
+
*
|
|
3351
|
+
* Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning). */
|
|
3352
|
+
"anthropic-version"?: string;
|
|
3353
|
+
/** @description Your unique API key for authentication.
|
|
3354
|
+
*
|
|
3355
|
+
* This key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace. */
|
|
3356
|
+
"x-api-key"?: string;
|
|
3357
|
+
/** @description Optional header to specify the beta version(s) you want to use.
|
|
3358
|
+
*
|
|
3359
|
+
* To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta. */
|
|
3360
|
+
"anthropic-beta"?: string;
|
|
3361
|
+
};
|
|
3362
|
+
path: {
|
|
3363
|
+
/** @description Model identifier or alias. */
|
|
3364
|
+
model_id: string;
|
|
3365
|
+
};
|
|
3366
|
+
cookie?: never;
|
|
3367
|
+
};
|
|
3368
|
+
requestBody?: never;
|
|
3369
|
+
responses: {
|
|
3370
|
+
/** @description Successful Response */
|
|
3371
|
+
200: {
|
|
3372
|
+
headers: {
|
|
3373
|
+
[name: string]: unknown;
|
|
3374
|
+
};
|
|
3375
|
+
content: {
|
|
3376
|
+
"application/json": components["schemas"]["ModelInfo"];
|
|
3377
|
+
};
|
|
3378
|
+
};
|
|
3379
|
+
/** @description Error response.
|
|
3380
|
+
*
|
|
3381
|
+
* See our [errors documentation](https://docs.claude.com/en/api/errors) for more details. */
|
|
3382
|
+
"4XX": {
|
|
3383
|
+
headers: {
|
|
3384
|
+
[name: string]: unknown;
|
|
3385
|
+
};
|
|
3386
|
+
content: {
|
|
3387
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3388
|
+
};
|
|
3389
|
+
};
|
|
3390
|
+
};
|
|
3391
|
+
};
|
|
3392
|
+
}
|