@effect/ai-anthropic 0.21.0 → 0.21.1

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/src/Generated.ts CHANGED
@@ -12,17 +12,11 @@ import * as S from "effect/Schema"
12
12
 
13
13
  export class MessagesPostParams extends S.Struct({
14
14
  /**
15
- * The version of the Anthropic API you want to use.
15
+ * The version of the Claude API you want to use.
16
16
  *
17
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
17
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
18
18
  */
19
- "anthropic-version": S.optionalWith(S.String, { nullable: true }),
20
- /**
21
- * Optional header to specify the beta version(s) you want to use.
22
- *
23
- * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
24
- */
25
- "anthropic-beta": S.optionalWith(S.String, { nullable: true })
19
+ "anthropic-version": S.optionalWith(S.String, { nullable: true })
26
20
  }) {}
27
21
 
28
22
  /**
@@ -45,6 +39,14 @@ export class Model extends S.Union(
45
39
  * Our fastest model
46
40
  */
47
41
  S.Literal("claude-3-5-haiku-20241022"),
42
+ /**
43
+ * Hybrid model, capable of near-instant responses and extended thinking
44
+ */
45
+ S.Literal("claude-haiku-4-5"),
46
+ /**
47
+ * Hybrid model, capable of near-instant responses and extended thinking
48
+ */
49
+ S.Literal("claude-haiku-4-5-20251001"),
48
50
  /**
49
51
  * High-performance model with extended thinking
50
52
  */
@@ -57,6 +59,14 @@ export class Model extends S.Union(
57
59
  * High-performance model with extended thinking
58
60
  */
59
61
  S.Literal("claude-4-sonnet-20250514"),
62
+ /**
63
+ * Our best model for real-world agents and coding
64
+ */
65
+ S.Literal("claude-sonnet-4-5"),
66
+ /**
67
+ * Our best model for real-world agents and coding
68
+ */
69
+ S.Literal("claude-sonnet-4-5-20250929"),
60
70
  /**
61
71
  * Our previous most intelligent model
62
72
  */
@@ -295,7 +305,10 @@ export class RequestToolResultBlock extends S.Class<RequestToolResultBlock>("Req
295
305
  */
296
306
  "cache_control": S.optionalWith(CacheControlEphemeral, { nullable: true }),
297
307
  "content": S.optionalWith(
298
- S.Union(S.String, S.Array(S.Union(RequestTextBlock, RequestImageBlock, RequestSearchResultBlock))),
308
+ S.Union(
309
+ S.String,
310
+ S.Array(S.Union(RequestTextBlock, RequestImageBlock, RequestSearchResultBlock, RequestDocumentBlock))
311
+ ),
299
312
  { nullable: true }
300
313
  ),
301
314
  "is_error": S.optionalWith(S.Boolean, { nullable: true }),
@@ -401,7 +414,7 @@ export class Metadata extends S.Class<Metadata>("Metadata")({
401
414
  /**
402
415
  * Determines whether to use priority capacity (if available) or standard capacity for this request.
403
416
  *
404
- * Anthropic offers different levels of service for your API requests. See [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
417
+ * Anthropic offers different levels of service for your API requests. See [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
405
418
  */
406
419
  export class CreateMessageParamsServiceTier extends S.Literal("auto", "standard_only") {}
407
420
 
@@ -411,7 +424,7 @@ export class ThinkingConfigEnabled extends S.Class<ThinkingConfigEnabled>("Think
411
424
  *
412
425
  * Must be ≥1024 and less than `max_tokens`.
413
426
  *
414
- * See [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) for details.
427
+ * See [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.
415
428
  */
416
429
  "budget_tokens": S.Int.pipe(S.greaterThanOrEqualTo(1024)),
417
430
  "type": S.Literal("enabled")
@@ -426,7 +439,7 @@ export class ThinkingConfigDisabled extends S.Class<ThinkingConfigDisabled>("Thi
426
439
  *
427
440
  * 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.
428
441
  *
429
- * See [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) for details.
442
+ * See [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.
430
443
  */
431
444
  export class ThinkingConfigParam extends S.Union(ThinkingConfigEnabled, ThinkingConfigDisabled) {}
432
445
 
@@ -628,7 +641,7 @@ export class WebSearchTool20250305 extends S.Class<WebSearchTool20250305>("WebSe
628
641
  }) {}
629
642
 
630
643
  export class CreateMessageParams extends S.Class<CreateMessageParams>("CreateMessageParams")({
631
- "model": Model,
644
+ "model": S.Union(S.String, Model),
632
645
  /**
633
646
  * Input messages.
634
647
  *
@@ -673,9 +686,9 @@ export class CreateMessageParams extends S.Class<CreateMessageParams>("CreateMes
673
686
  * {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
674
687
  * ```
675
688
  *
676
- * See [input examples](https://docs.anthropic.com/en/api/messages-examples).
689
+ * See [input examples](https://docs.claude.com/en/api/messages-examples).
677
690
  *
678
- * Note that if you want to include a [system prompt](https://docs.anthropic.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.
691
+ * 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.
679
692
  *
680
693
  * There is a limit of 100,000 messages in a single request.
681
694
  */
@@ -685,7 +698,7 @@ export class CreateMessageParams extends S.Class<CreateMessageParams>("CreateMes
685
698
  *
686
699
  * Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.
687
700
  *
688
- * Different models have different maximum values for this parameter. See [models](https://docs.anthropic.com/en/docs/models-overview) for details.
701
+ * Different models have different maximum values for this parameter. See [models](https://docs.claude.com/en/docs/models-overview) for details.
689
702
  */
690
703
  "max_tokens": S.Int.pipe(S.greaterThanOrEqualTo(1)),
691
704
  /**
@@ -695,7 +708,7 @@ export class CreateMessageParams extends S.Class<CreateMessageParams>("CreateMes
695
708
  /**
696
709
  * Determines whether to use priority capacity (if available) or standard capacity for this request.
697
710
  *
698
- * Anthropic offers different levels of service for your API requests. See [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
711
+ * Anthropic offers different levels of service for your API requests. See [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
699
712
  */
700
713
  "service_tier": S.optionalWith(CreateMessageParamsServiceTier, { nullable: true }),
701
714
  /**
@@ -709,13 +722,13 @@ export class CreateMessageParams extends S.Class<CreateMessageParams>("CreateMes
709
722
  /**
710
723
  * Whether to incrementally stream the response using server-sent events.
711
724
  *
712
- * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for details.
725
+ * See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
713
726
  */
714
727
  "stream": S.optionalWith(S.Boolean, { nullable: true }),
715
728
  /**
716
729
  * System prompt.
717
730
  *
718
- * 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.anthropic.com/en/docs/system-prompts).
731
+ * 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).
719
732
  */
720
733
  "system": S.optionalWith(S.Union(S.String, S.Array(RequestTextBlock)), { nullable: true }),
721
734
  /**
@@ -733,7 +746,7 @@ export class CreateMessageParams extends S.Class<CreateMessageParams>("CreateMes
733
746
  *
734
747
  * 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.
735
748
  *
736
- * There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.anthropic.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.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
749
+ * 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)).
737
750
  *
738
751
  * Each tool definition includes:
739
752
  *
@@ -789,7 +802,7 @@ export class CreateMessageParams extends S.Class<CreateMessageParams>("CreateMes
789
802
  *
790
803
  * 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.
791
804
  *
792
- * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
805
+ * See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
793
806
  */
794
807
  "tools": S.optionalWith(
795
808
  S.Array(
@@ -1101,7 +1114,7 @@ export class Message extends S.Class<Message>("Message")({
1101
1114
  * ```
1102
1115
  */
1103
1116
  "content": S.Array(ContentBlock),
1104
- "model": Model,
1117
+ "model": S.Union(S.String, Model),
1105
1118
  /**
1106
1119
  * The reason that we stopped.
1107
1120
  *
@@ -1217,9 +1230,9 @@ export class ErrorResponse extends S.Class<ErrorResponse>("ErrorResponse")({
1217
1230
 
1218
1231
  export class CompletePostParams extends S.Struct({
1219
1232
  /**
1220
- * The version of the Anthropic API you want to use.
1233
+ * The version of the Claude API you want to use.
1221
1234
  *
1222
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
1235
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
1223
1236
  */
1224
1237
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
1225
1238
  /**
@@ -1231,7 +1244,7 @@ export class CompletePostParams extends S.Struct({
1231
1244
  }) {}
1232
1245
 
1233
1246
  export class CompletionRequest extends S.Class<CompletionRequest>("CompletionRequest")({
1234
- "model": Model,
1247
+ "model": S.Union(S.String, Model),
1235
1248
  /**
1236
1249
  * The prompt that you want Claude to complete.
1237
1250
  *
@@ -1241,7 +1254,7 @@ export class CompletionRequest extends S.Class<CompletionRequest>("CompletionReq
1241
1254
  * "\n\nHuman: {userQuestion}\n\nAssistant:"
1242
1255
  * ```
1243
1256
  *
1244
- * See [prompt validation](https://docs.anthropic.com/en/api/prompt-validation) and our guide to [prompt design](https://docs.anthropic.com/en/docs/intro-to-prompting) for more details.
1257
+ * See [prompt validation](https://docs.claude.com/en/api/prompt-validation) and our guide to [prompt design](https://docs.claude.com/en/docs/intro-to-prompting) for more details.
1245
1258
  */
1246
1259
  "prompt": S.String.pipe(S.minLength(1)),
1247
1260
  /**
@@ -1287,7 +1300,7 @@ export class CompletionRequest extends S.Class<CompletionRequest>("CompletionReq
1287
1300
  /**
1288
1301
  * Whether to incrementally stream the response using server-sent events.
1289
1302
  *
1290
- * See [streaming](https://docs.anthropic.com/en/api/streaming) for details.
1303
+ * See [streaming](https://docs.claude.com/en/api/streaming) for details.
1291
1304
  */
1292
1305
  "stream": S.optionalWith(S.Boolean, { nullable: true })
1293
1306
  }) {}
@@ -1303,7 +1316,7 @@ export class CompletionResponse extends S.Class<CompletionResponse>("CompletionR
1303
1316
  * The format and length of IDs may change over time.
1304
1317
  */
1305
1318
  "id": S.String,
1306
- "model": Model,
1319
+ "model": S.Union(S.String, Model),
1307
1320
  /**
1308
1321
  * The reason that we stopped.
1309
1322
  *
@@ -1339,9 +1352,9 @@ export class ModelsListParams extends S.Struct({
1339
1352
  default: () => 20 as const
1340
1353
  }),
1341
1354
  /**
1342
- * The version of the Anthropic API you want to use.
1355
+ * The version of the Claude API you want to use.
1343
1356
  *
1344
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
1357
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
1345
1358
  */
1346
1359
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
1347
1360
  /**
@@ -1397,9 +1410,9 @@ export class ListResponseModelInfo extends S.Class<ListResponseModelInfo>("ListR
1397
1410
 
1398
1411
  export class ModelsGetParams extends S.Struct({
1399
1412
  /**
1400
- * The version of the Anthropic API you want to use.
1413
+ * The version of the Claude API you want to use.
1401
1414
  *
1402
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
1415
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
1403
1416
  */
1404
1417
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
1405
1418
  /**
@@ -1435,9 +1448,9 @@ export class MessageBatchesListParams extends S.Struct({
1435
1448
  default: () => 20 as const
1436
1449
  }),
1437
1450
  /**
1438
- * The version of the Anthropic API you want to use.
1451
+ * The version of the Claude API you want to use.
1439
1452
  *
1440
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
1453
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
1441
1454
  */
1442
1455
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
1443
1456
  /**
@@ -1555,9 +1568,9 @@ export class ListResponseMessageBatch extends S.Class<ListResponseMessageBatch>(
1555
1568
 
1556
1569
  export class MessageBatchesPostParams extends S.Struct({
1557
1570
  /**
1558
- * The version of the Anthropic API you want to use.
1571
+ * The version of the Claude API you want to use.
1559
1572
  *
1560
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
1573
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
1561
1574
  */
1562
1575
  "anthropic-version": S.optionalWith(S.String, { nullable: true })
1563
1576
  }) {}
@@ -1588,9 +1601,9 @@ export class CreateMessageBatchParams extends S.Class<CreateMessageBatchParams>(
1588
1601
 
1589
1602
  export class MessageBatchesRetrieveParams extends S.Struct({
1590
1603
  /**
1591
- * The version of the Anthropic API you want to use.
1604
+ * The version of the Claude API you want to use.
1592
1605
  *
1593
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
1606
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
1594
1607
  */
1595
1608
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
1596
1609
  /**
@@ -1603,9 +1616,9 @@ export class MessageBatchesRetrieveParams extends S.Struct({
1603
1616
 
1604
1617
  export class MessageBatchesDeleteParams extends S.Struct({
1605
1618
  /**
1606
- * The version of the Anthropic API you want to use.
1619
+ * The version of the Claude API you want to use.
1607
1620
  *
1608
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
1621
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
1609
1622
  */
1610
1623
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
1611
1624
  /**
@@ -1634,18 +1647,18 @@ export class DeleteMessageBatchResponse extends S.Class<DeleteMessageBatchRespon
1634
1647
 
1635
1648
  export class MessageBatchesCancelParams extends S.Struct({
1636
1649
  /**
1637
- * The version of the Anthropic API you want to use.
1650
+ * The version of the Claude API you want to use.
1638
1651
  *
1639
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
1652
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
1640
1653
  */
1641
1654
  "anthropic-version": S.optionalWith(S.String, { nullable: true })
1642
1655
  }) {}
1643
1656
 
1644
1657
  export class MessageBatchesResultsParams extends S.Struct({
1645
1658
  /**
1646
- * The version of the Anthropic API you want to use.
1659
+ * The version of the Claude API you want to use.
1647
1660
  *
1648
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
1661
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
1649
1662
  */
1650
1663
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
1651
1664
  /**
@@ -1658,9 +1671,9 @@ export class MessageBatchesResultsParams extends S.Struct({
1658
1671
 
1659
1672
  export class MessagesCountTokensPostParams extends S.Struct({
1660
1673
  /**
1661
- * The version of the Anthropic API you want to use.
1674
+ * The version of the Claude API you want to use.
1662
1675
  *
1663
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
1676
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
1664
1677
  */
1665
1678
  "anthropic-version": S.optionalWith(S.String, { nullable: true })
1666
1679
  }) {}
@@ -1710,18 +1723,18 @@ export class CountMessageTokensParams extends S.Class<CountMessageTokensParams>(
1710
1723
  * {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
1711
1724
  * ```
1712
1725
  *
1713
- * See [input examples](https://docs.anthropic.com/en/api/messages-examples).
1726
+ * See [input examples](https://docs.claude.com/en/api/messages-examples).
1714
1727
  *
1715
- * Note that if you want to include a [system prompt](https://docs.anthropic.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.
1728
+ * 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.
1716
1729
  *
1717
1730
  * There is a limit of 100,000 messages in a single request.
1718
1731
  */
1719
1732
  "messages": S.Array(InputMessage),
1720
- "model": Model,
1733
+ "model": S.Union(S.String, Model),
1721
1734
  /**
1722
1735
  * System prompt.
1723
1736
  *
1724
- * 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.anthropic.com/en/docs/system-prompts).
1737
+ * 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).
1725
1738
  */
1726
1739
  "system": S.optionalWith(S.Union(S.String, S.Array(RequestTextBlock)), { nullable: true }),
1727
1740
  "thinking": S.optionalWith(ThinkingConfigParam, { nullable: true }),
@@ -1731,7 +1744,7 @@ export class CountMessageTokensParams extends S.Class<CountMessageTokensParams>(
1731
1744
  *
1732
1745
  * 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.
1733
1746
  *
1734
- * There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.anthropic.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.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
1747
+ * 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)).
1735
1748
  *
1736
1749
  * Each tool definition includes:
1737
1750
  *
@@ -1787,7 +1800,7 @@ export class CountMessageTokensParams extends S.Class<CountMessageTokensParams>(
1787
1800
  *
1788
1801
  * 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.
1789
1802
  *
1790
- * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
1803
+ * See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
1791
1804
  */
1792
1805
  "tools": S.optionalWith(
1793
1806
  S.Array(
@@ -1829,9 +1842,9 @@ export class ListFilesV1FilesGetParams extends S.Struct({
1829
1842
  */
1830
1843
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
1831
1844
  /**
1832
- * The version of the Anthropic API you want to use.
1845
+ * The version of the Claude API you want to use.
1833
1846
  *
1834
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
1847
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
1835
1848
  */
1836
1849
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
1837
1850
  /**
@@ -1904,9 +1917,9 @@ export class UploadFileV1FilesPostParams extends S.Struct({
1904
1917
  */
1905
1918
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
1906
1919
  /**
1907
- * The version of the Anthropic API you want to use.
1920
+ * The version of the Claude API you want to use.
1908
1921
  *
1909
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
1922
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
1910
1923
  */
1911
1924
  "anthropic-version": S.optionalWith(S.String, { nullable: true })
1912
1925
  }) {}
@@ -1928,9 +1941,9 @@ export class GetFileMetadataV1FilesFileIdGetParams extends S.Struct({
1928
1941
  */
1929
1942
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
1930
1943
  /**
1931
- * The version of the Anthropic API you want to use.
1944
+ * The version of the Claude API you want to use.
1932
1945
  *
1933
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
1946
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
1934
1947
  */
1935
1948
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
1936
1949
  /**
@@ -1949,9 +1962,9 @@ export class DeleteFileV1FilesFileIdDeleteParams extends S.Struct({
1949
1962
  */
1950
1963
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
1951
1964
  /**
1952
- * The version of the Anthropic API you want to use.
1965
+ * The version of the Claude API you want to use.
1953
1966
  *
1954
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
1967
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
1955
1968
  */
1956
1969
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
1957
1970
  /**
@@ -1983,9 +1996,9 @@ export class DownloadFileV1FilesFileIdContentGetParams extends S.Struct({
1983
1996
  */
1984
1997
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
1985
1998
  /**
1986
- * The version of the Anthropic API you want to use.
1999
+ * The version of the Claude API you want to use.
1987
2000
  *
1988
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
2001
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
1989
2002
  */
1990
2003
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
1991
2004
  /**
@@ -1996,7 +2009,27 @@ export class DownloadFileV1FilesFileIdContentGetParams extends S.Struct({
1996
2009
  "x-api-key": S.optionalWith(S.String, { nullable: true })
1997
2010
  }) {}
1998
2011
 
1999
- export class BetaMessagesPostParams extends S.Struct({
2012
+ export class ListSkillsV1SkillsGetParams extends S.Struct({
2013
+ /**
2014
+ * Pagination token for fetching a specific page of results.
2015
+ *
2016
+ * Pass the value from a previous response's `next_page` field to get the next page of results.
2017
+ */
2018
+ "page": S.optionalWith(S.String, { nullable: true }),
2019
+ /**
2020
+ * Number of results to return per page.
2021
+ *
2022
+ * Maximum value is 100. Defaults to 20.
2023
+ */
2024
+ "limit": S.optionalWith(S.Int, { nullable: true, default: () => 20 as const }),
2025
+ /**
2026
+ * Filter skills by source.
2027
+ *
2028
+ * If provided, only skills from the specified source will be returned:
2029
+ * * `"custom"`: only return user-created skills
2030
+ * * `"anthropic"`: only return Anthropic-created skills
2031
+ */
2032
+ "source": S.optionalWith(S.String, { nullable: true }),
2000
2033
  /**
2001
2034
  * Optional header to specify the beta version(s) you want to use.
2002
2035
  *
@@ -2004,150 +2037,678 @@ export class BetaMessagesPostParams extends S.Struct({
2004
2037
  */
2005
2038
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
2006
2039
  /**
2007
- * The version of the Anthropic API you want to use.
2040
+ * The version of the Claude API you want to use.
2008
2041
  *
2009
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
2042
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
2010
2043
  */
2011
- "anthropic-version": S.optionalWith(S.String, { nullable: true })
2044
+ "anthropic-version": S.optionalWith(S.String, { nullable: true }),
2045
+ /**
2046
+ * Your unique API key for authentication.
2047
+ *
2048
+ * 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.
2049
+ */
2050
+ "x-api-key": S.optionalWith(S.String, { nullable: true })
2012
2051
  }) {}
2013
2052
 
2014
- /**
2015
- * The time-to-live for the cache control breakpoint.
2016
- *
2017
- * This may be one the following values:
2018
- * - `5m`: 5 minutes
2019
- * - `1h`: 1 hour
2020
- *
2021
- * Defaults to `5m`.
2022
- */
2023
- export class BetaCacheControlEphemeralTtl extends S.Literal("5m", "1h") {}
2024
-
2025
- export class BetaCacheControlEphemeral extends S.Class<BetaCacheControlEphemeral>("BetaCacheControlEphemeral")({
2053
+ export class Skill extends S.Class<Skill>("Skill")({
2026
2054
  /**
2027
- * The time-to-live for the cache control breakpoint.
2055
+ * ISO 8601 timestamp of when the skill was created.
2056
+ */
2057
+ "created_at": S.String,
2058
+ /**
2059
+ * Display title for the skill.
2028
2060
  *
2029
- * This may be one the following values:
2030
- * - `5m`: 5 minutes
2031
- * - `1h`: 1 hour
2061
+ * This is a human-readable label that is not included in the prompt sent to the model.
2062
+ */
2063
+ "display_title": S.NullOr(S.String),
2064
+ /**
2065
+ * Unique identifier for the skill.
2032
2066
  *
2033
- * Defaults to `5m`.
2067
+ * The format and length of IDs may change over time.
2034
2068
  */
2035
- "ttl": S.optionalWith(BetaCacheControlEphemeralTtl, { nullable: true }),
2036
- "type": S.Literal("ephemeral")
2069
+ "id": S.String,
2070
+ /**
2071
+ * The latest version identifier for the skill.
2072
+ *
2073
+ * This represents the most recent version of the skill that has been created.
2074
+ */
2075
+ "latest_version": S.NullOr(S.String),
2076
+ /**
2077
+ * Source of the skill.
2078
+ *
2079
+ * This may be one of the following values:
2080
+ * * `"custom"`: the skill was created by a user
2081
+ * * `"anthropic"`: the skill was created by Anthropic
2082
+ */
2083
+ "source": S.String,
2084
+ /**
2085
+ * Object type.
2086
+ *
2087
+ * For Skills, this is always `"skill"`.
2088
+ */
2089
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill" as const)),
2090
+ /**
2091
+ * ISO 8601 timestamp of when the skill was last updated.
2092
+ */
2093
+ "updated_at": S.String
2037
2094
  }) {}
2038
2095
 
2039
- export class BetaRequestCharLocationCitation
2040
- extends S.Class<BetaRequestCharLocationCitation>("BetaRequestCharLocationCitation")({
2041
- "cited_text": S.String,
2042
- "document_index": S.Int.pipe(S.greaterThanOrEqualTo(0)),
2043
- "document_title": S.NullOr(S.String.pipe(S.minLength(1), S.maxLength(255))),
2044
- "end_char_index": S.Int,
2045
- "start_char_index": S.Int.pipe(S.greaterThanOrEqualTo(0)),
2046
- "type": S.Literal("char_location")
2047
- })
2048
- {}
2049
-
2050
- export class BetaRequestPageLocationCitation
2051
- extends S.Class<BetaRequestPageLocationCitation>("BetaRequestPageLocationCitation")({
2052
- "cited_text": S.String,
2053
- "document_index": S.Int.pipe(S.greaterThanOrEqualTo(0)),
2054
- "document_title": S.NullOr(S.String.pipe(S.minLength(1), S.maxLength(255))),
2055
- "end_page_number": S.Int,
2056
- "start_page_number": S.Int.pipe(S.greaterThanOrEqualTo(1)),
2057
- "type": S.Literal("page_location")
2058
- })
2059
- {}
2060
-
2061
- export class BetaRequestContentBlockLocationCitation
2062
- extends S.Class<BetaRequestContentBlockLocationCitation>("BetaRequestContentBlockLocationCitation")({
2063
- "cited_text": S.String,
2064
- "document_index": S.Int.pipe(S.greaterThanOrEqualTo(0)),
2065
- "document_title": S.NullOr(S.String.pipe(S.minLength(1), S.maxLength(255))),
2066
- "end_block_index": S.Int,
2067
- "start_block_index": S.Int.pipe(S.greaterThanOrEqualTo(0)),
2068
- "type": S.Literal("content_block_location")
2069
- })
2070
- {}
2071
-
2072
- export class BetaRequestWebSearchResultLocationCitation
2073
- extends S.Class<BetaRequestWebSearchResultLocationCitation>("BetaRequestWebSearchResultLocationCitation")({
2074
- "cited_text": S.String,
2075
- "encrypted_index": S.String,
2076
- "title": S.NullOr(S.String.pipe(S.minLength(1), S.maxLength(512))),
2077
- "type": S.Literal("web_search_result_location"),
2078
- "url": S.String.pipe(S.minLength(1), S.maxLength(2048))
2079
- })
2080
- {}
2081
-
2082
- export class BetaRequestSearchResultLocationCitation
2083
- extends S.Class<BetaRequestSearchResultLocationCitation>("BetaRequestSearchResultLocationCitation")({
2084
- "cited_text": S.String,
2085
- "end_block_index": S.Int,
2086
- "search_result_index": S.Int.pipe(S.greaterThanOrEqualTo(0)),
2087
- "source": S.String,
2088
- "start_block_index": S.Int.pipe(S.greaterThanOrEqualTo(0)),
2089
- "title": S.NullOr(S.String),
2090
- "type": S.Literal("search_result_location")
2091
- })
2092
- {}
2093
-
2094
- export class BetaRequestTextBlock extends S.Class<BetaRequestTextBlock>("BetaRequestTextBlock")({
2096
+ export class ListSkillsResponse extends S.Class<ListSkillsResponse>("ListSkillsResponse")({
2095
2097
  /**
2096
- * Create a cache control breakpoint at this content block.
2098
+ * List of skills.
2097
2099
  */
2098
- "cache_control": S.optionalWith(BetaCacheControlEphemeral, { nullable: true }),
2099
- "citations": S.optionalWith(
2100
- S.Array(
2101
- S.Union(
2102
- BetaRequestCharLocationCitation,
2103
- BetaRequestPageLocationCitation,
2104
- BetaRequestContentBlockLocationCitation,
2105
- BetaRequestWebSearchResultLocationCitation,
2106
- BetaRequestSearchResultLocationCitation
2107
- )
2108
- ),
2109
- { nullable: true }
2110
- ),
2111
- "text": S.String.pipe(S.minLength(1)),
2112
- "type": S.Literal("text")
2100
+ "data": S.Array(Skill),
2101
+ /**
2102
+ * Whether there are more results available.
2103
+ *
2104
+ * If `true`, there are additional results that can be fetched using the `next_page` token.
2105
+ */
2106
+ "has_more": S.Boolean,
2107
+ /**
2108
+ * Token for fetching the next page of results.
2109
+ *
2110
+ * If `null`, there are no more results available. Pass this value to the `page_token` parameter in the next request to get the next page.
2111
+ */
2112
+ "next_page": S.NullOr(S.String)
2113
2113
  }) {}
2114
2114
 
2115
- export class BetaBase64ImageSourceMediaType extends S.Literal("image/jpeg", "image/png", "image/gif", "image/webp") {}
2116
-
2117
- export class BetaBase64ImageSource extends S.Class<BetaBase64ImageSource>("BetaBase64ImageSource")({
2118
- "data": S.String,
2119
- "media_type": BetaBase64ImageSourceMediaType,
2120
- "type": S.Literal("base64")
2115
+ export class CreateSkillV1SkillsPostParams extends S.Struct({
2116
+ /**
2117
+ * Optional header to specify the beta version(s) you want to use.
2118
+ *
2119
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
2120
+ */
2121
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
2122
+ /**
2123
+ * The version of the Claude API you want to use.
2124
+ *
2125
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
2126
+ */
2127
+ "anthropic-version": S.optionalWith(S.String, { nullable: true })
2121
2128
  }) {}
2122
2129
 
2123
- export class BetaURLImageSource extends S.Class<BetaURLImageSource>("BetaURLImageSource")({
2124
- "type": S.Literal("url"),
2125
- "url": S.String
2130
+ export class BodyCreateSkillV1SkillsPost extends S.Class<BodyCreateSkillV1SkillsPost>("BodyCreateSkillV1SkillsPost")({
2131
+ /**
2132
+ * Display title for the skill.
2133
+ *
2134
+ * This is a human-readable label that is not included in the prompt sent to the model.
2135
+ */
2136
+ "display_title": S.optionalWith(S.String, { nullable: true }),
2137
+ /**
2138
+ * Files to upload for the skill.
2139
+ *
2140
+ * All files must be in the same top-level directory and must include a SKILL.md file at the root of that directory.
2141
+ */
2142
+ "files": S.optionalWith(S.Array(S.instanceOf(globalThis.Blob)), { nullable: true })
2126
2143
  }) {}
2127
2144
 
2128
- export class BetaFileImageSource extends S.Class<BetaFileImageSource>("BetaFileImageSource")({
2129
- "file_id": S.String,
2130
- "type": S.Literal("file")
2145
+ export class CreateSkillResponse extends S.Class<CreateSkillResponse>("CreateSkillResponse")({
2146
+ /**
2147
+ * ISO 8601 timestamp of when the skill was created.
2148
+ */
2149
+ "created_at": S.String,
2150
+ /**
2151
+ * Display title for the skill.
2152
+ *
2153
+ * This is a human-readable label that is not included in the prompt sent to the model.
2154
+ */
2155
+ "display_title": S.NullOr(S.String),
2156
+ /**
2157
+ * Unique identifier for the skill.
2158
+ *
2159
+ * The format and length of IDs may change over time.
2160
+ */
2161
+ "id": S.String,
2162
+ /**
2163
+ * The latest version identifier for the skill.
2164
+ *
2165
+ * This represents the most recent version of the skill that has been created.
2166
+ */
2167
+ "latest_version": S.NullOr(S.String),
2168
+ /**
2169
+ * Source of the skill.
2170
+ *
2171
+ * This may be one of the following values:
2172
+ * * `"custom"`: the skill was created by a user
2173
+ * * `"anthropic"`: the skill was created by Anthropic
2174
+ */
2175
+ "source": S.String,
2176
+ /**
2177
+ * Object type.
2178
+ *
2179
+ * For Skills, this is always `"skill"`.
2180
+ */
2181
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill" as const)),
2182
+ /**
2183
+ * ISO 8601 timestamp of when the skill was last updated.
2184
+ */
2185
+ "updated_at": S.String
2131
2186
  }) {}
2132
2187
 
2133
- export class BetaRequestImageBlock extends S.Class<BetaRequestImageBlock>("BetaRequestImageBlock")({
2188
+ export class GetSkillV1SkillsSkillIdGetParams extends S.Struct({
2134
2189
  /**
2135
- * Create a cache control breakpoint at this content block.
2190
+ * Optional header to specify the beta version(s) you want to use.
2191
+ *
2192
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
2136
2193
  */
2137
- "cache_control": S.optionalWith(BetaCacheControlEphemeral, { nullable: true }),
2138
- "source": S.Union(BetaBase64ImageSource, BetaURLImageSource, BetaFileImageSource),
2139
- "type": S.Literal("image")
2194
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
2195
+ /**
2196
+ * The version of the Claude API you want to use.
2197
+ *
2198
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
2199
+ */
2200
+ "anthropic-version": S.optionalWith(S.String, { nullable: true }),
2201
+ /**
2202
+ * Your unique API key for authentication.
2203
+ *
2204
+ * 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.
2205
+ */
2206
+ "x-api-key": S.optionalWith(S.String, { nullable: true })
2140
2207
  }) {}
2141
2208
 
2142
- export class BetaRequestCitationsConfig extends S.Class<BetaRequestCitationsConfig>("BetaRequestCitationsConfig")({
2143
- "enabled": S.optionalWith(S.Boolean, { nullable: true })
2209
+ export class GetSkillResponse extends S.Class<GetSkillResponse>("GetSkillResponse")({
2210
+ /**
2211
+ * ISO 8601 timestamp of when the skill was created.
2212
+ */
2213
+ "created_at": S.String,
2214
+ /**
2215
+ * Display title for the skill.
2216
+ *
2217
+ * This is a human-readable label that is not included in the prompt sent to the model.
2218
+ */
2219
+ "display_title": S.NullOr(S.String),
2220
+ /**
2221
+ * Unique identifier for the skill.
2222
+ *
2223
+ * The format and length of IDs may change over time.
2224
+ */
2225
+ "id": S.String,
2226
+ /**
2227
+ * The latest version identifier for the skill.
2228
+ *
2229
+ * This represents the most recent version of the skill that has been created.
2230
+ */
2231
+ "latest_version": S.NullOr(S.String),
2232
+ /**
2233
+ * Source of the skill.
2234
+ *
2235
+ * This may be one of the following values:
2236
+ * * `"custom"`: the skill was created by a user
2237
+ * * `"anthropic"`: the skill was created by Anthropic
2238
+ */
2239
+ "source": S.String,
2240
+ /**
2241
+ * Object type.
2242
+ *
2243
+ * For Skills, this is always `"skill"`.
2244
+ */
2245
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill" as const)),
2246
+ /**
2247
+ * ISO 8601 timestamp of when the skill was last updated.
2248
+ */
2249
+ "updated_at": S.String
2144
2250
  }) {}
2145
2251
 
2146
- export class BetaBase64PDFSource extends S.Class<BetaBase64PDFSource>("BetaBase64PDFSource")({
2147
- "data": S.String,
2148
- "media_type": S.Literal("application/pdf"),
2149
- "type": S.Literal("base64")
2150
- }) {}
2252
+ export class DeleteSkillV1SkillsSkillIdDeleteParams extends S.Struct({
2253
+ /**
2254
+ * Optional header to specify the beta version(s) you want to use.
2255
+ *
2256
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
2257
+ */
2258
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
2259
+ /**
2260
+ * The version of the Claude API you want to use.
2261
+ *
2262
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
2263
+ */
2264
+ "anthropic-version": S.optionalWith(S.String, { nullable: true }),
2265
+ /**
2266
+ * Your unique API key for authentication.
2267
+ *
2268
+ * 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.
2269
+ */
2270
+ "x-api-key": S.optionalWith(S.String, { nullable: true })
2271
+ }) {}
2272
+
2273
+ export class DeleteSkillResponse extends S.Class<DeleteSkillResponse>("DeleteSkillResponse")({
2274
+ /**
2275
+ * Unique identifier for the skill.
2276
+ *
2277
+ * The format and length of IDs may change over time.
2278
+ */
2279
+ "id": S.String,
2280
+ /**
2281
+ * Deleted object type.
2282
+ *
2283
+ * For Skills, this is always `"skill_deleted"`.
2284
+ */
2285
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill_deleted" as const))
2286
+ }) {}
2287
+
2288
+ export class ListSkillVersionsV1SkillsSkillIdVersionsGetParams extends S.Struct({
2289
+ /**
2290
+ * Optionally set to the `next_page` token from the previous response.
2291
+ */
2292
+ "page": S.optionalWith(S.String, { nullable: true }),
2293
+ /**
2294
+ * Number of items to return per page.
2295
+ *
2296
+ * Defaults to `20`. Ranges from `1` to `1000`.
2297
+ */
2298
+ "limit": S.optionalWith(S.Int, { nullable: true }),
2299
+ /**
2300
+ * Optional header to specify the beta version(s) you want to use.
2301
+ *
2302
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
2303
+ */
2304
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
2305
+ /**
2306
+ * The version of the Claude API you want to use.
2307
+ *
2308
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
2309
+ */
2310
+ "anthropic-version": S.optionalWith(S.String, { nullable: true }),
2311
+ /**
2312
+ * Your unique API key for authentication.
2313
+ *
2314
+ * 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.
2315
+ */
2316
+ "x-api-key": S.optionalWith(S.String, { nullable: true })
2317
+ }) {}
2318
+
2319
+ export class SkillVersion extends S.Class<SkillVersion>("SkillVersion")({
2320
+ /**
2321
+ * ISO 8601 timestamp of when the skill version was created.
2322
+ */
2323
+ "created_at": S.String,
2324
+ /**
2325
+ * Description of the skill version.
2326
+ *
2327
+ * This is extracted from the SKILL.md file in the skill upload.
2328
+ */
2329
+ "description": S.String,
2330
+ /**
2331
+ * Directory name of the skill version.
2332
+ *
2333
+ * This is the top-level directory name that was extracted from the uploaded files.
2334
+ */
2335
+ "directory": S.String,
2336
+ /**
2337
+ * Unique identifier for the skill version.
2338
+ *
2339
+ * The format and length of IDs may change over time.
2340
+ */
2341
+ "id": S.String,
2342
+ /**
2343
+ * Human-readable name of the skill version.
2344
+ *
2345
+ * This is extracted from the SKILL.md file in the skill upload.
2346
+ */
2347
+ "name": S.String,
2348
+ /**
2349
+ * Identifier for the skill that this version belongs to.
2350
+ */
2351
+ "skill_id": S.String,
2352
+ /**
2353
+ * Object type.
2354
+ *
2355
+ * For Skill Versions, this is always `"skill_version"`.
2356
+ */
2357
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill_version" as const)),
2358
+ /**
2359
+ * Version identifier for the skill.
2360
+ *
2361
+ * Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
2362
+ */
2363
+ "version": S.String
2364
+ }) {}
2365
+
2366
+ export class ListSkillVersionsResponse extends S.Class<ListSkillVersionsResponse>("ListSkillVersionsResponse")({
2367
+ /**
2368
+ * List of skill versions.
2369
+ */
2370
+ "data": S.Array(SkillVersion),
2371
+ /**
2372
+ * Indicates if there are more results in the requested page direction.
2373
+ */
2374
+ "has_more": S.Boolean,
2375
+ /**
2376
+ * Token to provide in as `page` in the subsequent request to retrieve the next page of data.
2377
+ */
2378
+ "next_page": S.NullOr(S.String)
2379
+ }) {}
2380
+
2381
+ export class CreateSkillVersionV1SkillsSkillIdVersionsPostParams extends S.Struct({
2382
+ /**
2383
+ * Optional header to specify the beta version(s) you want to use.
2384
+ *
2385
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
2386
+ */
2387
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
2388
+ /**
2389
+ * The version of the Claude API you want to use.
2390
+ *
2391
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
2392
+ */
2393
+ "anthropic-version": S.optionalWith(S.String, { nullable: true })
2394
+ }) {}
2395
+
2396
+ export class BodyCreateSkillVersionV1SkillsSkillIdVersionsPost
2397
+ extends S.Class<BodyCreateSkillVersionV1SkillsSkillIdVersionsPost>(
2398
+ "BodyCreateSkillVersionV1SkillsSkillIdVersionsPost"
2399
+ )({
2400
+ /**
2401
+ * Files to upload for the skill.
2402
+ *
2403
+ * All files must be in the same top-level directory and must include a SKILL.md file at the root of that directory.
2404
+ */
2405
+ "files": S.optionalWith(S.Array(S.instanceOf(globalThis.Blob)), { nullable: true })
2406
+ })
2407
+ {}
2408
+
2409
+ export class CreateSkillVersionResponse extends S.Class<CreateSkillVersionResponse>("CreateSkillVersionResponse")({
2410
+ /**
2411
+ * ISO 8601 timestamp of when the skill version was created.
2412
+ */
2413
+ "created_at": S.String,
2414
+ /**
2415
+ * Description of the skill version.
2416
+ *
2417
+ * This is extracted from the SKILL.md file in the skill upload.
2418
+ */
2419
+ "description": S.String,
2420
+ /**
2421
+ * Directory name of the skill version.
2422
+ *
2423
+ * This is the top-level directory name that was extracted from the uploaded files.
2424
+ */
2425
+ "directory": S.String,
2426
+ /**
2427
+ * Unique identifier for the skill version.
2428
+ *
2429
+ * The format and length of IDs may change over time.
2430
+ */
2431
+ "id": S.String,
2432
+ /**
2433
+ * Human-readable name of the skill version.
2434
+ *
2435
+ * This is extracted from the SKILL.md file in the skill upload.
2436
+ */
2437
+ "name": S.String,
2438
+ /**
2439
+ * Identifier for the skill that this version belongs to.
2440
+ */
2441
+ "skill_id": S.String,
2442
+ /**
2443
+ * Object type.
2444
+ *
2445
+ * For Skill Versions, this is always `"skill_version"`.
2446
+ */
2447
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill_version" as const)),
2448
+ /**
2449
+ * Version identifier for the skill.
2450
+ *
2451
+ * Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
2452
+ */
2453
+ "version": S.String
2454
+ }) {}
2455
+
2456
+ export class GetSkillVersionV1SkillsSkillIdVersionsVersionGetParams extends S.Struct({
2457
+ /**
2458
+ * Optional header to specify the beta version(s) you want to use.
2459
+ *
2460
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
2461
+ */
2462
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
2463
+ /**
2464
+ * The version of the Claude API you want to use.
2465
+ *
2466
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
2467
+ */
2468
+ "anthropic-version": S.optionalWith(S.String, { nullable: true }),
2469
+ /**
2470
+ * Your unique API key for authentication.
2471
+ *
2472
+ * 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.
2473
+ */
2474
+ "x-api-key": S.optionalWith(S.String, { nullable: true })
2475
+ }) {}
2476
+
2477
+ export class GetSkillVersionResponse extends S.Class<GetSkillVersionResponse>("GetSkillVersionResponse")({
2478
+ /**
2479
+ * ISO 8601 timestamp of when the skill version was created.
2480
+ */
2481
+ "created_at": S.String,
2482
+ /**
2483
+ * Description of the skill version.
2484
+ *
2485
+ * This is extracted from the SKILL.md file in the skill upload.
2486
+ */
2487
+ "description": S.String,
2488
+ /**
2489
+ * Directory name of the skill version.
2490
+ *
2491
+ * This is the top-level directory name that was extracted from the uploaded files.
2492
+ */
2493
+ "directory": S.String,
2494
+ /**
2495
+ * Unique identifier for the skill version.
2496
+ *
2497
+ * The format and length of IDs may change over time.
2498
+ */
2499
+ "id": S.String,
2500
+ /**
2501
+ * Human-readable name of the skill version.
2502
+ *
2503
+ * This is extracted from the SKILL.md file in the skill upload.
2504
+ */
2505
+ "name": S.String,
2506
+ /**
2507
+ * Identifier for the skill that this version belongs to.
2508
+ */
2509
+ "skill_id": S.String,
2510
+ /**
2511
+ * Object type.
2512
+ *
2513
+ * For Skill Versions, this is always `"skill_version"`.
2514
+ */
2515
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill_version" as const)),
2516
+ /**
2517
+ * Version identifier for the skill.
2518
+ *
2519
+ * Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
2520
+ */
2521
+ "version": S.String
2522
+ }) {}
2523
+
2524
+ export class DeleteSkillVersionV1SkillsSkillIdVersionsVersionDeleteParams extends S.Struct({
2525
+ /**
2526
+ * Optional header to specify the beta version(s) you want to use.
2527
+ *
2528
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
2529
+ */
2530
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
2531
+ /**
2532
+ * The version of the Claude API you want to use.
2533
+ *
2534
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
2535
+ */
2536
+ "anthropic-version": S.optionalWith(S.String, { nullable: true }),
2537
+ /**
2538
+ * Your unique API key for authentication.
2539
+ *
2540
+ * 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.
2541
+ */
2542
+ "x-api-key": S.optionalWith(S.String, { nullable: true })
2543
+ }) {}
2544
+
2545
+ export class DeleteSkillVersionResponse extends S.Class<DeleteSkillVersionResponse>("DeleteSkillVersionResponse")({
2546
+ /**
2547
+ * Version identifier for the skill.
2548
+ *
2549
+ * Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
2550
+ */
2551
+ "id": S.String,
2552
+ /**
2553
+ * Deleted object type.
2554
+ *
2555
+ * For Skill Versions, this is always `"skill_version_deleted"`.
2556
+ */
2557
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill_version_deleted" as const))
2558
+ }) {}
2559
+
2560
+ export class BetaMessagesPostParams extends S.Struct({
2561
+ /**
2562
+ * Optional header to specify the beta version(s) you want to use.
2563
+ *
2564
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
2565
+ */
2566
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
2567
+ /**
2568
+ * The version of the Claude API you want to use.
2569
+ *
2570
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
2571
+ */
2572
+ "anthropic-version": S.optionalWith(S.String, { nullable: true })
2573
+ }) {}
2574
+
2575
+ /**
2576
+ * The time-to-live for the cache control breakpoint.
2577
+ *
2578
+ * This may be one the following values:
2579
+ * - `5m`: 5 minutes
2580
+ * - `1h`: 1 hour
2581
+ *
2582
+ * Defaults to `5m`.
2583
+ */
2584
+ export class BetaCacheControlEphemeralTtl extends S.Literal("5m", "1h") {}
2585
+
2586
+ export class BetaCacheControlEphemeral extends S.Class<BetaCacheControlEphemeral>("BetaCacheControlEphemeral")({
2587
+ /**
2588
+ * The time-to-live for the cache control breakpoint.
2589
+ *
2590
+ * This may be one the following values:
2591
+ * - `5m`: 5 minutes
2592
+ * - `1h`: 1 hour
2593
+ *
2594
+ * Defaults to `5m`.
2595
+ */
2596
+ "ttl": S.optionalWith(BetaCacheControlEphemeralTtl, { nullable: true }),
2597
+ "type": S.Literal("ephemeral")
2598
+ }) {}
2599
+
2600
+ export class BetaRequestCharLocationCitation
2601
+ extends S.Class<BetaRequestCharLocationCitation>("BetaRequestCharLocationCitation")({
2602
+ "cited_text": S.String,
2603
+ "document_index": S.Int.pipe(S.greaterThanOrEqualTo(0)),
2604
+ "document_title": S.NullOr(S.String.pipe(S.minLength(1), S.maxLength(255))),
2605
+ "end_char_index": S.Int,
2606
+ "start_char_index": S.Int.pipe(S.greaterThanOrEqualTo(0)),
2607
+ "type": S.Literal("char_location")
2608
+ })
2609
+ {}
2610
+
2611
+ export class BetaRequestPageLocationCitation
2612
+ extends S.Class<BetaRequestPageLocationCitation>("BetaRequestPageLocationCitation")({
2613
+ "cited_text": S.String,
2614
+ "document_index": S.Int.pipe(S.greaterThanOrEqualTo(0)),
2615
+ "document_title": S.NullOr(S.String.pipe(S.minLength(1), S.maxLength(255))),
2616
+ "end_page_number": S.Int,
2617
+ "start_page_number": S.Int.pipe(S.greaterThanOrEqualTo(1)),
2618
+ "type": S.Literal("page_location")
2619
+ })
2620
+ {}
2621
+
2622
+ export class BetaRequestContentBlockLocationCitation
2623
+ extends S.Class<BetaRequestContentBlockLocationCitation>("BetaRequestContentBlockLocationCitation")({
2624
+ "cited_text": S.String,
2625
+ "document_index": S.Int.pipe(S.greaterThanOrEqualTo(0)),
2626
+ "document_title": S.NullOr(S.String.pipe(S.minLength(1), S.maxLength(255))),
2627
+ "end_block_index": S.Int,
2628
+ "start_block_index": S.Int.pipe(S.greaterThanOrEqualTo(0)),
2629
+ "type": S.Literal("content_block_location")
2630
+ })
2631
+ {}
2632
+
2633
+ export class BetaRequestWebSearchResultLocationCitation
2634
+ extends S.Class<BetaRequestWebSearchResultLocationCitation>("BetaRequestWebSearchResultLocationCitation")({
2635
+ "cited_text": S.String,
2636
+ "encrypted_index": S.String,
2637
+ "title": S.NullOr(S.String.pipe(S.minLength(1), S.maxLength(512))),
2638
+ "type": S.Literal("web_search_result_location"),
2639
+ "url": S.String.pipe(S.minLength(1), S.maxLength(2048))
2640
+ })
2641
+ {}
2642
+
2643
+ export class BetaRequestSearchResultLocationCitation
2644
+ extends S.Class<BetaRequestSearchResultLocationCitation>("BetaRequestSearchResultLocationCitation")({
2645
+ "cited_text": S.String,
2646
+ "end_block_index": S.Int,
2647
+ "search_result_index": S.Int.pipe(S.greaterThanOrEqualTo(0)),
2648
+ "source": S.String,
2649
+ "start_block_index": S.Int.pipe(S.greaterThanOrEqualTo(0)),
2650
+ "title": S.NullOr(S.String),
2651
+ "type": S.Literal("search_result_location")
2652
+ })
2653
+ {}
2654
+
2655
+ export class BetaRequestTextBlock extends S.Class<BetaRequestTextBlock>("BetaRequestTextBlock")({
2656
+ /**
2657
+ * Create a cache control breakpoint at this content block.
2658
+ */
2659
+ "cache_control": S.optionalWith(BetaCacheControlEphemeral, { nullable: true }),
2660
+ "citations": S.optionalWith(
2661
+ S.Array(
2662
+ S.Union(
2663
+ BetaRequestCharLocationCitation,
2664
+ BetaRequestPageLocationCitation,
2665
+ BetaRequestContentBlockLocationCitation,
2666
+ BetaRequestWebSearchResultLocationCitation,
2667
+ BetaRequestSearchResultLocationCitation
2668
+ )
2669
+ ),
2670
+ { nullable: true }
2671
+ ),
2672
+ "text": S.String.pipe(S.minLength(1)),
2673
+ "type": S.Literal("text")
2674
+ }) {}
2675
+
2676
+ export class BetaBase64ImageSourceMediaType extends S.Literal("image/jpeg", "image/png", "image/gif", "image/webp") {}
2677
+
2678
+ export class BetaBase64ImageSource extends S.Class<BetaBase64ImageSource>("BetaBase64ImageSource")({
2679
+ "data": S.String,
2680
+ "media_type": BetaBase64ImageSourceMediaType,
2681
+ "type": S.Literal("base64")
2682
+ }) {}
2683
+
2684
+ export class BetaURLImageSource extends S.Class<BetaURLImageSource>("BetaURLImageSource")({
2685
+ "type": S.Literal("url"),
2686
+ "url": S.String
2687
+ }) {}
2688
+
2689
+ export class BetaFileImageSource extends S.Class<BetaFileImageSource>("BetaFileImageSource")({
2690
+ "file_id": S.String,
2691
+ "type": S.Literal("file")
2692
+ }) {}
2693
+
2694
+ export class BetaRequestImageBlock extends S.Class<BetaRequestImageBlock>("BetaRequestImageBlock")({
2695
+ /**
2696
+ * Create a cache control breakpoint at this content block.
2697
+ */
2698
+ "cache_control": S.optionalWith(BetaCacheControlEphemeral, { nullable: true }),
2699
+ "source": S.Union(BetaBase64ImageSource, BetaURLImageSource, BetaFileImageSource),
2700
+ "type": S.Literal("image")
2701
+ }) {}
2702
+
2703
+ export class BetaRequestCitationsConfig extends S.Class<BetaRequestCitationsConfig>("BetaRequestCitationsConfig")({
2704
+ "enabled": S.optionalWith(S.Boolean, { nullable: true })
2705
+ }) {}
2706
+
2707
+ export class BetaBase64PDFSource extends S.Class<BetaBase64PDFSource>("BetaBase64PDFSource")({
2708
+ "data": S.String,
2709
+ "media_type": S.Literal("application/pdf"),
2710
+ "type": S.Literal("base64")
2711
+ }) {}
2151
2712
 
2152
2713
  export class BetaPlainTextSource extends S.Class<BetaPlainTextSource>("BetaPlainTextSource")({
2153
2714
  "data": S.String,
@@ -2232,7 +2793,12 @@ export class BetaRequestToolResultBlock extends S.Class<BetaRequestToolResultBlo
2232
2793
  */
2233
2794
  "cache_control": S.optionalWith(BetaCacheControlEphemeral, { nullable: true }),
2234
2795
  "content": S.optionalWith(
2235
- S.Union(S.String, S.Array(S.Union(BetaRequestTextBlock, BetaRequestImageBlock, BetaRequestSearchResultBlock))),
2796
+ S.Union(
2797
+ S.String,
2798
+ S.Array(
2799
+ S.Union(BetaRequestTextBlock, BetaRequestImageBlock, BetaRequestSearchResultBlock, BetaRequestDocumentBlock)
2800
+ )
2801
+ ),
2236
2802
  { nullable: true }
2237
2803
  ),
2238
2804
  "is_error": S.optionalWith(S.Boolean, { nullable: true }),
@@ -2241,7 +2807,7 @@ export class BetaRequestToolResultBlock extends S.Class<BetaRequestToolResultBlo
2241
2807
  }) {}
2242
2808
 
2243
2809
  export class BetaRequestServerToolUseBlockName
2244
- extends S.Literal("web_search", "code_execution", "bash_code_execution", "text_editor_code_execution")
2810
+ extends S.Literal("web_search", "web_fetch", "code_execution", "bash_code_execution", "text_editor_code_execution")
2245
2811
  {}
2246
2812
 
2247
2813
  export class BetaRequestServerToolUseBlock
@@ -2290,6 +2856,51 @@ export class BetaRequestWebSearchToolResultBlock
2290
2856
  })
2291
2857
  {}
2292
2858
 
2859
+ export class BetaWebFetchToolResultErrorCode extends S.Literal(
2860
+ "invalid_tool_input",
2861
+ "url_too_long",
2862
+ "url_not_allowed",
2863
+ "url_not_accessible",
2864
+ "unsupported_content_type",
2865
+ "too_many_requests",
2866
+ "max_uses_exceeded",
2867
+ "unavailable"
2868
+ ) {}
2869
+
2870
+ export class BetaRequestWebFetchToolResultError
2871
+ extends S.Class<BetaRequestWebFetchToolResultError>("BetaRequestWebFetchToolResultError")({
2872
+ "error_code": BetaWebFetchToolResultErrorCode,
2873
+ "type": S.Literal("web_fetch_tool_result_error")
2874
+ })
2875
+ {}
2876
+
2877
+ export class BetaRequestWebFetchResultBlock
2878
+ extends S.Class<BetaRequestWebFetchResultBlock>("BetaRequestWebFetchResultBlock")({
2879
+ "content": BetaRequestDocumentBlock,
2880
+ /**
2881
+ * ISO 8601 timestamp when the content was retrieved
2882
+ */
2883
+ "retrieved_at": S.optionalWith(S.String, { nullable: true }),
2884
+ "type": S.Literal("web_fetch_result"),
2885
+ /**
2886
+ * Fetched content URL
2887
+ */
2888
+ "url": S.String
2889
+ })
2890
+ {}
2891
+
2892
+ export class BetaRequestWebFetchToolResultBlock
2893
+ extends S.Class<BetaRequestWebFetchToolResultBlock>("BetaRequestWebFetchToolResultBlock")({
2894
+ /**
2895
+ * Create a cache control breakpoint at this content block.
2896
+ */
2897
+ "cache_control": S.optionalWith(BetaCacheControlEphemeral, { nullable: true }),
2898
+ "content": S.Union(BetaRequestWebFetchToolResultError, BetaRequestWebFetchResultBlock),
2899
+ "tool_use_id": S.String.pipe(S.pattern(new RegExp("^srvtoolu_[a-zA-Z0-9_]+$"))),
2900
+ "type": S.Literal("web_fetch_tool_result")
2901
+ })
2902
+ {}
2903
+
2293
2904
  export class BetaCodeExecutionToolResultErrorCode
2294
2905
  extends S.Literal("invalid_tool_input", "unavailable", "too_many_requests", "execution_time_exceeded")
2295
2906
  {}
@@ -2526,6 +3137,7 @@ export class BetaInputContentBlock extends S.Union(
2526
3137
  BetaRequestToolResultBlock,
2527
3138
  BetaRequestServerToolUseBlock,
2528
3139
  BetaRequestWebSearchToolResultBlock,
3140
+ BetaRequestWebFetchToolResultBlock,
2529
3141
  BetaRequestCodeExecutionToolResultBlock,
2530
3142
  BetaRequestBashCodeExecutionToolResultBlock,
2531
3143
  BetaRequestTextEditorCodeExecutionToolResultBlock,
@@ -2541,6 +3153,94 @@ export class BetaInputMessage extends S.Class<BetaInputMessage>("BetaInputMessag
2541
3153
  "role": BetaInputMessageRole
2542
3154
  }) {}
2543
3155
 
3156
+ /**
3157
+ * Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
3158
+ */
3159
+ export class BetaSkillParamsType extends S.Literal("anthropic", "custom") {}
3160
+
3161
+ /**
3162
+ * Specification for a skill to be loaded in a container (request model).
3163
+ */
3164
+ export class BetaSkillParams extends S.Class<BetaSkillParams>("BetaSkillParams")({
3165
+ /**
3166
+ * Skill ID
3167
+ */
3168
+ "skill_id": S.String.pipe(S.minLength(1), S.maxLength(64)),
3169
+ /**
3170
+ * Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
3171
+ */
3172
+ "type": BetaSkillParamsType,
3173
+ /**
3174
+ * Skill version or 'latest' for most recent version
3175
+ */
3176
+ "version": S.optionalWith(S.String.pipe(S.minLength(1), S.maxLength(64)), { nullable: true })
3177
+ }) {}
3178
+
3179
+ /**
3180
+ * Container parameters with skills to be loaded.
3181
+ */
3182
+ export class BetaContainerParams extends S.Class<BetaContainerParams>("BetaContainerParams")({
3183
+ /**
3184
+ * Container id
3185
+ */
3186
+ "id": S.optionalWith(S.String, { nullable: true }),
3187
+ /**
3188
+ * List of skills to load in the container
3189
+ */
3190
+ "skills": S.optionalWith(S.Array(BetaSkillParams).pipe(S.maxItems(8)), { nullable: true })
3191
+ }) {}
3192
+
3193
+ export class BetaInputTokensClearAtLeast extends S.Class<BetaInputTokensClearAtLeast>("BetaInputTokensClearAtLeast")({
3194
+ "type": S.Literal("input_tokens"),
3195
+ "value": S.Int.pipe(S.greaterThanOrEqualTo(0))
3196
+ }) {}
3197
+
3198
+ export class BetaToolUsesKeep extends S.Class<BetaToolUsesKeep>("BetaToolUsesKeep")({
3199
+ "type": S.Literal("tool_uses"),
3200
+ "value": S.Int.pipe(S.greaterThanOrEqualTo(0))
3201
+ }) {}
3202
+
3203
+ export class BetaInputTokensTrigger extends S.Class<BetaInputTokensTrigger>("BetaInputTokensTrigger")({
3204
+ "type": S.Literal("input_tokens"),
3205
+ "value": S.Int.pipe(S.greaterThanOrEqualTo(1))
3206
+ }) {}
3207
+
3208
+ export class BetaToolUsesTrigger extends S.Class<BetaToolUsesTrigger>("BetaToolUsesTrigger")({
3209
+ "type": S.Literal("tool_uses"),
3210
+ "value": S.Int.pipe(S.greaterThanOrEqualTo(1))
3211
+ }) {}
3212
+
3213
+ export class BetaClearToolUses20250919 extends S.Class<BetaClearToolUses20250919>("BetaClearToolUses20250919")({
3214
+ /**
3215
+ * Minimum number of tokens that must be cleared when triggered. Context will only be modified if at least this many tokens can be removed.
3216
+ */
3217
+ "clear_at_least": S.optionalWith(BetaInputTokensClearAtLeast, { nullable: true }),
3218
+ /**
3219
+ * Whether to clear all tool inputs (bool) or specific tool inputs to clear (list)
3220
+ */
3221
+ "clear_tool_inputs": S.optionalWith(S.Union(S.Boolean, S.Array(S.String)), { nullable: true }),
3222
+ /**
3223
+ * Tool names whose uses are preserved from clearing
3224
+ */
3225
+ "exclude_tools": S.optionalWith(S.Array(S.String), { nullable: true }),
3226
+ /**
3227
+ * Number of tool uses to retain in the conversation
3228
+ */
3229
+ "keep": S.optionalWith(BetaToolUsesKeep, { nullable: true }),
3230
+ /**
3231
+ * Condition that triggers the context management strategy
3232
+ */
3233
+ "trigger": S.optionalWith(S.Union(BetaInputTokensTrigger, BetaToolUsesTrigger), { nullable: true }),
3234
+ "type": S.Literal("clear_tool_uses_20250919")
3235
+ }) {}
3236
+
3237
+ export class BetaContextManagementConfig extends S.Class<BetaContextManagementConfig>("BetaContextManagementConfig")({
3238
+ /**
3239
+ * List of context management edits to apply
3240
+ */
3241
+ "edits": S.optionalWith(S.Array(BetaClearToolUses20250919), { nullable: true })
3242
+ }) {}
3243
+
2544
3244
  export class BetaRequestMCPServerToolConfiguration
2545
3245
  extends S.Class<BetaRequestMCPServerToolConfiguration>("BetaRequestMCPServerToolConfiguration")({
2546
3246
  "allowed_tools": S.optionalWith(S.Array(S.String), { nullable: true }),
@@ -2570,7 +3270,7 @@ export class BetaMetadata extends S.Class<BetaMetadata>("BetaMetadata")({
2570
3270
  /**
2571
3271
  * Determines whether to use priority capacity (if available) or standard capacity for this request.
2572
3272
  *
2573
- * Anthropic offers different levels of service for your API requests. See [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
3273
+ * Anthropic offers different levels of service for your API requests. See [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
2574
3274
  */
2575
3275
  export class BetaCreateMessageParamsServiceTier extends S.Literal("auto", "standard_only") {}
2576
3276
 
@@ -2580,7 +3280,7 @@ export class BetaThinkingConfigEnabled extends S.Class<BetaThinkingConfigEnabled
2580
3280
  *
2581
3281
  * Must be ≥1024 and less than `max_tokens`.
2582
3282
  *
2583
- * See [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) for details.
3283
+ * See [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.
2584
3284
  */
2585
3285
  "budget_tokens": S.Int.pipe(S.greaterThanOrEqualTo(1024)),
2586
3286
  "type": S.Literal("enabled")
@@ -2595,7 +3295,7 @@ export class BetaThinkingConfigDisabled extends S.Class<BetaThinkingConfigDisabl
2595
3295
  *
2596
3296
  * 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.
2597
3297
  *
2598
- * See [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) for details.
3298
+ * See [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.
2599
3299
  */
2600
3300
  export class BetaThinkingConfigParam extends S.Union(BetaThinkingConfigEnabled, BetaThinkingConfigDisabled) {}
2601
3301
 
@@ -2774,6 +3474,20 @@ export class BetaComputerUseTool20241022 extends S.Class<BetaComputerUseTool2024
2774
3474
  "type": S.Literal("computer_20241022")
2775
3475
  }) {}
2776
3476
 
3477
+ export class BetaMemoryTool20250818 extends S.Class<BetaMemoryTool20250818>("BetaMemoryTool20250818")({
3478
+ /**
3479
+ * Create a cache control breakpoint at this content block.
3480
+ */
3481
+ "cache_control": S.optionalWith(BetaCacheControlEphemeral, { nullable: true }),
3482
+ /**
3483
+ * Name of the tool.
3484
+ *
3485
+ * This is how the tool will be called by the model and in `tool_use` blocks.
3486
+ */
3487
+ "name": S.Literal("memory"),
3488
+ "type": S.Literal("memory_20250818")
3489
+ }) {}
3490
+
2777
3491
  export class BetaComputerUseTool20250124 extends S.Class<BetaComputerUseTool20250124>("BetaComputerUseTool20250124")({
2778
3492
  /**
2779
3493
  * Create a cache control breakpoint at this content block.
@@ -2910,8 +3624,42 @@ export class BetaWebSearchTool20250305 extends S.Class<BetaWebSearchTool20250305
2910
3624
  "user_location": S.optionalWith(BetaUserLocation, { nullable: true })
2911
3625
  }) {}
2912
3626
 
3627
+ export class BetaWebFetchTool20250910 extends S.Class<BetaWebFetchTool20250910>("BetaWebFetchTool20250910")({
3628
+ /**
3629
+ * List of domains to allow fetching from
3630
+ */
3631
+ "allowed_domains": S.optionalWith(S.Array(S.String), { nullable: true }),
3632
+ /**
3633
+ * List of domains to block fetching from
3634
+ */
3635
+ "blocked_domains": S.optionalWith(S.Array(S.String), { nullable: true }),
3636
+ /**
3637
+ * Create a cache control breakpoint at this content block.
3638
+ */
3639
+ "cache_control": S.optionalWith(BetaCacheControlEphemeral, { nullable: true }),
3640
+ /**
3641
+ * Citations configuration for fetched documents. Citations are disabled by default.
3642
+ */
3643
+ "citations": S.optionalWith(BetaRequestCitationsConfig, { nullable: true }),
3644
+ /**
3645
+ * 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.
3646
+ */
3647
+ "max_content_tokens": S.optionalWith(S.Int.pipe(S.greaterThan(0)), { nullable: true }),
3648
+ /**
3649
+ * Maximum number of times the tool can be used in the API request.
3650
+ */
3651
+ "max_uses": S.optionalWith(S.Int.pipe(S.greaterThan(0)), { nullable: true }),
3652
+ /**
3653
+ * Name of the tool.
3654
+ *
3655
+ * This is how the tool will be called by the model and in `tool_use` blocks.
3656
+ */
3657
+ "name": S.Literal("web_fetch"),
3658
+ "type": S.Literal("web_fetch_20250910")
3659
+ }) {}
3660
+
2913
3661
  export class BetaCreateMessageParams extends S.Class<BetaCreateMessageParams>("BetaCreateMessageParams")({
2914
- "model": Model,
3662
+ "model": S.Union(S.String, Model),
2915
3663
  /**
2916
3664
  * Input messages.
2917
3665
  *
@@ -2956,9 +3704,9 @@ export class BetaCreateMessageParams extends S.Class<BetaCreateMessageParams>("B
2956
3704
  * {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
2957
3705
  * ```
2958
3706
  *
2959
- * See [input examples](https://docs.anthropic.com/en/api/messages-examples).
3707
+ * See [input examples](https://docs.claude.com/en/api/messages-examples).
2960
3708
  *
2961
- * Note that if you want to include a [system prompt](https://docs.anthropic.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.
3709
+ * 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.
2962
3710
  *
2963
3711
  * There is a limit of 100,000 messages in a single request.
2964
3712
  */
@@ -2966,13 +3714,19 @@ export class BetaCreateMessageParams extends S.Class<BetaCreateMessageParams>("B
2966
3714
  /**
2967
3715
  * Container identifier for reuse across requests.
2968
3716
  */
2969
- "container": S.optionalWith(S.String, { nullable: true }),
3717
+ "container": S.optionalWith(S.Union(BetaContainerParams, S.String), { nullable: true }),
3718
+ /**
3719
+ * Context management configuration.
3720
+ *
3721
+ * This allows you to control how Claude manages context across multiple requests, such as whether to clear function results or not.
3722
+ */
3723
+ "context_management": S.optionalWith(BetaContextManagementConfig, { nullable: true }),
2970
3724
  /**
2971
3725
  * The maximum number of tokens to generate before stopping.
2972
3726
  *
2973
3727
  * Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.
2974
3728
  *
2975
- * Different models have different maximum values for this parameter. See [models](https://docs.anthropic.com/en/docs/models-overview) for details.
3729
+ * Different models have different maximum values for this parameter. See [models](https://docs.claude.com/en/docs/models-overview) for details.
2976
3730
  */
2977
3731
  "max_tokens": S.Int.pipe(S.greaterThanOrEqualTo(1)),
2978
3732
  /**
@@ -2986,7 +3740,7 @@ export class BetaCreateMessageParams extends S.Class<BetaCreateMessageParams>("B
2986
3740
  /**
2987
3741
  * Determines whether to use priority capacity (if available) or standard capacity for this request.
2988
3742
  *
2989
- * Anthropic offers different levels of service for your API requests. See [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
3743
+ * Anthropic offers different levels of service for your API requests. See [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
2990
3744
  */
2991
3745
  "service_tier": S.optionalWith(BetaCreateMessageParamsServiceTier, { nullable: true }),
2992
3746
  /**
@@ -3000,13 +3754,13 @@ export class BetaCreateMessageParams extends S.Class<BetaCreateMessageParams>("B
3000
3754
  /**
3001
3755
  * Whether to incrementally stream the response using server-sent events.
3002
3756
  *
3003
- * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for details.
3757
+ * See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
3004
3758
  */
3005
3759
  "stream": S.optionalWith(S.Boolean, { nullable: true }),
3006
3760
  /**
3007
3761
  * System prompt.
3008
3762
  *
3009
- * 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.anthropic.com/en/docs/system-prompts).
3763
+ * 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).
3010
3764
  */
3011
3765
  "system": S.optionalWith(S.Union(S.String, S.Array(BetaRequestTextBlock)), { nullable: true }),
3012
3766
  /**
@@ -3024,7 +3778,7 @@ export class BetaCreateMessageParams extends S.Class<BetaCreateMessageParams>("B
3024
3778
  *
3025
3779
  * 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.
3026
3780
  *
3027
- * There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.anthropic.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.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
3781
+ * 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)).
3028
3782
  *
3029
3783
  * Each tool definition includes:
3030
3784
  *
@@ -3080,7 +3834,7 @@ export class BetaCreateMessageParams extends S.Class<BetaCreateMessageParams>("B
3080
3834
  *
3081
3835
  * 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.
3082
3836
  *
3083
- * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
3837
+ * See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
3084
3838
  */
3085
3839
  "tools": S.optionalWith(
3086
3840
  S.Array(
@@ -3091,12 +3845,14 @@ export class BetaCreateMessageParams extends S.Class<BetaCreateMessageParams>("B
3091
3845
  BetaCodeExecutionTool20250522,
3092
3846
  BetaCodeExecutionTool20250825,
3093
3847
  BetaComputerUseTool20241022,
3848
+ BetaMemoryTool20250818,
3094
3849
  BetaComputerUseTool20250124,
3095
3850
  BetaTextEditor20241022,
3096
3851
  BetaTextEditor20250124,
3097
3852
  BetaTextEditor20250429,
3098
3853
  BetaTextEditor20250728,
3099
- BetaWebSearchTool20250305
3854
+ BetaWebSearchTool20250305,
3855
+ BetaWebFetchTool20250910
3100
3856
  )
3101
3857
  ),
3102
3858
  { nullable: true }
@@ -3240,7 +3996,7 @@ export class BetaResponseToolUseBlock extends S.Class<BetaResponseToolUseBlock>(
3240
3996
  }) {}
3241
3997
 
3242
3998
  export class BetaResponseServerToolUseBlockName
3243
- extends S.Literal("web_search", "code_execution", "bash_code_execution", "text_editor_code_execution")
3999
+ extends S.Literal("web_search", "web_fetch", "code_execution", "bash_code_execution", "text_editor_code_execution")
3244
4000
  {}
3245
4001
 
3246
4002
  export class BetaResponseServerToolUseBlock
@@ -3289,6 +4045,62 @@ export class BetaResponseWebSearchToolResultBlock
3289
4045
  })
3290
4046
  {}
3291
4047
 
4048
+ export class BetaResponseWebFetchToolResultError
4049
+ extends S.Class<BetaResponseWebFetchToolResultError>("BetaResponseWebFetchToolResultError")({
4050
+ "error_code": BetaWebFetchToolResultErrorCode,
4051
+ "type": S.Literal("web_fetch_tool_result_error").pipe(
4052
+ S.propertySignature,
4053
+ S.withConstructorDefault(() => "web_fetch_tool_result_error" as const)
4054
+ )
4055
+ })
4056
+ {}
4057
+
4058
+ export class BetaResponseCitationsConfig extends S.Class<BetaResponseCitationsConfig>("BetaResponseCitationsConfig")({
4059
+ "enabled": S.Boolean.pipe(S.propertySignature, S.withConstructorDefault(() => false as const))
4060
+ }) {}
4061
+
4062
+ export class BetaResponseDocumentBlock extends S.Class<BetaResponseDocumentBlock>("BetaResponseDocumentBlock")({
4063
+ /**
4064
+ * Citation configuration for the document
4065
+ */
4066
+ "citations": S.optionalWith(S.NullOr(BetaResponseCitationsConfig), { default: () => null }),
4067
+ "source": S.Union(BetaBase64PDFSource, BetaPlainTextSource),
4068
+ /**
4069
+ * The title of the document
4070
+ */
4071
+ "title": S.optionalWith(S.NullOr(S.String), { default: () => null }),
4072
+ "type": S.Literal("document").pipe(S.propertySignature, S.withConstructorDefault(() => "document" as const))
4073
+ }) {}
4074
+
4075
+ export class BetaResponseWebFetchResultBlock
4076
+ extends S.Class<BetaResponseWebFetchResultBlock>("BetaResponseWebFetchResultBlock")({
4077
+ "content": BetaResponseDocumentBlock,
4078
+ /**
4079
+ * ISO 8601 timestamp when the content was retrieved
4080
+ */
4081
+ "retrieved_at": S.optionalWith(S.NullOr(S.String), { default: () => null }),
4082
+ "type": S.Literal("web_fetch_result").pipe(
4083
+ S.propertySignature,
4084
+ S.withConstructorDefault(() => "web_fetch_result" as const)
4085
+ ),
4086
+ /**
4087
+ * Fetched content URL
4088
+ */
4089
+ "url": S.String
4090
+ })
4091
+ {}
4092
+
4093
+ export class BetaResponseWebFetchToolResultBlock
4094
+ extends S.Class<BetaResponseWebFetchToolResultBlock>("BetaResponseWebFetchToolResultBlock")({
4095
+ "content": S.Union(BetaResponseWebFetchToolResultError, BetaResponseWebFetchResultBlock),
4096
+ "tool_use_id": S.String.pipe(S.pattern(new RegExp("^srvtoolu_[a-zA-Z0-9_]+$"))),
4097
+ "type": S.Literal("web_fetch_tool_result").pipe(
4098
+ S.propertySignature,
4099
+ S.withConstructorDefault(() => "web_fetch_tool_result" as const)
4100
+ )
4101
+ })
4102
+ {}
4103
+
3292
4104
  export class BetaResponseCodeExecutionToolResultError
3293
4105
  extends S.Class<BetaResponseCodeExecutionToolResultError>("BetaResponseCodeExecutionToolResultError")({
3294
4106
  "error_code": BetaCodeExecutionToolResultErrorCode,
@@ -3500,6 +4312,7 @@ export class BetaContentBlock extends S.Union(
3500
4312
  BetaResponseToolUseBlock,
3501
4313
  BetaResponseServerToolUseBlock,
3502
4314
  BetaResponseWebSearchToolResultBlock,
4315
+ BetaResponseWebFetchToolResultBlock,
3503
4316
  BetaResponseCodeExecutionToolResultBlock,
3504
4317
  BetaResponseBashCodeExecutionToolResultBlock,
3505
4318
  BetaResponseTextEditorCodeExecutionToolResultBlock,
@@ -3508,9 +4321,15 @@ export class BetaContentBlock extends S.Union(
3508
4321
  BetaResponseContainerUploadBlock
3509
4322
  ) {}
3510
4323
 
3511
- export class BetaStopReason
3512
- extends S.Literal("end_turn", "max_tokens", "stop_sequence", "tool_use", "pause_turn", "refusal")
3513
- {}
4324
+ export class BetaStopReason extends S.Literal(
4325
+ "end_turn",
4326
+ "max_tokens",
4327
+ "stop_sequence",
4328
+ "tool_use",
4329
+ "pause_turn",
4330
+ "refusal",
4331
+ "model_context_window_exceeded"
4332
+ ) {}
3514
4333
 
3515
4334
  export class BetaCacheCreation extends S.Class<BetaCacheCreation>("BetaCacheCreation")({
3516
4335
  /**
@@ -3530,6 +4349,13 @@ export class BetaCacheCreation extends S.Class<BetaCacheCreation>("BetaCacheCrea
3530
4349
  }) {}
3531
4350
 
3532
4351
  export class BetaServerToolUsage extends S.Class<BetaServerToolUsage>("BetaServerToolUsage")({
4352
+ /**
4353
+ * The number of web fetch tool requests.
4354
+ */
4355
+ "web_fetch_requests": S.Int.pipe(S.greaterThanOrEqualTo(0)).pipe(
4356
+ S.propertySignature,
4357
+ S.withConstructorDefault(() => 0 as const)
4358
+ ),
3533
4359
  /**
3534
4360
  * The number of web search tool requests.
3535
4361
  */
@@ -3574,6 +4400,58 @@ export class BetaUsage extends S.Class<BetaUsage>("BetaUsage")({
3574
4400
  "service_tier": S.optionalWith(S.NullOr(BetaUsageServiceTierEnum), { default: () => null })
3575
4401
  }) {}
3576
4402
 
4403
+ export class BetaResponseClearToolUses20250919Edit
4404
+ extends S.Class<BetaResponseClearToolUses20250919Edit>("BetaResponseClearToolUses20250919Edit")({
4405
+ /**
4406
+ * Number of input tokens cleared by this edit.
4407
+ */
4408
+ "cleared_input_tokens": S.Int.pipe(S.greaterThanOrEqualTo(0)),
4409
+ /**
4410
+ * Number of tool uses that were cleared.
4411
+ */
4412
+ "cleared_tool_uses": S.Int.pipe(S.greaterThanOrEqualTo(0)),
4413
+ /**
4414
+ * The type of context management edit applied.
4415
+ */
4416
+ "type": S.Literal("clear_tool_uses_20250919").pipe(
4417
+ S.propertySignature,
4418
+ S.withConstructorDefault(() => "clear_tool_uses_20250919" as const)
4419
+ )
4420
+ })
4421
+ {}
4422
+
4423
+ export class BetaResponseContextManagement
4424
+ extends S.Class<BetaResponseContextManagement>("BetaResponseContextManagement")({
4425
+ /**
4426
+ * List of context management edits that were applied.
4427
+ */
4428
+ "applied_edits": S.Array(BetaResponseClearToolUses20250919Edit)
4429
+ })
4430
+ {}
4431
+
4432
+ /**
4433
+ * Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
4434
+ */
4435
+ export class BetaSkillType extends S.Literal("anthropic", "custom") {}
4436
+
4437
+ /**
4438
+ * A skill that was loaded in a container (response model).
4439
+ */
4440
+ export class BetaSkill extends S.Class<BetaSkill>("BetaSkill")({
4441
+ /**
4442
+ * Skill ID
4443
+ */
4444
+ "skill_id": S.String.pipe(S.minLength(1), S.maxLength(64)),
4445
+ /**
4446
+ * Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
4447
+ */
4448
+ "type": BetaSkillType,
4449
+ /**
4450
+ * Skill version or 'latest' for most recent version
4451
+ */
4452
+ "version": S.String.pipe(S.minLength(1), S.maxLength(64))
4453
+ }) {}
4454
+
3577
4455
  /**
3578
4456
  * Information about the container used in the request (for the code execution tool)
3579
4457
  */
@@ -3585,7 +4463,11 @@ export class BetaContainer extends S.Class<BetaContainer>("BetaContainer")({
3585
4463
  /**
3586
4464
  * Identifier for the container used in this request
3587
4465
  */
3588
- "id": S.String
4466
+ "id": S.String,
4467
+ /**
4468
+ * Skills loaded in the container
4469
+ */
4470
+ "skills": S.optionalWith(S.NullOr(S.Array(BetaSkill)), { default: () => null })
3589
4471
  }) {}
3590
4472
 
3591
4473
  export class BetaMessage extends S.Class<BetaMessage>("BetaMessage")({
@@ -3635,7 +4517,7 @@ export class BetaMessage extends S.Class<BetaMessage>("BetaMessage")({
3635
4517
  * ```
3636
4518
  */
3637
4519
  "content": S.Array(BetaContentBlock),
3638
- "model": Model,
4520
+ "model": S.Union(S.String, Model),
3639
4521
  /**
3640
4522
  * The reason that we stopped.
3641
4523
  *
@@ -3668,6 +4550,12 @@ export class BetaMessage extends S.Class<BetaMessage>("BetaMessage")({
3668
4550
  * Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.
3669
4551
  */
3670
4552
  "usage": BetaUsage,
4553
+ /**
4554
+ * Context management response.
4555
+ *
4556
+ * Information about context management strategies applied during the request.
4557
+ */
4558
+ "context_management": S.optionalWith(S.NullOr(BetaResponseContextManagement), { default: () => null }),
3671
4559
  /**
3672
4560
  * Information about the container used in this request.
3673
4561
  *
@@ -3755,7 +4643,103 @@ export class BetaErrorResponse extends S.Class<BetaErrorResponse>("BetaErrorResp
3755
4643
  "type": S.Literal("error").pipe(S.propertySignature, S.withConstructorDefault(() => "error" as const))
3756
4644
  }) {}
3757
4645
 
3758
- export class BetaModelsListParams extends S.Struct({
4646
+ export class BetaModelsListParams extends S.Struct({
4647
+ /**
4648
+ * ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
4649
+ */
4650
+ "before_id": S.optionalWith(S.String, { nullable: true }),
4651
+ /**
4652
+ * ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.
4653
+ */
4654
+ "after_id": S.optionalWith(S.String, { nullable: true }),
4655
+ /**
4656
+ * Number of items to return per page.
4657
+ *
4658
+ * Defaults to `20`. Ranges from `1` to `1000`.
4659
+ */
4660
+ "limit": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(1), S.lessThanOrEqualTo(1000)), {
4661
+ nullable: true,
4662
+ default: () => 20 as const
4663
+ }),
4664
+ /**
4665
+ * The version of the Claude API you want to use.
4666
+ *
4667
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
4668
+ */
4669
+ "anthropic-version": S.optionalWith(S.String, { nullable: true }),
4670
+ /**
4671
+ * Your unique API key for authentication.
4672
+ *
4673
+ * 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.
4674
+ */
4675
+ "x-api-key": S.optionalWith(S.String, { nullable: true }),
4676
+ /**
4677
+ * Optional header to specify the beta version(s) you want to use.
4678
+ *
4679
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
4680
+ */
4681
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true })
4682
+ }) {}
4683
+
4684
+ export class BetaModelInfo extends S.Class<BetaModelInfo>("BetaModelInfo")({
4685
+ /**
4686
+ * 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.
4687
+ */
4688
+ "created_at": S.String,
4689
+ /**
4690
+ * A human-readable name for the model.
4691
+ */
4692
+ "display_name": S.String,
4693
+ /**
4694
+ * Unique model identifier.
4695
+ */
4696
+ "id": S.String,
4697
+ /**
4698
+ * Object type.
4699
+ *
4700
+ * For Models, this is always `"model"`.
4701
+ */
4702
+ "type": S.Literal("model").pipe(S.propertySignature, S.withConstructorDefault(() => "model" as const))
4703
+ }) {}
4704
+
4705
+ export class BetaListResponseModelInfo extends S.Class<BetaListResponseModelInfo>("BetaListResponseModelInfo")({
4706
+ "data": S.Array(BetaModelInfo),
4707
+ /**
4708
+ * First ID in the `data` list. Can be used as the `before_id` for the previous page.
4709
+ */
4710
+ "first_id": S.NullOr(S.String),
4711
+ /**
4712
+ * Indicates if there are more results in the requested page direction.
4713
+ */
4714
+ "has_more": S.Boolean,
4715
+ /**
4716
+ * Last ID in the `data` list. Can be used as the `after_id` for the next page.
4717
+ */
4718
+ "last_id": S.NullOr(S.String)
4719
+ }) {}
4720
+
4721
+ export class BetaModelsGetParams extends S.Struct({
4722
+ /**
4723
+ * The version of the Claude API you want to use.
4724
+ *
4725
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
4726
+ */
4727
+ "anthropic-version": S.optionalWith(S.String, { nullable: true }),
4728
+ /**
4729
+ * Your unique API key for authentication.
4730
+ *
4731
+ * 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.
4732
+ */
4733
+ "x-api-key": S.optionalWith(S.String, { nullable: true }),
4734
+ /**
4735
+ * Optional header to specify the beta version(s) you want to use.
4736
+ *
4737
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
4738
+ */
4739
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true })
4740
+ }) {}
4741
+
4742
+ export class BetaMessageBatchesListParams extends S.Struct({
3759
4743
  /**
3760
4744
  * ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
3761
4745
  */
@@ -3774,9 +4758,15 @@ export class BetaModelsListParams extends S.Struct({
3774
4758
  default: () => 20 as const
3775
4759
  }),
3776
4760
  /**
3777
- * The version of the Anthropic API you want to use.
4761
+ * Optional header to specify the beta version(s) you want to use.
4762
+ *
4763
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
4764
+ */
4765
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
4766
+ /**
4767
+ * The version of the Claude API you want to use.
3778
4768
  *
3779
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
4769
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
3780
4770
  */
3781
4771
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
3782
4772
  /**
@@ -3784,57 +4774,189 @@ export class BetaModelsListParams extends S.Struct({
3784
4774
  *
3785
4775
  * 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.
3786
4776
  */
3787
- "x-api-key": S.optionalWith(S.String, { nullable: true }),
4777
+ "x-api-key": S.optionalWith(S.String, { nullable: true })
4778
+ }) {}
4779
+
4780
+ /**
4781
+ * Processing status of the Message Batch.
4782
+ */
4783
+ export class BetaMessageBatchProcessingStatus extends S.Literal("in_progress", "canceling", "ended") {}
4784
+
4785
+ export class BetaRequestCounts extends S.Class<BetaRequestCounts>("BetaRequestCounts")({
3788
4786
  /**
3789
- * Optional header to specify the beta version(s) you want to use.
4787
+ * Number of requests in the Message Batch that have been canceled.
3790
4788
  *
3791
- * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
4789
+ * This is zero until processing of the entire Message Batch has ended.
3792
4790
  */
3793
- "anthropic-beta": S.optionalWith(S.String, { nullable: true })
4791
+ "canceled": S.Int.pipe(S.propertySignature, S.withConstructorDefault(() => 0 as const)),
4792
+ /**
4793
+ * Number of requests in the Message Batch that encountered an error.
4794
+ *
4795
+ * This is zero until processing of the entire Message Batch has ended.
4796
+ */
4797
+ "errored": S.Int.pipe(S.propertySignature, S.withConstructorDefault(() => 0 as const)),
4798
+ /**
4799
+ * Number of requests in the Message Batch that have expired.
4800
+ *
4801
+ * This is zero until processing of the entire Message Batch has ended.
4802
+ */
4803
+ "expired": S.Int.pipe(S.propertySignature, S.withConstructorDefault(() => 0 as const)),
4804
+ /**
4805
+ * Number of requests in the Message Batch that are processing.
4806
+ */
4807
+ "processing": S.Int.pipe(S.propertySignature, S.withConstructorDefault(() => 0 as const)),
4808
+ /**
4809
+ * Number of requests in the Message Batch that have completed successfully.
4810
+ *
4811
+ * This is zero until processing of the entire Message Batch has ended.
4812
+ */
4813
+ "succeeded": S.Int.pipe(S.propertySignature, S.withConstructorDefault(() => 0 as const))
3794
4814
  }) {}
3795
4815
 
3796
- export class BetaModelInfo extends S.Class<BetaModelInfo>("BetaModelInfo")({
4816
+ export class BetaMessageBatch extends S.Class<BetaMessageBatch>("BetaMessageBatch")({
3797
4817
  /**
3798
- * 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.
4818
+ * RFC 3339 datetime string representing the time at which the Message Batch was archived and its results became unavailable.
4819
+ */
4820
+ "archived_at": S.NullOr(S.String),
4821
+ /**
4822
+ * RFC 3339 datetime string representing the time at which cancellation was initiated for the Message Batch. Specified only if cancellation was initiated.
4823
+ */
4824
+ "cancel_initiated_at": S.NullOr(S.String),
4825
+ /**
4826
+ * RFC 3339 datetime string representing the time at which the Message Batch was created.
3799
4827
  */
3800
4828
  "created_at": S.String,
3801
4829
  /**
3802
- * A human-readable name for the model.
4830
+ * RFC 3339 datetime string representing the time at which processing for the Message Batch ended. Specified only once processing ends.
4831
+ *
4832
+ * Processing ends when every request in a Message Batch has either succeeded, errored, canceled, or expired.
3803
4833
  */
3804
- "display_name": S.String,
4834
+ "ended_at": S.NullOr(S.String),
3805
4835
  /**
3806
- * Unique model identifier.
4836
+ * RFC 3339 datetime string representing the time at which the Message Batch will expire and end processing, which is 24 hours after creation.
4837
+ */
4838
+ "expires_at": S.String,
4839
+ /**
4840
+ * Unique object identifier.
4841
+ *
4842
+ * The format and length of IDs may change over time.
3807
4843
  */
3808
4844
  "id": S.String,
4845
+ /**
4846
+ * Processing status of the Message Batch.
4847
+ */
4848
+ "processing_status": BetaMessageBatchProcessingStatus,
4849
+ /**
4850
+ * Tallies requests within the Message Batch, categorized by their status.
4851
+ *
4852
+ * Requests start as `processing` and move to one of the other statuses only once processing of the entire batch ends. The sum of all values always matches the total number of requests in the batch.
4853
+ */
4854
+ "request_counts": BetaRequestCounts,
4855
+ /**
4856
+ * URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.
4857
+ *
4858
+ * Results in the file are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.
4859
+ */
4860
+ "results_url": S.NullOr(S.String),
3809
4861
  /**
3810
4862
  * Object type.
3811
4863
  *
3812
- * For Models, this is always `"model"`.
4864
+ * For Message Batches, this is always `"message_batch"`.
3813
4865
  */
3814
- "type": S.Literal("model").pipe(S.propertySignature, S.withConstructorDefault(() => "model" as const))
4866
+ "type": S.Literal("message_batch").pipe(S.propertySignature, S.withConstructorDefault(() => "message_batch" as const))
3815
4867
  }) {}
3816
4868
 
3817
- export class BetaListResponseModelInfo extends S.Class<BetaListResponseModelInfo>("BetaListResponseModelInfo")({
3818
- "data": S.Array(BetaModelInfo),
4869
+ export class BetaListResponseMessageBatch
4870
+ extends S.Class<BetaListResponseMessageBatch>("BetaListResponseMessageBatch")({
4871
+ "data": S.Array(BetaMessageBatch),
4872
+ /**
4873
+ * First ID in the `data` list. Can be used as the `before_id` for the previous page.
4874
+ */
4875
+ "first_id": S.NullOr(S.String),
4876
+ /**
4877
+ * Indicates if there are more results in the requested page direction.
4878
+ */
4879
+ "has_more": S.Boolean,
4880
+ /**
4881
+ * Last ID in the `data` list. Can be used as the `after_id` for the next page.
4882
+ */
4883
+ "last_id": S.NullOr(S.String)
4884
+ })
4885
+ {}
4886
+
4887
+ export class BetaMessageBatchesPostParams extends S.Struct({
3819
4888
  /**
3820
- * First ID in the `data` list. Can be used as the `before_id` for the previous page.
4889
+ * Optional header to specify the beta version(s) you want to use.
4890
+ *
4891
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
3821
4892
  */
3822
- "first_id": S.NullOr(S.String),
4893
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
3823
4894
  /**
3824
- * Indicates if there are more results in the requested page direction.
4895
+ * The version of the Claude API you want to use.
4896
+ *
4897
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
3825
4898
  */
3826
- "has_more": S.Boolean,
4899
+ "anthropic-version": S.optionalWith(S.String, { nullable: true })
4900
+ }) {}
4901
+
4902
+ export class BetaMessageBatchIndividualRequestParams
4903
+ extends S.Class<BetaMessageBatchIndividualRequestParams>("BetaMessageBatchIndividualRequestParams")({
4904
+ /**
4905
+ * Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.
4906
+ *
4907
+ * Must be unique for each request within the Message Batch.
4908
+ */
4909
+ "custom_id": S.String.pipe(S.minLength(1), S.maxLength(64), S.pattern(new RegExp("^[a-zA-Z0-9_-]{1,64}$"))),
4910
+ /**
4911
+ * Messages API creation parameters for the individual request.
4912
+ *
4913
+ * See the [Messages API reference](/en/api/messages) for full documentation on available parameters.
4914
+ */
4915
+ "params": BetaCreateMessageParams
4916
+ })
4917
+ {}
4918
+
4919
+ export class BetaCreateMessageBatchParams
4920
+ extends S.Class<BetaCreateMessageBatchParams>("BetaCreateMessageBatchParams")({
4921
+ /**
4922
+ * List of requests for prompt completion. Each is an individual request to create a Message.
4923
+ */
4924
+ "requests": S.NonEmptyArray(BetaMessageBatchIndividualRequestParams).pipe(S.minItems(1), S.maxItems(10000))
4925
+ })
4926
+ {}
4927
+
4928
+ export class BetaMessageBatchesRetrieveParams extends S.Struct({
3827
4929
  /**
3828
- * Last ID in the `data` list. Can be used as the `after_id` for the next page.
4930
+ * Optional header to specify the beta version(s) you want to use.
4931
+ *
4932
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
3829
4933
  */
3830
- "last_id": S.NullOr(S.String)
4934
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
4935
+ /**
4936
+ * The version of the Claude API you want to use.
4937
+ *
4938
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
4939
+ */
4940
+ "anthropic-version": S.optionalWith(S.String, { nullable: true }),
4941
+ /**
4942
+ * Your unique API key for authentication.
4943
+ *
4944
+ * 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.
4945
+ */
4946
+ "x-api-key": S.optionalWith(S.String, { nullable: true })
3831
4947
  }) {}
3832
4948
 
3833
- export class BetaModelsGetParams extends S.Struct({
4949
+ export class BetaMessageBatchesDeleteParams extends S.Struct({
4950
+ /**
4951
+ * Optional header to specify the beta version(s) you want to use.
4952
+ *
4953
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
4954
+ */
4955
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
3834
4956
  /**
3835
- * The version of the Anthropic API you want to use.
4957
+ * The version of the Claude API you want to use.
3836
4958
  *
3837
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
4959
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
3838
4960
  */
3839
4961
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
3840
4962
  /**
@@ -3842,16 +4964,260 @@ export class BetaModelsGetParams extends S.Struct({
3842
4964
  *
3843
4965
  * 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.
3844
4966
  */
3845
- "x-api-key": S.optionalWith(S.String, { nullable: true }),
4967
+ "x-api-key": S.optionalWith(S.String, { nullable: true })
4968
+ }) {}
4969
+
4970
+ export class BetaDeleteMessageBatchResponse
4971
+ extends S.Class<BetaDeleteMessageBatchResponse>("BetaDeleteMessageBatchResponse")({
4972
+ /**
4973
+ * ID of the Message Batch.
4974
+ */
4975
+ "id": S.String,
4976
+ /**
4977
+ * Deleted object type.
4978
+ *
4979
+ * For Message Batches, this is always `"message_batch_deleted"`.
4980
+ */
4981
+ "type": S.Literal("message_batch_deleted").pipe(
4982
+ S.propertySignature,
4983
+ S.withConstructorDefault(() => "message_batch_deleted" as const)
4984
+ )
4985
+ })
4986
+ {}
4987
+
4988
+ export class BetaMessageBatchesCancelParams extends S.Struct({
4989
+ /**
4990
+ * Optional header to specify the beta version(s) you want to use.
4991
+ *
4992
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
4993
+ */
4994
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
4995
+ /**
4996
+ * The version of the Claude API you want to use.
4997
+ *
4998
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
4999
+ */
5000
+ "anthropic-version": S.optionalWith(S.String, { nullable: true })
5001
+ }) {}
5002
+
5003
+ export class BetaMessageBatchesResultsParams extends S.Struct({
5004
+ /**
5005
+ * Optional header to specify the beta version(s) you want to use.
5006
+ *
5007
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
5008
+ */
5009
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
5010
+ /**
5011
+ * The version of the Claude API you want to use.
5012
+ *
5013
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
5014
+ */
5015
+ "anthropic-version": S.optionalWith(S.String, { nullable: true }),
5016
+ /**
5017
+ * Your unique API key for authentication.
5018
+ *
5019
+ * 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.
5020
+ */
5021
+ "x-api-key": S.optionalWith(S.String, { nullable: true })
5022
+ }) {}
5023
+
5024
+ export class BetaMessagesCountTokensPostParams extends S.Struct({
3846
5025
  /**
3847
5026
  * Optional header to specify the beta version(s) you want to use.
3848
5027
  *
3849
5028
  * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
3850
5029
  */
3851
- "anthropic-beta": S.optionalWith(S.String, { nullable: true })
5030
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
5031
+ /**
5032
+ * The version of the Claude API you want to use.
5033
+ *
5034
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
5035
+ */
5036
+ "anthropic-version": S.optionalWith(S.String, { nullable: true })
3852
5037
  }) {}
3853
5038
 
3854
- export class BetaMessageBatchesListParams extends S.Struct({
5039
+ export class BetaCountMessageTokensParams
5040
+ extends S.Class<BetaCountMessageTokensParams>("BetaCountMessageTokensParams")({
5041
+ /**
5042
+ * Context management configuration.
5043
+ *
5044
+ * This allows you to control how Claude manages context across multiple requests, such as whether to clear function results or not.
5045
+ */
5046
+ "context_management": S.optionalWith(BetaContextManagementConfig, { nullable: true }),
5047
+ /**
5048
+ * MCP servers to be utilized in this request
5049
+ */
5050
+ "mcp_servers": S.optionalWith(S.Array(BetaRequestMCPServerURLDefinition).pipe(S.maxItems(20)), { nullable: true }),
5051
+ /**
5052
+ * Input messages.
5053
+ *
5054
+ * 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.
5055
+ *
5056
+ * 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.
5057
+ *
5058
+ * 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.
5059
+ *
5060
+ * Example with a single `user` message:
5061
+ *
5062
+ * ```json
5063
+ * [{"role": "user", "content": "Hello, Claude"}]
5064
+ * ```
5065
+ *
5066
+ * Example with multiple conversational turns:
5067
+ *
5068
+ * ```json
5069
+ * [
5070
+ * {"role": "user", "content": "Hello there."},
5071
+ * {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"},
5072
+ * {"role": "user", "content": "Can you explain LLMs in plain English?"},
5073
+ * ]
5074
+ * ```
5075
+ *
5076
+ * Example with a partially-filled response from Claude:
5077
+ *
5078
+ * ```json
5079
+ * [
5080
+ * {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},
5081
+ * {"role": "assistant", "content": "The best answer is ("},
5082
+ * ]
5083
+ * ```
5084
+ *
5085
+ * 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:
5086
+ *
5087
+ * ```json
5088
+ * {"role": "user", "content": "Hello, Claude"}
5089
+ * ```
5090
+ *
5091
+ * ```json
5092
+ * {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
5093
+ * ```
5094
+ *
5095
+ * See [input examples](https://docs.claude.com/en/api/messages-examples).
5096
+ *
5097
+ * 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.
5098
+ *
5099
+ * There is a limit of 100,000 messages in a single request.
5100
+ */
5101
+ "messages": S.Array(BetaInputMessage),
5102
+ "model": S.Union(S.String, Model),
5103
+ /**
5104
+ * System prompt.
5105
+ *
5106
+ * 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).
5107
+ */
5108
+ "system": S.optionalWith(S.Union(S.String, S.Array(BetaRequestTextBlock)), { nullable: true }),
5109
+ "thinking": S.optionalWith(BetaThinkingConfigParam, { nullable: true }),
5110
+ "tool_choice": S.optionalWith(BetaToolChoice, { nullable: true }),
5111
+ /**
5112
+ * Definitions of tools that the model may use.
5113
+ *
5114
+ * 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.
5115
+ *
5116
+ * 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)).
5117
+ *
5118
+ * Each tool definition includes:
5119
+ *
5120
+ * * `name`: Name of the tool.
5121
+ * * `description`: Optional, but strongly-recommended description of the tool.
5122
+ * * `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.
5123
+ *
5124
+ * For example, if you defined `tools` as:
5125
+ *
5126
+ * ```json
5127
+ * [
5128
+ * {
5129
+ * "name": "get_stock_price",
5130
+ * "description": "Get the current stock price for a given ticker symbol.",
5131
+ * "input_schema": {
5132
+ * "type": "object",
5133
+ * "properties": {
5134
+ * "ticker": {
5135
+ * "type": "string",
5136
+ * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
5137
+ * }
5138
+ * },
5139
+ * "required": ["ticker"]
5140
+ * }
5141
+ * }
5142
+ * ]
5143
+ * ```
5144
+ *
5145
+ * 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:
5146
+ *
5147
+ * ```json
5148
+ * [
5149
+ * {
5150
+ * "type": "tool_use",
5151
+ * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
5152
+ * "name": "get_stock_price",
5153
+ * "input": { "ticker": "^GSPC" }
5154
+ * }
5155
+ * ]
5156
+ * ```
5157
+ *
5158
+ * 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:
5159
+ *
5160
+ * ```json
5161
+ * [
5162
+ * {
5163
+ * "type": "tool_result",
5164
+ * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
5165
+ * "content": "259.75 USD"
5166
+ * }
5167
+ * ]
5168
+ * ```
5169
+ *
5170
+ * 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.
5171
+ *
5172
+ * See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
5173
+ */
5174
+ "tools": S.optionalWith(
5175
+ S.Array(
5176
+ S.Union(
5177
+ BetaTool,
5178
+ BetaBashTool20241022,
5179
+ BetaBashTool20250124,
5180
+ BetaCodeExecutionTool20250522,
5181
+ BetaCodeExecutionTool20250825,
5182
+ BetaComputerUseTool20241022,
5183
+ BetaMemoryTool20250818,
5184
+ BetaComputerUseTool20250124,
5185
+ BetaTextEditor20241022,
5186
+ BetaTextEditor20250124,
5187
+ BetaTextEditor20250429,
5188
+ BetaTextEditor20250728,
5189
+ BetaWebSearchTool20250305,
5190
+ BetaWebFetchTool20250910
5191
+ )
5192
+ ),
5193
+ { nullable: true }
5194
+ )
5195
+ })
5196
+ {}
5197
+
5198
+ export class BetaContextManagementResponse
5199
+ extends S.Class<BetaContextManagementResponse>("BetaContextManagementResponse")({
5200
+ /**
5201
+ * The original token count before context management was applied
5202
+ */
5203
+ "original_input_tokens": S.Int
5204
+ })
5205
+ {}
5206
+
5207
+ export class BetaCountMessageTokensResponse
5208
+ extends S.Class<BetaCountMessageTokensResponse>("BetaCountMessageTokensResponse")({
5209
+ /**
5210
+ * Information about context management applied to the message.
5211
+ */
5212
+ "context_management": S.NullOr(BetaContextManagementResponse),
5213
+ /**
5214
+ * The total number of tokens across the provided list of messages, system prompt, and tools.
5215
+ */
5216
+ "input_tokens": S.Int
5217
+ })
5218
+ {}
5219
+
5220
+ export class BetaListFilesV1FilesGetParams extends S.Struct({
3855
5221
  /**
3856
5222
  * ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
3857
5223
  */
@@ -3876,9 +5242,9 @@ export class BetaMessageBatchesListParams extends S.Struct({
3876
5242
  */
3877
5243
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
3878
5244
  /**
3879
- * The version of the Anthropic API you want to use.
5245
+ * The version of the Claude API you want to use.
3880
5246
  *
3881
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
5247
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
3882
5248
  */
3883
5249
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
3884
5250
  /**
@@ -3889,114 +5255,61 @@ export class BetaMessageBatchesListParams extends S.Struct({
3889
5255
  "x-api-key": S.optionalWith(S.String, { nullable: true })
3890
5256
  }) {}
3891
5257
 
3892
- /**
3893
- * Processing status of the Message Batch.
3894
- */
3895
- export class BetaMessageBatchProcessingStatus extends S.Literal("in_progress", "canceling", "ended") {}
3896
-
3897
- export class BetaRequestCounts extends S.Class<BetaRequestCounts>("BetaRequestCounts")({
3898
- /**
3899
- * Number of requests in the Message Batch that have been canceled.
3900
- *
3901
- * This is zero until processing of the entire Message Batch has ended.
3902
- */
3903
- "canceled": S.Int.pipe(S.propertySignature, S.withConstructorDefault(() => 0 as const)),
5258
+ export class BetaFileMetadataSchema extends S.Class<BetaFileMetadataSchema>("BetaFileMetadataSchema")({
3904
5259
  /**
3905
- * Number of requests in the Message Batch that encountered an error.
3906
- *
3907
- * This is zero until processing of the entire Message Batch has ended.
5260
+ * RFC 3339 datetime string representing when the file was created.
3908
5261
  */
3909
- "errored": S.Int.pipe(S.propertySignature, S.withConstructorDefault(() => 0 as const)),
5262
+ "created_at": S.String,
3910
5263
  /**
3911
- * Number of requests in the Message Batch that have expired.
3912
- *
3913
- * This is zero until processing of the entire Message Batch has ended.
5264
+ * Whether the file can be downloaded.
3914
5265
  */
3915
- "expired": S.Int.pipe(S.propertySignature, S.withConstructorDefault(() => 0 as const)),
5266
+ "downloadable": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
3916
5267
  /**
3917
- * Number of requests in the Message Batch that are processing.
5268
+ * Original filename of the uploaded file.
3918
5269
  */
3919
- "processing": S.Int.pipe(S.propertySignature, S.withConstructorDefault(() => 0 as const)),
5270
+ "filename": S.String.pipe(S.minLength(1), S.maxLength(500)),
3920
5271
  /**
3921
- * Number of requests in the Message Batch that have completed successfully.
5272
+ * Unique object identifier.
3922
5273
  *
3923
- * This is zero until processing of the entire Message Batch has ended.
3924
- */
3925
- "succeeded": S.Int.pipe(S.propertySignature, S.withConstructorDefault(() => 0 as const))
3926
- }) {}
3927
-
3928
- export class BetaMessageBatch extends S.Class<BetaMessageBatch>("BetaMessageBatch")({
3929
- /**
3930
- * RFC 3339 datetime string representing the time at which the Message Batch was archived and its results became unavailable.
3931
- */
3932
- "archived_at": S.NullOr(S.String),
3933
- /**
3934
- * RFC 3339 datetime string representing the time at which cancellation was initiated for the Message Batch. Specified only if cancellation was initiated.
3935
- */
3936
- "cancel_initiated_at": S.NullOr(S.String),
3937
- /**
3938
- * RFC 3339 datetime string representing the time at which the Message Batch was created.
5274
+ * The format and length of IDs may change over time.
3939
5275
  */
3940
- "created_at": S.String,
5276
+ "id": S.String,
3941
5277
  /**
3942
- * RFC 3339 datetime string representing the time at which processing for the Message Batch ended. Specified only once processing ends.
3943
- *
3944
- * Processing ends when every request in a Message Batch has either succeeded, errored, canceled, or expired.
5278
+ * MIME type of the file.
3945
5279
  */
3946
- "ended_at": S.NullOr(S.String),
5280
+ "mime_type": S.String.pipe(S.minLength(1), S.maxLength(255)),
3947
5281
  /**
3948
- * RFC 3339 datetime string representing the time at which the Message Batch will expire and end processing, which is 24 hours after creation.
5282
+ * Size of the file in bytes.
3949
5283
  */
3950
- "expires_at": S.String,
5284
+ "size_bytes": S.Int.pipe(S.greaterThanOrEqualTo(0)),
3951
5285
  /**
3952
- * Unique object identifier.
5286
+ * Object type.
3953
5287
  *
3954
- * The format and length of IDs may change over time.
5288
+ * For files, this is always `"file"`.
3955
5289
  */
3956
- "id": S.String,
5290
+ "type": S.Literal("file")
5291
+ }) {}
5292
+
5293
+ export class BetaFileListResponse extends S.Class<BetaFileListResponse>("BetaFileListResponse")({
3957
5294
  /**
3958
- * Processing status of the Message Batch.
5295
+ * List of file metadata objects.
3959
5296
  */
3960
- "processing_status": BetaMessageBatchProcessingStatus,
5297
+ "data": S.Array(BetaFileMetadataSchema),
3961
5298
  /**
3962
- * Tallies requests within the Message Batch, categorized by their status.
3963
- *
3964
- * Requests start as `processing` and move to one of the other statuses only once processing of the entire batch ends. The sum of all values always matches the total number of requests in the batch.
5299
+ * ID of the first file in this page of results.
3965
5300
  */
3966
- "request_counts": BetaRequestCounts,
5301
+ "first_id": S.optionalWith(S.String, { nullable: true }),
3967
5302
  /**
3968
- * URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.
3969
- *
3970
- * Results in the file are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.
5303
+ * Whether there are more results available.
3971
5304
  */
3972
- "results_url": S.NullOr(S.String),
5305
+ "has_more": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
3973
5306
  /**
3974
- * Object type.
3975
- *
3976
- * For Message Batches, this is always `"message_batch"`.
5307
+ * ID of the last file in this page of results.
3977
5308
  */
3978
- "type": S.Literal("message_batch").pipe(S.propertySignature, S.withConstructorDefault(() => "message_batch" as const))
5309
+ "last_id": S.optionalWith(S.String, { nullable: true })
3979
5310
  }) {}
3980
5311
 
3981
- export class BetaListResponseMessageBatch
3982
- extends S.Class<BetaListResponseMessageBatch>("BetaListResponseMessageBatch")({
3983
- "data": S.Array(BetaMessageBatch),
3984
- /**
3985
- * First ID in the `data` list. Can be used as the `before_id` for the previous page.
3986
- */
3987
- "first_id": S.NullOr(S.String),
3988
- /**
3989
- * Indicates if there are more results in the requested page direction.
3990
- */
3991
- "has_more": S.Boolean,
3992
- /**
3993
- * Last ID in the `data` list. Can be used as the `after_id` for the next page.
3994
- */
3995
- "last_id": S.NullOr(S.String)
3996
- })
3997
- {}
3998
-
3999
- export class BetaMessageBatchesPostParams extends S.Struct({
5312
+ export class BetaUploadFileV1FilesPostParams extends S.Struct({
4000
5313
  /**
4001
5314
  * Optional header to specify the beta version(s) you want to use.
4002
5315
  *
@@ -4004,40 +5317,23 @@ export class BetaMessageBatchesPostParams extends S.Struct({
4004
5317
  */
4005
5318
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
4006
5319
  /**
4007
- * The version of the Anthropic API you want to use.
5320
+ * The version of the Claude API you want to use.
4008
5321
  *
4009
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
5322
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
4010
5323
  */
4011
5324
  "anthropic-version": S.optionalWith(S.String, { nullable: true })
4012
5325
  }) {}
4013
5326
 
4014
- export class BetaMessageBatchIndividualRequestParams
4015
- extends S.Class<BetaMessageBatchIndividualRequestParams>("BetaMessageBatchIndividualRequestParams")({
4016
- /**
4017
- * Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.
4018
- *
4019
- * Must be unique for each request within the Message Batch.
4020
- */
4021
- "custom_id": S.String.pipe(S.minLength(1), S.maxLength(64), S.pattern(new RegExp("^[a-zA-Z0-9_-]{1,64}$"))),
4022
- /**
4023
- * Messages API creation parameters for the individual request.
4024
- *
4025
- * See the [Messages API reference](/en/api/messages) for full documentation on available parameters.
4026
- */
4027
- "params": BetaCreateMessageParams
4028
- })
4029
- {}
4030
-
4031
- export class BetaCreateMessageBatchParams
4032
- extends S.Class<BetaCreateMessageBatchParams>("BetaCreateMessageBatchParams")({
5327
+ export class BetaUploadFileV1FilesPostRequest
5328
+ extends S.Class<BetaUploadFileV1FilesPostRequest>("BetaUploadFileV1FilesPostRequest")({
4033
5329
  /**
4034
- * List of requests for prompt completion. Each is an individual request to create a Message.
5330
+ * The file to upload
4035
5331
  */
4036
- "requests": S.NonEmptyArray(BetaMessageBatchIndividualRequestParams).pipe(S.minItems(1), S.maxItems(10000))
5332
+ "file": S.instanceOf(globalThis.Blob)
4037
5333
  })
4038
5334
  {}
4039
5335
 
4040
- export class BetaMessageBatchesRetrieveParams extends S.Struct({
5336
+ export class BetaGetFileMetadataV1FilesFileIdGetParams extends S.Struct({
4041
5337
  /**
4042
5338
  * Optional header to specify the beta version(s) you want to use.
4043
5339
  *
@@ -4045,9 +5341,9 @@ export class BetaMessageBatchesRetrieveParams extends S.Struct({
4045
5341
  */
4046
5342
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
4047
5343
  /**
4048
- * The version of the Anthropic API you want to use.
5344
+ * The version of the Claude API you want to use.
4049
5345
  *
4050
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
5346
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
4051
5347
  */
4052
5348
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
4053
5349
  /**
@@ -4058,7 +5354,7 @@ export class BetaMessageBatchesRetrieveParams extends S.Struct({
4058
5354
  "x-api-key": S.optionalWith(S.String, { nullable: true })
4059
5355
  }) {}
4060
5356
 
4061
- export class BetaMessageBatchesDeleteParams extends S.Struct({
5357
+ export class BetaDeleteFileV1FilesFileIdDeleteParams extends S.Struct({
4062
5358
  /**
4063
5359
  * Optional header to specify the beta version(s) you want to use.
4064
5360
  *
@@ -4066,9 +5362,9 @@ export class BetaMessageBatchesDeleteParams extends S.Struct({
4066
5362
  */
4067
5363
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
4068
5364
  /**
4069
- * The version of the Anthropic API you want to use.
5365
+ * The version of the Claude API you want to use.
4070
5366
  *
4071
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
5367
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
4072
5368
  */
4073
5369
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
4074
5370
  /**
@@ -4079,25 +5375,20 @@ export class BetaMessageBatchesDeleteParams extends S.Struct({
4079
5375
  "x-api-key": S.optionalWith(S.String, { nullable: true })
4080
5376
  }) {}
4081
5377
 
4082
- export class BetaDeleteMessageBatchResponse
4083
- extends S.Class<BetaDeleteMessageBatchResponse>("BetaDeleteMessageBatchResponse")({
4084
- /**
4085
- * ID of the Message Batch.
4086
- */
4087
- "id": S.String,
4088
- /**
4089
- * Deleted object type.
4090
- *
4091
- * For Message Batches, this is always `"message_batch_deleted"`.
4092
- */
4093
- "type": S.Literal("message_batch_deleted").pipe(
4094
- S.propertySignature,
4095
- S.withConstructorDefault(() => "message_batch_deleted" as const)
4096
- )
4097
- })
4098
- {}
5378
+ export class BetaFileDeleteResponse extends S.Class<BetaFileDeleteResponse>("BetaFileDeleteResponse")({
5379
+ /**
5380
+ * ID of the deleted file.
5381
+ */
5382
+ "id": S.String,
5383
+ /**
5384
+ * Deleted object type.
5385
+ *
5386
+ * For file deletion, this is always `"file_deleted"`.
5387
+ */
5388
+ "type": S.optionalWith(S.Literal("file_deleted"), { nullable: true, default: () => "file_deleted" as const })
5389
+ }) {}
4099
5390
 
4100
- export class BetaMessageBatchesCancelParams extends S.Struct({
5391
+ export class BetaDownloadFileV1FilesFileIdContentGetParams extends S.Struct({
4101
5392
  /**
4102
5393
  * Optional header to specify the beta version(s) you want to use.
4103
5394
  *
@@ -4105,14 +5396,40 @@ export class BetaMessageBatchesCancelParams extends S.Struct({
4105
5396
  */
4106
5397
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
4107
5398
  /**
4108
- * The version of the Anthropic API you want to use.
5399
+ * The version of the Claude API you want to use.
4109
5400
  *
4110
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
5401
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
4111
5402
  */
4112
- "anthropic-version": S.optionalWith(S.String, { nullable: true })
5403
+ "anthropic-version": S.optionalWith(S.String, { nullable: true }),
5404
+ /**
5405
+ * Your unique API key for authentication.
5406
+ *
5407
+ * 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.
5408
+ */
5409
+ "x-api-key": S.optionalWith(S.String, { nullable: true })
4113
5410
  }) {}
4114
5411
 
4115
- export class BetaMessageBatchesResultsParams extends S.Struct({
5412
+ export class BetaListSkillsV1SkillsGetParams extends S.Struct({
5413
+ /**
5414
+ * Pagination token for fetching a specific page of results.
5415
+ *
5416
+ * Pass the value from a previous response's `next_page` field to get the next page of results.
5417
+ */
5418
+ "page": S.optionalWith(S.String, { nullable: true }),
5419
+ /**
5420
+ * Number of results to return per page.
5421
+ *
5422
+ * Maximum value is 100. Defaults to 20.
5423
+ */
5424
+ "limit": S.optionalWith(S.Int, { nullable: true, default: () => 20 as const }),
5425
+ /**
5426
+ * Filter skills by source.
5427
+ *
5428
+ * If provided, only skills from the specified source will be returned:
5429
+ * * `"custom"`: only return user-created skills
5430
+ * * `"anthropic"`: only return Anthropic-created skills
5431
+ */
5432
+ "source": S.optionalWith(S.String, { nullable: true }),
4116
5433
  /**
4117
5434
  * Optional header to specify the beta version(s) you want to use.
4118
5435
  *
@@ -4120,9 +5437,9 @@ export class BetaMessageBatchesResultsParams extends S.Struct({
4120
5437
  */
4121
5438
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
4122
5439
  /**
4123
- * The version of the Anthropic API you want to use.
5440
+ * The version of the Claude API you want to use.
4124
5441
  *
4125
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
5442
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
4126
5443
  */
4127
5444
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
4128
5445
  /**
@@ -4133,199 +5450,144 @@ export class BetaMessageBatchesResultsParams extends S.Struct({
4133
5450
  "x-api-key": S.optionalWith(S.String, { nullable: true })
4134
5451
  }) {}
4135
5452
 
4136
- export class BetaMessagesCountTokensPostParams extends S.Struct({
5453
+ export class BetaapiSchemasSkillsSkill extends S.Class<BetaapiSchemasSkillsSkill>("BetaapiSchemasSkillsSkill")({
4137
5454
  /**
4138
- * Optional header to specify the beta version(s) you want to use.
5455
+ * ISO 8601 timestamp of when the skill was created.
5456
+ */
5457
+ "created_at": S.String,
5458
+ /**
5459
+ * Display title for the skill.
4139
5460
  *
4140
- * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
5461
+ * This is a human-readable label that is not included in the prompt sent to the model.
4141
5462
  */
4142
- "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
5463
+ "display_title": S.NullOr(S.String),
4143
5464
  /**
4144
- * The version of the Anthropic API you want to use.
5465
+ * Unique identifier for the skill.
4145
5466
  *
4146
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
5467
+ * The format and length of IDs may change over time.
4147
5468
  */
4148
- "anthropic-version": S.optionalWith(S.String, { nullable: true })
5469
+ "id": S.String,
5470
+ /**
5471
+ * The latest version identifier for the skill.
5472
+ *
5473
+ * This represents the most recent version of the skill that has been created.
5474
+ */
5475
+ "latest_version": S.NullOr(S.String),
5476
+ /**
5477
+ * Source of the skill.
5478
+ *
5479
+ * This may be one of the following values:
5480
+ * * `"custom"`: the skill was created by a user
5481
+ * * `"anthropic"`: the skill was created by Anthropic
5482
+ */
5483
+ "source": S.String,
5484
+ /**
5485
+ * Object type.
5486
+ *
5487
+ * For Skills, this is always `"skill"`.
5488
+ */
5489
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill" as const)),
5490
+ /**
5491
+ * ISO 8601 timestamp of when the skill was last updated.
5492
+ */
5493
+ "updated_at": S.String
4149
5494
  }) {}
4150
5495
 
4151
- export class BetaCountMessageTokensParams
4152
- extends S.Class<BetaCountMessageTokensParams>("BetaCountMessageTokensParams")({
4153
- /**
4154
- * MCP servers to be utilized in this request
4155
- */
4156
- "mcp_servers": S.optionalWith(S.Array(BetaRequestMCPServerURLDefinition).pipe(S.maxItems(20)), { nullable: true }),
4157
- /**
4158
- * Input messages.
4159
- *
4160
- * 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.
4161
- *
4162
- * 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.
4163
- *
4164
- * 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.
4165
- *
4166
- * Example with a single `user` message:
4167
- *
4168
- * ```json
4169
- * [{"role": "user", "content": "Hello, Claude"}]
4170
- * ```
4171
- *
4172
- * Example with multiple conversational turns:
4173
- *
4174
- * ```json
4175
- * [
4176
- * {"role": "user", "content": "Hello there."},
4177
- * {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"},
4178
- * {"role": "user", "content": "Can you explain LLMs in plain English?"},
4179
- * ]
4180
- * ```
4181
- *
4182
- * Example with a partially-filled response from Claude:
4183
- *
4184
- * ```json
4185
- * [
4186
- * {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},
4187
- * {"role": "assistant", "content": "The best answer is ("},
4188
- * ]
4189
- * ```
4190
- *
4191
- * 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:
4192
- *
4193
- * ```json
4194
- * {"role": "user", "content": "Hello, Claude"}
4195
- * ```
4196
- *
4197
- * ```json
4198
- * {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
4199
- * ```
4200
- *
4201
- * See [input examples](https://docs.anthropic.com/en/api/messages-examples).
4202
- *
4203
- * Note that if you want to include a [system prompt](https://docs.anthropic.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.
4204
- *
4205
- * There is a limit of 100,000 messages in a single request.
4206
- */
4207
- "messages": S.Array(BetaInputMessage),
4208
- "model": Model,
4209
- /**
4210
- * System prompt.
4211
- *
4212
- * 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.anthropic.com/en/docs/system-prompts).
4213
- */
4214
- "system": S.optionalWith(S.Union(S.String, S.Array(BetaRequestTextBlock)), { nullable: true }),
4215
- "thinking": S.optionalWith(BetaThinkingConfigParam, { nullable: true }),
4216
- "tool_choice": S.optionalWith(BetaToolChoice, { nullable: true }),
4217
- /**
4218
- * Definitions of tools that the model may use.
4219
- *
4220
- * 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.
4221
- *
4222
- * There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.anthropic.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.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
4223
- *
4224
- * Each tool definition includes:
4225
- *
4226
- * * `name`: Name of the tool.
4227
- * * `description`: Optional, but strongly-recommended description of the tool.
4228
- * * `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.
4229
- *
4230
- * For example, if you defined `tools` as:
4231
- *
4232
- * ```json
4233
- * [
4234
- * {
4235
- * "name": "get_stock_price",
4236
- * "description": "Get the current stock price for a given ticker symbol.",
4237
- * "input_schema": {
4238
- * "type": "object",
4239
- * "properties": {
4240
- * "ticker": {
4241
- * "type": "string",
4242
- * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
4243
- * }
4244
- * },
4245
- * "required": ["ticker"]
4246
- * }
4247
- * }
4248
- * ]
4249
- * ```
4250
- *
4251
- * 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:
4252
- *
4253
- * ```json
4254
- * [
4255
- * {
4256
- * "type": "tool_use",
4257
- * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
4258
- * "name": "get_stock_price",
4259
- * "input": { "ticker": "^GSPC" }
4260
- * }
4261
- * ]
4262
- * ```
4263
- *
4264
- * 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:
4265
- *
4266
- * ```json
4267
- * [
4268
- * {
4269
- * "type": "tool_result",
4270
- * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
4271
- * "content": "259.75 USD"
4272
- * }
4273
- * ]
4274
- * ```
4275
- *
4276
- * 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.
5496
+ export class BetaListSkillsResponse extends S.Class<BetaListSkillsResponse>("BetaListSkillsResponse")({
5497
+ /**
5498
+ * List of skills.
5499
+ */
5500
+ "data": S.Array(BetaapiSchemasSkillsSkill),
5501
+ /**
5502
+ * Whether there are more results available.
5503
+ *
5504
+ * If `true`, there are additional results that can be fetched using the `next_page` token.
5505
+ */
5506
+ "has_more": S.Boolean,
5507
+ /**
5508
+ * Token for fetching the next page of results.
5509
+ *
5510
+ * If `null`, there are no more results available. Pass this value to the `page_token` parameter in the next request to get the next page.
5511
+ */
5512
+ "next_page": S.NullOr(S.String)
5513
+ }) {}
5514
+
5515
+ export class BetaCreateSkillV1SkillsPostParams extends S.Struct({
5516
+ /**
5517
+ * Optional header to specify the beta version(s) you want to use.
5518
+ *
5519
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
5520
+ */
5521
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
5522
+ /**
5523
+ * The version of the Claude API you want to use.
5524
+ *
5525
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
5526
+ */
5527
+ "anthropic-version": S.optionalWith(S.String, { nullable: true })
5528
+ }) {}
5529
+
5530
+ export class BetaBodyCreateSkillV1SkillsPost
5531
+ extends S.Class<BetaBodyCreateSkillV1SkillsPost>("BetaBodyCreateSkillV1SkillsPost")({
5532
+ /**
5533
+ * Display title for the skill.
4277
5534
  *
4278
- * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
5535
+ * This is a human-readable label that is not included in the prompt sent to the model.
4279
5536
  */
4280
- "tools": S.optionalWith(
4281
- S.Array(
4282
- S.Union(
4283
- BetaTool,
4284
- BetaBashTool20241022,
4285
- BetaBashTool20250124,
4286
- BetaCodeExecutionTool20250522,
4287
- BetaCodeExecutionTool20250825,
4288
- BetaComputerUseTool20241022,
4289
- BetaComputerUseTool20250124,
4290
- BetaTextEditor20241022,
4291
- BetaTextEditor20250124,
4292
- BetaTextEditor20250429,
4293
- BetaTextEditor20250728,
4294
- BetaWebSearchTool20250305
4295
- )
4296
- ),
4297
- { nullable: true }
4298
- )
4299
- })
4300
- {}
4301
-
4302
- export class BetaCountMessageTokensResponse
4303
- extends S.Class<BetaCountMessageTokensResponse>("BetaCountMessageTokensResponse")({
5537
+ "display_title": S.optionalWith(S.String, { nullable: true }),
4304
5538
  /**
4305
- * The total number of tokens across the provided list of messages, system prompt, and tools.
5539
+ * Files to upload for the skill.
5540
+ *
5541
+ * All files must be in the same top-level directory and must include a SKILL.md file at the root of that directory.
4306
5542
  */
4307
- "input_tokens": S.Int
5543
+ "files": S.optionalWith(S.Array(S.instanceOf(globalThis.Blob)), { nullable: true })
4308
5544
  })
4309
5545
  {}
4310
5546
 
4311
- export class BetaListFilesV1FilesGetParams extends S.Struct({
5547
+ export class BetaCreateSkillResponse extends S.Class<BetaCreateSkillResponse>("BetaCreateSkillResponse")({
4312
5548
  /**
4313
- * ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
5549
+ * ISO 8601 timestamp of when the skill was created.
4314
5550
  */
4315
- "before_id": S.optionalWith(S.String, { nullable: true }),
5551
+ "created_at": S.String,
4316
5552
  /**
4317
- * ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.
5553
+ * Display title for the skill.
5554
+ *
5555
+ * This is a human-readable label that is not included in the prompt sent to the model.
4318
5556
  */
4319
- "after_id": S.optionalWith(S.String, { nullable: true }),
5557
+ "display_title": S.NullOr(S.String),
4320
5558
  /**
4321
- * Number of items to return per page.
5559
+ * Unique identifier for the skill.
4322
5560
  *
4323
- * Defaults to `20`. Ranges from `1` to `1000`.
5561
+ * The format and length of IDs may change over time.
4324
5562
  */
4325
- "limit": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(1), S.lessThanOrEqualTo(1000)), {
4326
- nullable: true,
4327
- default: () => 20 as const
4328
- }),
5563
+ "id": S.String,
5564
+ /**
5565
+ * The latest version identifier for the skill.
5566
+ *
5567
+ * This represents the most recent version of the skill that has been created.
5568
+ */
5569
+ "latest_version": S.NullOr(S.String),
5570
+ /**
5571
+ * Source of the skill.
5572
+ *
5573
+ * This may be one of the following values:
5574
+ * * `"custom"`: the skill was created by a user
5575
+ * * `"anthropic"`: the skill was created by Anthropic
5576
+ */
5577
+ "source": S.String,
5578
+ /**
5579
+ * Object type.
5580
+ *
5581
+ * For Skills, this is always `"skill"`.
5582
+ */
5583
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill" as const)),
5584
+ /**
5585
+ * ISO 8601 timestamp of when the skill was last updated.
5586
+ */
5587
+ "updated_at": S.String
5588
+ }) {}
5589
+
5590
+ export class BetaGetSkillV1SkillsSkillIdGetParams extends S.Struct({
4329
5591
  /**
4330
5592
  * Optional header to specify the beta version(s) you want to use.
4331
5593
  *
@@ -4333,9 +5595,9 @@ export class BetaListFilesV1FilesGetParams extends S.Struct({
4333
5595
  */
4334
5596
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
4335
5597
  /**
4336
- * The version of the Anthropic API you want to use.
5598
+ * The version of the Claude API you want to use.
4337
5599
  *
4338
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
5600
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
4339
5601
  */
4340
5602
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
4341
5603
  /**
@@ -4346,61 +5608,96 @@ export class BetaListFilesV1FilesGetParams extends S.Struct({
4346
5608
  "x-api-key": S.optionalWith(S.String, { nullable: true })
4347
5609
  }) {}
4348
5610
 
4349
- export class BetaFileMetadataSchema extends S.Class<BetaFileMetadataSchema>("BetaFileMetadataSchema")({
5611
+ export class BetaGetSkillResponse extends S.Class<BetaGetSkillResponse>("BetaGetSkillResponse")({
4350
5612
  /**
4351
- * RFC 3339 datetime string representing when the file was created.
5613
+ * ISO 8601 timestamp of when the skill was created.
4352
5614
  */
4353
5615
  "created_at": S.String,
4354
5616
  /**
4355
- * Whether the file can be downloaded.
4356
- */
4357
- "downloadable": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
4358
- /**
4359
- * Original filename of the uploaded file.
5617
+ * Display title for the skill.
5618
+ *
5619
+ * This is a human-readable label that is not included in the prompt sent to the model.
4360
5620
  */
4361
- "filename": S.String.pipe(S.minLength(1), S.maxLength(500)),
5621
+ "display_title": S.NullOr(S.String),
4362
5622
  /**
4363
- * Unique object identifier.
5623
+ * Unique identifier for the skill.
4364
5624
  *
4365
5625
  * The format and length of IDs may change over time.
4366
5626
  */
4367
5627
  "id": S.String,
4368
5628
  /**
4369
- * MIME type of the file.
5629
+ * The latest version identifier for the skill.
5630
+ *
5631
+ * This represents the most recent version of the skill that has been created.
4370
5632
  */
4371
- "mime_type": S.String.pipe(S.minLength(1), S.maxLength(255)),
5633
+ "latest_version": S.NullOr(S.String),
4372
5634
  /**
4373
- * Size of the file in bytes.
5635
+ * Source of the skill.
5636
+ *
5637
+ * This may be one of the following values:
5638
+ * * `"custom"`: the skill was created by a user
5639
+ * * `"anthropic"`: the skill was created by Anthropic
4374
5640
  */
4375
- "size_bytes": S.Int.pipe(S.greaterThanOrEqualTo(0)),
5641
+ "source": S.String,
4376
5642
  /**
4377
5643
  * Object type.
4378
5644
  *
4379
- * For files, this is always `"file"`.
5645
+ * For Skills, this is always `"skill"`.
4380
5646
  */
4381
- "type": S.Literal("file")
5647
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill" as const)),
5648
+ /**
5649
+ * ISO 8601 timestamp of when the skill was last updated.
5650
+ */
5651
+ "updated_at": S.String
4382
5652
  }) {}
4383
5653
 
4384
- export class BetaFileListResponse extends S.Class<BetaFileListResponse>("BetaFileListResponse")({
5654
+ export class BetaDeleteSkillV1SkillsSkillIdDeleteParams extends S.Struct({
4385
5655
  /**
4386
- * List of file metadata objects.
5656
+ * Optional header to specify the beta version(s) you want to use.
5657
+ *
5658
+ * To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
4387
5659
  */
4388
- "data": S.Array(BetaFileMetadataSchema),
5660
+ "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
4389
5661
  /**
4390
- * ID of the first file in this page of results.
5662
+ * The version of the Claude API you want to use.
5663
+ *
5664
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
4391
5665
  */
4392
- "first_id": S.optionalWith(S.String, { nullable: true }),
5666
+ "anthropic-version": S.optionalWith(S.String, { nullable: true }),
4393
5667
  /**
4394
- * Whether there are more results available.
5668
+ * Your unique API key for authentication.
5669
+ *
5670
+ * 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.
4395
5671
  */
4396
- "has_more": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
5672
+ "x-api-key": S.optionalWith(S.String, { nullable: true })
5673
+ }) {}
5674
+
5675
+ export class BetaDeleteSkillResponse extends S.Class<BetaDeleteSkillResponse>("BetaDeleteSkillResponse")({
4397
5676
  /**
4398
- * ID of the last file in this page of results.
5677
+ * Unique identifier for the skill.
5678
+ *
5679
+ * The format and length of IDs may change over time.
4399
5680
  */
4400
- "last_id": S.optionalWith(S.String, { nullable: true })
5681
+ "id": S.String,
5682
+ /**
5683
+ * Deleted object type.
5684
+ *
5685
+ * For Skills, this is always `"skill_deleted"`.
5686
+ */
5687
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill_deleted" as const))
4401
5688
  }) {}
4402
5689
 
4403
- export class BetaUploadFileV1FilesPostParams extends S.Struct({
5690
+ export class BetaListSkillVersionsV1SkillsSkillIdVersionsGetParams extends S.Struct({
5691
+ /**
5692
+ * Optionally set to the `next_page` token from the previous response.
5693
+ */
5694
+ "page": S.optionalWith(S.String, { nullable: true }),
5695
+ /**
5696
+ * Number of items to return per page.
5697
+ *
5698
+ * Defaults to `20`. Ranges from `1` to `1000`.
5699
+ */
5700
+ "limit": S.optionalWith(S.Int, { nullable: true }),
4404
5701
  /**
4405
5702
  * Optional header to specify the beta version(s) you want to use.
4406
5703
  *
@@ -4408,23 +5705,84 @@ export class BetaUploadFileV1FilesPostParams extends S.Struct({
4408
5705
  */
4409
5706
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
4410
5707
  /**
4411
- * The version of the Anthropic API you want to use.
5708
+ * The version of the Claude API you want to use.
4412
5709
  *
4413
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
5710
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
4414
5711
  */
4415
- "anthropic-version": S.optionalWith(S.String, { nullable: true })
5712
+ "anthropic-version": S.optionalWith(S.String, { nullable: true }),
5713
+ /**
5714
+ * Your unique API key for authentication.
5715
+ *
5716
+ * 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.
5717
+ */
5718
+ "x-api-key": S.optionalWith(S.String, { nullable: true })
4416
5719
  }) {}
4417
5720
 
4418
- export class BetaUploadFileV1FilesPostRequest
4419
- extends S.Class<BetaUploadFileV1FilesPostRequest>("BetaUploadFileV1FilesPostRequest")({
5721
+ export class BetaSkillVersion extends S.Class<BetaSkillVersion>("BetaSkillVersion")({
5722
+ /**
5723
+ * ISO 8601 timestamp of when the skill version was created.
5724
+ */
5725
+ "created_at": S.String,
5726
+ /**
5727
+ * Description of the skill version.
5728
+ *
5729
+ * This is extracted from the SKILL.md file in the skill upload.
5730
+ */
5731
+ "description": S.String,
5732
+ /**
5733
+ * Directory name of the skill version.
5734
+ *
5735
+ * This is the top-level directory name that was extracted from the uploaded files.
5736
+ */
5737
+ "directory": S.String,
5738
+ /**
5739
+ * Unique identifier for the skill version.
5740
+ *
5741
+ * The format and length of IDs may change over time.
5742
+ */
5743
+ "id": S.String,
5744
+ /**
5745
+ * Human-readable name of the skill version.
5746
+ *
5747
+ * This is extracted from the SKILL.md file in the skill upload.
5748
+ */
5749
+ "name": S.String,
5750
+ /**
5751
+ * Identifier for the skill that this version belongs to.
5752
+ */
5753
+ "skill_id": S.String,
5754
+ /**
5755
+ * Object type.
5756
+ *
5757
+ * For Skill Versions, this is always `"skill_version"`.
5758
+ */
5759
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill_version" as const)),
5760
+ /**
5761
+ * Version identifier for the skill.
5762
+ *
5763
+ * Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
5764
+ */
5765
+ "version": S.String
5766
+ }) {}
5767
+
5768
+ export class BetaListSkillVersionsResponse
5769
+ extends S.Class<BetaListSkillVersionsResponse>("BetaListSkillVersionsResponse")({
4420
5770
  /**
4421
- * The file to upload
5771
+ * List of skill versions.
4422
5772
  */
4423
- "file": S.instanceOf(globalThis.Blob)
5773
+ "data": S.Array(BetaSkillVersion),
5774
+ /**
5775
+ * Indicates if there are more results in the requested page direction.
5776
+ */
5777
+ "has_more": S.Boolean,
5778
+ /**
5779
+ * Token to provide in as `page` in the subsequent request to retrieve the next page of data.
5780
+ */
5781
+ "next_page": S.NullOr(S.String)
4424
5782
  })
4425
5783
  {}
4426
5784
 
4427
- export class BetaGetFileMetadataV1FilesFileIdGetParams extends S.Struct({
5785
+ export class BetaCreateSkillVersionV1SkillsSkillIdVersionsPostParams extends S.Struct({
4428
5786
  /**
4429
5787
  * Optional header to specify the beta version(s) you want to use.
4430
5788
  *
@@ -4432,20 +5790,76 @@ export class BetaGetFileMetadataV1FilesFileIdGetParams extends S.Struct({
4432
5790
  */
4433
5791
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
4434
5792
  /**
4435
- * The version of the Anthropic API you want to use.
4436
- *
4437
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
4438
- */
4439
- "anthropic-version": S.optionalWith(S.String, { nullable: true }),
4440
- /**
4441
- * Your unique API key for authentication.
5793
+ * The version of the Claude API you want to use.
4442
5794
  *
4443
- * 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.
5795
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
4444
5796
  */
4445
- "x-api-key": S.optionalWith(S.String, { nullable: true })
5797
+ "anthropic-version": S.optionalWith(S.String, { nullable: true })
4446
5798
  }) {}
4447
5799
 
4448
- export class BetaDeleteFileV1FilesFileIdDeleteParams extends S.Struct({
5800
+ export class BetaBodyCreateSkillVersionV1SkillsSkillIdVersionsPost
5801
+ extends S.Class<BetaBodyCreateSkillVersionV1SkillsSkillIdVersionsPost>(
5802
+ "BetaBodyCreateSkillVersionV1SkillsSkillIdVersionsPost"
5803
+ )({
5804
+ /**
5805
+ * Files to upload for the skill.
5806
+ *
5807
+ * All files must be in the same top-level directory and must include a SKILL.md file at the root of that directory.
5808
+ */
5809
+ "files": S.optionalWith(S.Array(S.instanceOf(globalThis.Blob)), { nullable: true })
5810
+ })
5811
+ {}
5812
+
5813
+ export class BetaCreateSkillVersionResponse
5814
+ extends S.Class<BetaCreateSkillVersionResponse>("BetaCreateSkillVersionResponse")({
5815
+ /**
5816
+ * ISO 8601 timestamp of when the skill version was created.
5817
+ */
5818
+ "created_at": S.String,
5819
+ /**
5820
+ * Description of the skill version.
5821
+ *
5822
+ * This is extracted from the SKILL.md file in the skill upload.
5823
+ */
5824
+ "description": S.String,
5825
+ /**
5826
+ * Directory name of the skill version.
5827
+ *
5828
+ * This is the top-level directory name that was extracted from the uploaded files.
5829
+ */
5830
+ "directory": S.String,
5831
+ /**
5832
+ * Unique identifier for the skill version.
5833
+ *
5834
+ * The format and length of IDs may change over time.
5835
+ */
5836
+ "id": S.String,
5837
+ /**
5838
+ * Human-readable name of the skill version.
5839
+ *
5840
+ * This is extracted from the SKILL.md file in the skill upload.
5841
+ */
5842
+ "name": S.String,
5843
+ /**
5844
+ * Identifier for the skill that this version belongs to.
5845
+ */
5846
+ "skill_id": S.String,
5847
+ /**
5848
+ * Object type.
5849
+ *
5850
+ * For Skill Versions, this is always `"skill_version"`.
5851
+ */
5852
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill_version" as const)),
5853
+ /**
5854
+ * Version identifier for the skill.
5855
+ *
5856
+ * Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
5857
+ */
5858
+ "version": S.String
5859
+ })
5860
+ {}
5861
+
5862
+ export class BetaGetSkillVersionV1SkillsSkillIdVersionsVersionGetParams extends S.Struct({
4449
5863
  /**
4450
5864
  * Optional header to specify the beta version(s) you want to use.
4451
5865
  *
@@ -4453,9 +5867,9 @@ export class BetaDeleteFileV1FilesFileIdDeleteParams extends S.Struct({
4453
5867
  */
4454
5868
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
4455
5869
  /**
4456
- * The version of the Anthropic API you want to use.
5870
+ * The version of the Claude API you want to use.
4457
5871
  *
4458
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
5872
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
4459
5873
  */
4460
5874
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
4461
5875
  /**
@@ -4466,20 +5880,54 @@ export class BetaDeleteFileV1FilesFileIdDeleteParams extends S.Struct({
4466
5880
  "x-api-key": S.optionalWith(S.String, { nullable: true })
4467
5881
  }) {}
4468
5882
 
4469
- export class BetaFileDeleteResponse extends S.Class<BetaFileDeleteResponse>("BetaFileDeleteResponse")({
5883
+ export class BetaGetSkillVersionResponse extends S.Class<BetaGetSkillVersionResponse>("BetaGetSkillVersionResponse")({
4470
5884
  /**
4471
- * ID of the deleted file.
5885
+ * ISO 8601 timestamp of when the skill version was created.
5886
+ */
5887
+ "created_at": S.String,
5888
+ /**
5889
+ * Description of the skill version.
5890
+ *
5891
+ * This is extracted from the SKILL.md file in the skill upload.
5892
+ */
5893
+ "description": S.String,
5894
+ /**
5895
+ * Directory name of the skill version.
5896
+ *
5897
+ * This is the top-level directory name that was extracted from the uploaded files.
5898
+ */
5899
+ "directory": S.String,
5900
+ /**
5901
+ * Unique identifier for the skill version.
5902
+ *
5903
+ * The format and length of IDs may change over time.
4472
5904
  */
4473
5905
  "id": S.String,
4474
5906
  /**
4475
- * Deleted object type.
5907
+ * Human-readable name of the skill version.
4476
5908
  *
4477
- * For file deletion, this is always `"file_deleted"`.
5909
+ * This is extracted from the SKILL.md file in the skill upload.
4478
5910
  */
4479
- "type": S.optionalWith(S.Literal("file_deleted"), { nullable: true, default: () => "file_deleted" as const })
5911
+ "name": S.String,
5912
+ /**
5913
+ * Identifier for the skill that this version belongs to.
5914
+ */
5915
+ "skill_id": S.String,
5916
+ /**
5917
+ * Object type.
5918
+ *
5919
+ * For Skill Versions, this is always `"skill_version"`.
5920
+ */
5921
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill_version" as const)),
5922
+ /**
5923
+ * Version identifier for the skill.
5924
+ *
5925
+ * Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
5926
+ */
5927
+ "version": S.String
4480
5928
  }) {}
4481
5929
 
4482
- export class BetaDownloadFileV1FilesFileIdContentGetParams extends S.Struct({
5930
+ export class BetaDeleteSkillVersionV1SkillsSkillIdVersionsVersionDeleteParams extends S.Struct({
4483
5931
  /**
4484
5932
  * Optional header to specify the beta version(s) you want to use.
4485
5933
  *
@@ -4487,9 +5935,9 @@ export class BetaDownloadFileV1FilesFileIdContentGetParams extends S.Struct({
4487
5935
  */
4488
5936
  "anthropic-beta": S.optionalWith(S.String, { nullable: true }),
4489
5937
  /**
4490
- * The version of the Anthropic API you want to use.
5938
+ * The version of the Claude API you want to use.
4491
5939
  *
4492
- * Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
5940
+ * Read more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).
4493
5941
  */
4494
5942
  "anthropic-version": S.optionalWith(S.String, { nullable: true }),
4495
5943
  /**
@@ -4500,6 +5948,23 @@ export class BetaDownloadFileV1FilesFileIdContentGetParams extends S.Struct({
4500
5948
  "x-api-key": S.optionalWith(S.String, { nullable: true })
4501
5949
  }) {}
4502
5950
 
5951
+ export class BetaDeleteSkillVersionResponse
5952
+ extends S.Class<BetaDeleteSkillVersionResponse>("BetaDeleteSkillVersionResponse")({
5953
+ /**
5954
+ * Version identifier for the skill.
5955
+ *
5956
+ * Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
5957
+ */
5958
+ "id": S.String,
5959
+ /**
5960
+ * Deleted object type.
5961
+ *
5962
+ * For Skill Versions, this is always `"skill_version_deleted"`.
5963
+ */
5964
+ "type": S.String.pipe(S.propertySignature, S.withConstructorDefault(() => "skill_version_deleted" as const))
5965
+ })
5966
+ {}
5967
+
4503
5968
  export const make = (
4504
5969
  httpClient: HttpClient.HttpClient,
4505
5970
  options: {
@@ -4744,6 +6209,116 @@ export const make = (
4744
6209
  orElse: unexpectedStatus
4745
6210
  }))
4746
6211
  ),
6212
+ "listSkillsV1SkillsGet": (options) =>
6213
+ HttpClientRequest.get(`/v1/skills`).pipe(
6214
+ HttpClientRequest.setUrlParams({
6215
+ "page": options?.["page"] as any,
6216
+ "limit": options?.["limit"] as any,
6217
+ "source": options?.["source"] as any
6218
+ }),
6219
+ HttpClientRequest.setHeaders({
6220
+ "anthropic-beta": options?.["anthropic-beta"] ?? undefined,
6221
+ "anthropic-version": options?.["anthropic-version"] ?? undefined,
6222
+ "x-api-key": options?.["x-api-key"] ?? undefined
6223
+ }),
6224
+ withResponse(HttpClientResponse.matchStatus({
6225
+ "2xx": decodeSuccess(ListSkillsResponse),
6226
+ "4xx": decodeError("ErrorResponse", ErrorResponse),
6227
+ orElse: unexpectedStatus
6228
+ }))
6229
+ ),
6230
+ "createSkillV1SkillsPost": (options) =>
6231
+ HttpClientRequest.post(`/v1/skills`).pipe(
6232
+ HttpClientRequest.setHeaders({
6233
+ "anthropic-beta": options.params?.["anthropic-beta"] ?? undefined,
6234
+ "anthropic-version": options.params?.["anthropic-version"] ?? undefined
6235
+ }),
6236
+ HttpClientRequest.bodyFormDataRecord(options.payload as any),
6237
+ withResponse(HttpClientResponse.matchStatus({
6238
+ "2xx": decodeSuccess(CreateSkillResponse),
6239
+ "4xx": decodeError("ErrorResponse", ErrorResponse),
6240
+ orElse: unexpectedStatus
6241
+ }))
6242
+ ),
6243
+ "getSkillV1SkillsSkillIdGet": (skillId, options) =>
6244
+ HttpClientRequest.get(`/v1/skills/${skillId}`).pipe(
6245
+ HttpClientRequest.setHeaders({
6246
+ "anthropic-beta": options?.["anthropic-beta"] ?? undefined,
6247
+ "anthropic-version": options?.["anthropic-version"] ?? undefined,
6248
+ "x-api-key": options?.["x-api-key"] ?? undefined
6249
+ }),
6250
+ withResponse(HttpClientResponse.matchStatus({
6251
+ "2xx": decodeSuccess(GetSkillResponse),
6252
+ "4xx": decodeError("ErrorResponse", ErrorResponse),
6253
+ orElse: unexpectedStatus
6254
+ }))
6255
+ ),
6256
+ "deleteSkillV1SkillsSkillIdDelete": (skillId, options) =>
6257
+ HttpClientRequest.del(`/v1/skills/${skillId}`).pipe(
6258
+ HttpClientRequest.setHeaders({
6259
+ "anthropic-beta": options?.["anthropic-beta"] ?? undefined,
6260
+ "anthropic-version": options?.["anthropic-version"] ?? undefined,
6261
+ "x-api-key": options?.["x-api-key"] ?? undefined
6262
+ }),
6263
+ withResponse(HttpClientResponse.matchStatus({
6264
+ "2xx": decodeSuccess(DeleteSkillResponse),
6265
+ "4xx": decodeError("ErrorResponse", ErrorResponse),
6266
+ orElse: unexpectedStatus
6267
+ }))
6268
+ ),
6269
+ "listSkillVersionsV1SkillsSkillIdVersionsGet": (skillId, options) =>
6270
+ HttpClientRequest.get(`/v1/skills/${skillId}/versions`).pipe(
6271
+ HttpClientRequest.setUrlParams({ "page": options?.["page"] as any, "limit": options?.["limit"] as any }),
6272
+ HttpClientRequest.setHeaders({
6273
+ "anthropic-beta": options?.["anthropic-beta"] ?? undefined,
6274
+ "anthropic-version": options?.["anthropic-version"] ?? undefined,
6275
+ "x-api-key": options?.["x-api-key"] ?? undefined
6276
+ }),
6277
+ withResponse(HttpClientResponse.matchStatus({
6278
+ "2xx": decodeSuccess(ListSkillVersionsResponse),
6279
+ "4xx": decodeError("ErrorResponse", ErrorResponse),
6280
+ orElse: unexpectedStatus
6281
+ }))
6282
+ ),
6283
+ "createSkillVersionV1SkillsSkillIdVersionsPost": (skillId, options) =>
6284
+ HttpClientRequest.post(`/v1/skills/${skillId}/versions`).pipe(
6285
+ HttpClientRequest.setHeaders({
6286
+ "anthropic-beta": options.params?.["anthropic-beta"] ?? undefined,
6287
+ "anthropic-version": options.params?.["anthropic-version"] ?? undefined
6288
+ }),
6289
+ HttpClientRequest.bodyFormDataRecord(options.payload as any),
6290
+ withResponse(HttpClientResponse.matchStatus({
6291
+ "2xx": decodeSuccess(CreateSkillVersionResponse),
6292
+ "4xx": decodeError("ErrorResponse", ErrorResponse),
6293
+ orElse: unexpectedStatus
6294
+ }))
6295
+ ),
6296
+ "getSkillVersionV1SkillsSkillIdVersionsVersionGet": (skillId, version, options) =>
6297
+ HttpClientRequest.get(`/v1/skills/${skillId}/versions/${version}`).pipe(
6298
+ HttpClientRequest.setHeaders({
6299
+ "anthropic-beta": options?.["anthropic-beta"] ?? undefined,
6300
+ "anthropic-version": options?.["anthropic-version"] ?? undefined,
6301
+ "x-api-key": options?.["x-api-key"] ?? undefined
6302
+ }),
6303
+ withResponse(HttpClientResponse.matchStatus({
6304
+ "2xx": decodeSuccess(GetSkillVersionResponse),
6305
+ "4xx": decodeError("ErrorResponse", ErrorResponse),
6306
+ orElse: unexpectedStatus
6307
+ }))
6308
+ ),
6309
+ "deleteSkillVersionV1SkillsSkillIdVersionsVersionDelete": (skillId, version, options) =>
6310
+ HttpClientRequest.del(`/v1/skills/${skillId}/versions/${version}`).pipe(
6311
+ HttpClientRequest.setHeaders({
6312
+ "anthropic-beta": options?.["anthropic-beta"] ?? undefined,
6313
+ "anthropic-version": options?.["anthropic-version"] ?? undefined,
6314
+ "x-api-key": options?.["x-api-key"] ?? undefined
6315
+ }),
6316
+ withResponse(HttpClientResponse.matchStatus({
6317
+ "2xx": decodeSuccess(DeleteSkillVersionResponse),
6318
+ "4xx": decodeError("ErrorResponse", ErrorResponse),
6319
+ orElse: unexpectedStatus
6320
+ }))
6321
+ ),
4747
6322
  "betaMessagesPost": (options) =>
4748
6323
  HttpClientRequest.post(`/v1/messages?beta=true`).pipe(
4749
6324
  HttpClientRequest.setHeaders({
@@ -4949,6 +6524,116 @@ export const make = (
4949
6524
  withResponse(HttpClientResponse.matchStatus({
4950
6525
  orElse: unexpectedStatus
4951
6526
  }))
6527
+ ),
6528
+ "betaListSkillsV1SkillsGet": (options) =>
6529
+ HttpClientRequest.get(`/v1/skills?beta=true`).pipe(
6530
+ HttpClientRequest.setUrlParams({
6531
+ "page": options?.["page"] as any,
6532
+ "limit": options?.["limit"] as any,
6533
+ "source": options?.["source"] as any
6534
+ }),
6535
+ HttpClientRequest.setHeaders({
6536
+ "anthropic-beta": options?.["anthropic-beta"] ?? undefined,
6537
+ "anthropic-version": options?.["anthropic-version"] ?? undefined,
6538
+ "x-api-key": options?.["x-api-key"] ?? undefined
6539
+ }),
6540
+ withResponse(HttpClientResponse.matchStatus({
6541
+ "2xx": decodeSuccess(BetaListSkillsResponse),
6542
+ "4xx": decodeError("BetaErrorResponse", BetaErrorResponse),
6543
+ orElse: unexpectedStatus
6544
+ }))
6545
+ ),
6546
+ "betaCreateSkillV1SkillsPost": (options) =>
6547
+ HttpClientRequest.post(`/v1/skills?beta=true`).pipe(
6548
+ HttpClientRequest.setHeaders({
6549
+ "anthropic-beta": options.params?.["anthropic-beta"] ?? undefined,
6550
+ "anthropic-version": options.params?.["anthropic-version"] ?? undefined
6551
+ }),
6552
+ HttpClientRequest.bodyFormDataRecord(options.payload as any),
6553
+ withResponse(HttpClientResponse.matchStatus({
6554
+ "2xx": decodeSuccess(BetaCreateSkillResponse),
6555
+ "4xx": decodeError("BetaErrorResponse", BetaErrorResponse),
6556
+ orElse: unexpectedStatus
6557
+ }))
6558
+ ),
6559
+ "betaGetSkillV1SkillsSkillIdGet": (skillId, options) =>
6560
+ HttpClientRequest.get(`/v1/skills/${skillId}?beta=true`).pipe(
6561
+ HttpClientRequest.setHeaders({
6562
+ "anthropic-beta": options?.["anthropic-beta"] ?? undefined,
6563
+ "anthropic-version": options?.["anthropic-version"] ?? undefined,
6564
+ "x-api-key": options?.["x-api-key"] ?? undefined
6565
+ }),
6566
+ withResponse(HttpClientResponse.matchStatus({
6567
+ "2xx": decodeSuccess(BetaGetSkillResponse),
6568
+ "4xx": decodeError("BetaErrorResponse", BetaErrorResponse),
6569
+ orElse: unexpectedStatus
6570
+ }))
6571
+ ),
6572
+ "betaDeleteSkillV1SkillsSkillIdDelete": (skillId, options) =>
6573
+ HttpClientRequest.del(`/v1/skills/${skillId}?beta=true`).pipe(
6574
+ HttpClientRequest.setHeaders({
6575
+ "anthropic-beta": options?.["anthropic-beta"] ?? undefined,
6576
+ "anthropic-version": options?.["anthropic-version"] ?? undefined,
6577
+ "x-api-key": options?.["x-api-key"] ?? undefined
6578
+ }),
6579
+ withResponse(HttpClientResponse.matchStatus({
6580
+ "2xx": decodeSuccess(BetaDeleteSkillResponse),
6581
+ "4xx": decodeError("BetaErrorResponse", BetaErrorResponse),
6582
+ orElse: unexpectedStatus
6583
+ }))
6584
+ ),
6585
+ "betaListSkillVersionsV1SkillsSkillIdVersionsGet": (skillId, options) =>
6586
+ HttpClientRequest.get(`/v1/skills/${skillId}/versions?beta=true`).pipe(
6587
+ HttpClientRequest.setUrlParams({ "page": options?.["page"] as any, "limit": options?.["limit"] as any }),
6588
+ HttpClientRequest.setHeaders({
6589
+ "anthropic-beta": options?.["anthropic-beta"] ?? undefined,
6590
+ "anthropic-version": options?.["anthropic-version"] ?? undefined,
6591
+ "x-api-key": options?.["x-api-key"] ?? undefined
6592
+ }),
6593
+ withResponse(HttpClientResponse.matchStatus({
6594
+ "2xx": decodeSuccess(BetaListSkillVersionsResponse),
6595
+ "4xx": decodeError("BetaErrorResponse", BetaErrorResponse),
6596
+ orElse: unexpectedStatus
6597
+ }))
6598
+ ),
6599
+ "betaCreateSkillVersionV1SkillsSkillIdVersionsPost": (skillId, options) =>
6600
+ HttpClientRequest.post(`/v1/skills/${skillId}/versions?beta=true`).pipe(
6601
+ HttpClientRequest.setHeaders({
6602
+ "anthropic-beta": options.params?.["anthropic-beta"] ?? undefined,
6603
+ "anthropic-version": options.params?.["anthropic-version"] ?? undefined
6604
+ }),
6605
+ HttpClientRequest.bodyFormDataRecord(options.payload as any),
6606
+ withResponse(HttpClientResponse.matchStatus({
6607
+ "2xx": decodeSuccess(BetaCreateSkillVersionResponse),
6608
+ "4xx": decodeError("BetaErrorResponse", BetaErrorResponse),
6609
+ orElse: unexpectedStatus
6610
+ }))
6611
+ ),
6612
+ "betaGetSkillVersionV1SkillsSkillIdVersionsVersionGet": (skillId, version, options) =>
6613
+ HttpClientRequest.get(`/v1/skills/${skillId}/versions/${version}?beta=true`).pipe(
6614
+ HttpClientRequest.setHeaders({
6615
+ "anthropic-beta": options?.["anthropic-beta"] ?? undefined,
6616
+ "anthropic-version": options?.["anthropic-version"] ?? undefined,
6617
+ "x-api-key": options?.["x-api-key"] ?? undefined
6618
+ }),
6619
+ withResponse(HttpClientResponse.matchStatus({
6620
+ "2xx": decodeSuccess(BetaGetSkillVersionResponse),
6621
+ "4xx": decodeError("BetaErrorResponse", BetaErrorResponse),
6622
+ orElse: unexpectedStatus
6623
+ }))
6624
+ ),
6625
+ "betaDeleteSkillVersionV1SkillsSkillIdVersionsVersionDelete": (skillId, version, options) =>
6626
+ HttpClientRequest.del(`/v1/skills/${skillId}/versions/${version}?beta=true`).pipe(
6627
+ HttpClientRequest.setHeaders({
6628
+ "anthropic-beta": options?.["anthropic-beta"] ?? undefined,
6629
+ "anthropic-version": options?.["anthropic-version"] ?? undefined,
6630
+ "x-api-key": options?.["x-api-key"] ?? undefined
6631
+ }),
6632
+ withResponse(HttpClientResponse.matchStatus({
6633
+ "2xx": decodeSuccess(BetaDeleteSkillVersionResponse),
6634
+ "4xx": decodeError("BetaErrorResponse", BetaErrorResponse),
6635
+ orElse: unexpectedStatus
6636
+ }))
4952
6637
  )
4953
6638
  }
4954
6639
  }
@@ -4974,9 +6659,9 @@ export interface Client {
4974
6659
  /**
4975
6660
  * [Legacy] Create a Text Completion.
4976
6661
  *
4977
- * The Text Completions API is a legacy API. We recommend using the [Messages API](https://docs.anthropic.com/en/api/messages) going forward.
6662
+ * The Text Completions API is a legacy API. We recommend using the [Messages API](https://docs.claude.com/en/api/messages) going forward.
4978
6663
  *
4979
- * Future models and features will not be compatible with Text Completions. See our [migration guide](https://docs.anthropic.com/en/api/migrating-from-text-completions-to-messages) for guidance in migrating from Text Completions to Messages.
6664
+ * Future models and features will not be compatible with Text Completions. See our [migration guide](https://docs.claude.com/en/api/migrating-from-text-completions-to-messages) for guidance in migrating from Text Completions to Messages.
4980
6665
  */
4981
6666
  readonly "completePost": (
4982
6667
  options: {
@@ -5155,6 +6840,92 @@ export interface Client {
5155
6840
  fileId: string,
5156
6841
  options?: typeof DownloadFileV1FilesFileIdContentGetParams.Encoded | undefined
5157
6842
  ) => Effect.Effect<void, HttpClientError.HttpClientError | ParseError>
6843
+ /**
6844
+ * List Skills
6845
+ */
6846
+ readonly "listSkillsV1SkillsGet": (
6847
+ options?: typeof ListSkillsV1SkillsGetParams.Encoded | undefined
6848
+ ) => Effect.Effect<
6849
+ typeof ListSkillsResponse.Type,
6850
+ HttpClientError.HttpClientError | ParseError | ClientError<"ErrorResponse", typeof ErrorResponse.Type>
6851
+ >
6852
+ /**
6853
+ * Create Skill
6854
+ */
6855
+ readonly "createSkillV1SkillsPost": (
6856
+ options: {
6857
+ readonly params?: typeof CreateSkillV1SkillsPostParams.Encoded | undefined
6858
+ readonly payload: typeof BodyCreateSkillV1SkillsPost.Encoded
6859
+ }
6860
+ ) => Effect.Effect<
6861
+ typeof CreateSkillResponse.Type,
6862
+ HttpClientError.HttpClientError | ParseError | ClientError<"ErrorResponse", typeof ErrorResponse.Type>
6863
+ >
6864
+ /**
6865
+ * Get Skill
6866
+ */
6867
+ readonly "getSkillV1SkillsSkillIdGet": (
6868
+ skillId: string,
6869
+ options?: typeof GetSkillV1SkillsSkillIdGetParams.Encoded | undefined
6870
+ ) => Effect.Effect<
6871
+ typeof GetSkillResponse.Type,
6872
+ HttpClientError.HttpClientError | ParseError | ClientError<"ErrorResponse", typeof ErrorResponse.Type>
6873
+ >
6874
+ /**
6875
+ * Delete Skill
6876
+ */
6877
+ readonly "deleteSkillV1SkillsSkillIdDelete": (
6878
+ skillId: string,
6879
+ options?: typeof DeleteSkillV1SkillsSkillIdDeleteParams.Encoded | undefined
6880
+ ) => Effect.Effect<
6881
+ typeof DeleteSkillResponse.Type,
6882
+ HttpClientError.HttpClientError | ParseError | ClientError<"ErrorResponse", typeof ErrorResponse.Type>
6883
+ >
6884
+ /**
6885
+ * List Skill Versions
6886
+ */
6887
+ readonly "listSkillVersionsV1SkillsSkillIdVersionsGet": (
6888
+ skillId: string,
6889
+ options?: typeof ListSkillVersionsV1SkillsSkillIdVersionsGetParams.Encoded | undefined
6890
+ ) => Effect.Effect<
6891
+ typeof ListSkillVersionsResponse.Type,
6892
+ HttpClientError.HttpClientError | ParseError | ClientError<"ErrorResponse", typeof ErrorResponse.Type>
6893
+ >
6894
+ /**
6895
+ * Create Skill Version
6896
+ */
6897
+ readonly "createSkillVersionV1SkillsSkillIdVersionsPost": (
6898
+ skillId: string,
6899
+ options: {
6900
+ readonly params?: typeof CreateSkillVersionV1SkillsSkillIdVersionsPostParams.Encoded | undefined
6901
+ readonly payload: typeof BodyCreateSkillVersionV1SkillsSkillIdVersionsPost.Encoded
6902
+ }
6903
+ ) => Effect.Effect<
6904
+ typeof CreateSkillVersionResponse.Type,
6905
+ HttpClientError.HttpClientError | ParseError | ClientError<"ErrorResponse", typeof ErrorResponse.Type>
6906
+ >
6907
+ /**
6908
+ * Get Skill Version
6909
+ */
6910
+ readonly "getSkillVersionV1SkillsSkillIdVersionsVersionGet": (
6911
+ skillId: string,
6912
+ version: string,
6913
+ options?: typeof GetSkillVersionV1SkillsSkillIdVersionsVersionGetParams.Encoded | undefined
6914
+ ) => Effect.Effect<
6915
+ typeof GetSkillVersionResponse.Type,
6916
+ HttpClientError.HttpClientError | ParseError | ClientError<"ErrorResponse", typeof ErrorResponse.Type>
6917
+ >
6918
+ /**
6919
+ * Delete Skill Version
6920
+ */
6921
+ readonly "deleteSkillVersionV1SkillsSkillIdVersionsVersionDelete": (
6922
+ skillId: string,
6923
+ version: string,
6924
+ options?: typeof DeleteSkillVersionV1SkillsSkillIdVersionsVersionDeleteParams.Encoded | undefined
6925
+ ) => Effect.Effect<
6926
+ typeof DeleteSkillVersionResponse.Type,
6927
+ HttpClientError.HttpClientError | ParseError | ClientError<"ErrorResponse", typeof ErrorResponse.Type>
6928
+ >
5158
6929
  /**
5159
6930
  * Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.
5160
6931
  *
@@ -5339,6 +7110,92 @@ export interface Client {
5339
7110
  fileId: string,
5340
7111
  options?: typeof BetaDownloadFileV1FilesFileIdContentGetParams.Encoded | undefined
5341
7112
  ) => Effect.Effect<void, HttpClientError.HttpClientError | ParseError>
7113
+ /**
7114
+ * List Skills
7115
+ */
7116
+ readonly "betaListSkillsV1SkillsGet": (
7117
+ options?: typeof BetaListSkillsV1SkillsGetParams.Encoded | undefined
7118
+ ) => Effect.Effect<
7119
+ typeof BetaListSkillsResponse.Type,
7120
+ HttpClientError.HttpClientError | ParseError | ClientError<"BetaErrorResponse", typeof BetaErrorResponse.Type>
7121
+ >
7122
+ /**
7123
+ * Create Skill
7124
+ */
7125
+ readonly "betaCreateSkillV1SkillsPost": (
7126
+ options: {
7127
+ readonly params?: typeof BetaCreateSkillV1SkillsPostParams.Encoded | undefined
7128
+ readonly payload: typeof BetaBodyCreateSkillV1SkillsPost.Encoded
7129
+ }
7130
+ ) => Effect.Effect<
7131
+ typeof BetaCreateSkillResponse.Type,
7132
+ HttpClientError.HttpClientError | ParseError | ClientError<"BetaErrorResponse", typeof BetaErrorResponse.Type>
7133
+ >
7134
+ /**
7135
+ * Get Skill
7136
+ */
7137
+ readonly "betaGetSkillV1SkillsSkillIdGet": (
7138
+ skillId: string,
7139
+ options?: typeof BetaGetSkillV1SkillsSkillIdGetParams.Encoded | undefined
7140
+ ) => Effect.Effect<
7141
+ typeof BetaGetSkillResponse.Type,
7142
+ HttpClientError.HttpClientError | ParseError | ClientError<"BetaErrorResponse", typeof BetaErrorResponse.Type>
7143
+ >
7144
+ /**
7145
+ * Delete Skill
7146
+ */
7147
+ readonly "betaDeleteSkillV1SkillsSkillIdDelete": (
7148
+ skillId: string,
7149
+ options?: typeof BetaDeleteSkillV1SkillsSkillIdDeleteParams.Encoded | undefined
7150
+ ) => Effect.Effect<
7151
+ typeof BetaDeleteSkillResponse.Type,
7152
+ HttpClientError.HttpClientError | ParseError | ClientError<"BetaErrorResponse", typeof BetaErrorResponse.Type>
7153
+ >
7154
+ /**
7155
+ * List Skill Versions
7156
+ */
7157
+ readonly "betaListSkillVersionsV1SkillsSkillIdVersionsGet": (
7158
+ skillId: string,
7159
+ options?: typeof BetaListSkillVersionsV1SkillsSkillIdVersionsGetParams.Encoded | undefined
7160
+ ) => Effect.Effect<
7161
+ typeof BetaListSkillVersionsResponse.Type,
7162
+ HttpClientError.HttpClientError | ParseError | ClientError<"BetaErrorResponse", typeof BetaErrorResponse.Type>
7163
+ >
7164
+ /**
7165
+ * Create Skill Version
7166
+ */
7167
+ readonly "betaCreateSkillVersionV1SkillsSkillIdVersionsPost": (
7168
+ skillId: string,
7169
+ options: {
7170
+ readonly params?: typeof BetaCreateSkillVersionV1SkillsSkillIdVersionsPostParams.Encoded | undefined
7171
+ readonly payload: typeof BetaBodyCreateSkillVersionV1SkillsSkillIdVersionsPost.Encoded
7172
+ }
7173
+ ) => Effect.Effect<
7174
+ typeof BetaCreateSkillVersionResponse.Type,
7175
+ HttpClientError.HttpClientError | ParseError | ClientError<"BetaErrorResponse", typeof BetaErrorResponse.Type>
7176
+ >
7177
+ /**
7178
+ * Get Skill Version
7179
+ */
7180
+ readonly "betaGetSkillVersionV1SkillsSkillIdVersionsVersionGet": (
7181
+ skillId: string,
7182
+ version: string,
7183
+ options?: typeof BetaGetSkillVersionV1SkillsSkillIdVersionsVersionGetParams.Encoded | undefined
7184
+ ) => Effect.Effect<
7185
+ typeof BetaGetSkillVersionResponse.Type,
7186
+ HttpClientError.HttpClientError | ParseError | ClientError<"BetaErrorResponse", typeof BetaErrorResponse.Type>
7187
+ >
7188
+ /**
7189
+ * Delete Skill Version
7190
+ */
7191
+ readonly "betaDeleteSkillVersionV1SkillsSkillIdVersionsVersionDelete": (
7192
+ skillId: string,
7193
+ version: string,
7194
+ options?: typeof BetaDeleteSkillVersionV1SkillsSkillIdVersionsVersionDeleteParams.Encoded | undefined
7195
+ ) => Effect.Effect<
7196
+ typeof BetaDeleteSkillVersionResponse.Type,
7197
+ HttpClientError.HttpClientError | ParseError | ClientError<"BetaErrorResponse", typeof BetaErrorResponse.Type>
7198
+ >
5342
7199
  }
5343
7200
 
5344
7201
  export interface ClientError<Tag extends string, E> {