anthropic 0.69.0__py3-none-any.whl → 0.71.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. anthropic/_version.py +1 -1
  2. anthropic/lib/__init__.py +1 -0
  3. anthropic/lib/_files.py +42 -0
  4. anthropic/pagination.py +117 -1
  5. anthropic/resources/beta/__init__.py +14 -0
  6. anthropic/resources/beta/beta.py +32 -0
  7. anthropic/resources/beta/messages/messages.py +140 -122
  8. anthropic/resources/beta/skills/__init__.py +33 -0
  9. anthropic/resources/beta/skills/skills.py +680 -0
  10. anthropic/resources/beta/skills/versions.py +658 -0
  11. anthropic/resources/completions.py +36 -42
  12. anthropic/resources/messages/messages.py +90 -96
  13. anthropic/types/anthropic_beta_param.py +3 -0
  14. anthropic/types/beta/__init__.py +9 -0
  15. anthropic/types/beta/beta_container.py +5 -0
  16. anthropic/types/beta/beta_container_params.py +18 -0
  17. anthropic/types/beta/beta_message.py +4 -1
  18. anthropic/types/beta/beta_raw_message_delta_event.py +1 -1
  19. anthropic/types/beta/beta_skill.py +18 -0
  20. anthropic/types/beta/beta_skill_params.py +18 -0
  21. anthropic/types/beta/beta_thinking_config_enabled_param.py +1 -1
  22. anthropic/types/beta/message_count_tokens_params.py +14 -10
  23. anthropic/types/beta/message_create_params.py +25 -19
  24. anthropic/types/beta/messages/batch_create_params.py +1 -0
  25. anthropic/types/beta/skill_create_params.py +31 -0
  26. anthropic/types/beta/skill_create_response.py +49 -0
  27. anthropic/types/beta/skill_delete_response.py +19 -0
  28. anthropic/types/beta/skill_list_params.py +38 -0
  29. anthropic/types/beta/skill_list_response.py +49 -0
  30. anthropic/types/beta/skill_retrieve_response.py +49 -0
  31. anthropic/types/beta/skills/__init__.py +10 -0
  32. anthropic/types/beta/skills/version_create_params.py +24 -0
  33. anthropic/types/beta/skills/version_create_response.py +49 -0
  34. anthropic/types/beta/skills/version_delete_response.py +19 -0
  35. anthropic/types/beta/skills/version_list_params.py +25 -0
  36. anthropic/types/beta/skills/version_list_response.py +49 -0
  37. anthropic/types/beta/skills/version_retrieve_response.py +49 -0
  38. anthropic/types/completion_create_params.py +5 -6
  39. anthropic/types/message_count_tokens_params.py +9 -9
  40. anthropic/types/message_create_params.py +13 -15
  41. anthropic/types/messages/batch_create_params.py +1 -0
  42. anthropic/types/model.py +2 -0
  43. anthropic/types/model_param.py +2 -0
  44. anthropic/types/stop_reason.py +1 -3
  45. anthropic/types/thinking_config_enabled_param.py +1 -1
  46. {anthropic-0.69.0.dist-info → anthropic-0.71.0.dist-info}/METADATA +1 -1
  47. {anthropic-0.69.0.dist-info → anthropic-0.71.0.dist-info}/RECORD +49 -29
  48. {anthropic-0.69.0.dist-info → anthropic-0.71.0.dist-info}/WHEEL +0 -0
  49. {anthropic-0.69.0.dist-info → anthropic-0.71.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,8 +1,10 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ from typing import List, Optional
3
4
  from datetime import datetime
4
5
 
5
6
  from ..._models import BaseModel
7
+ from .beta_skill import BetaSkill
6
8
 
7
9
  __all__ = ["BetaContainer"]
8
10
 
@@ -13,3 +15,6 @@ class BetaContainer(BaseModel):
13
15
 
14
16
  expires_at: datetime
15
17
  """The time at which the container will expire."""
18
+
19
+ skills: Optional[List[BetaSkill]] = None
20
+ """Skills loaded in the container"""
@@ -0,0 +1,18 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Iterable, Optional
6
+ from typing_extensions import TypedDict
7
+
8
+ from .beta_skill_params import BetaSkillParams
9
+
10
+ __all__ = ["BetaContainerParams"]
11
+
12
+
13
+ class BetaContainerParams(TypedDict, total=False):
14
+ id: Optional[str]
15
+ """Container id"""
16
+
17
+ skills: Optional[Iterable[BetaSkillParams]]
18
+ """List of skills to load in the container"""
@@ -63,7 +63,10 @@ class BetaMessage(BaseModel):
63
63
  """
64
64
 
65
65
  context_management: Optional[BetaContextManagementResponse] = None
66
- """Information about context management operations applied during the request."""
66
+ """Context management response.
67
+
68
+ Information about context management strategies applied during the request.
69
+ """
67
70
 
68
71
  model: Model
69
72
  """
@@ -26,7 +26,7 @@ class Delta(BaseModel):
26
26
 
27
27
  class BetaRawMessageDeltaEvent(BaseModel):
28
28
  context_management: Optional[BetaContextManagementResponse] = None
29
- """Information about context management operations applied during the request."""
29
+ """Information about context management strategies applied during the request"""
30
30
 
31
31
  delta: Delta
32
32
 
@@ -0,0 +1,18 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["BetaSkill"]
8
+
9
+
10
+ class BetaSkill(BaseModel):
11
+ skill_id: str
12
+ """Skill ID"""
13
+
14
+ type: Literal["anthropic", "custom"]
15
+ """Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)"""
16
+
17
+ version: str
18
+ """Skill version or 'latest' for most recent version"""
@@ -0,0 +1,18 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, TypedDict
6
+
7
+ __all__ = ["BetaSkillParams"]
8
+
9
+
10
+ class BetaSkillParams(TypedDict, total=False):
11
+ skill_id: Required[str]
12
+ """Skill ID"""
13
+
14
+ type: Required[Literal["anthropic", "custom"]]
15
+ """Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)"""
16
+
17
+ version: str
18
+ """Skill version or 'latest' for most recent version"""
@@ -17,7 +17,7 @@ class BetaThinkingConfigEnabledParam(TypedDict, total=False):
17
17
  Must be ≥1024 and less than `max_tokens`.
18
18
 
19
19
  See
20
- [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
20
+ [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
21
21
  for details.
22
22
  """
23
23
 
@@ -91,12 +91,12 @@ class MessageCountTokensParams(TypedDict, total=False):
91
91
  { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
92
92
  ```
93
93
 
94
- See [input examples](https://docs.anthropic.com/en/api/messages-examples).
94
+ See [input examples](https://docs.claude.com/en/api/messages-examples).
95
95
 
96
96
  Note that if you want to include a
97
- [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
98
- the top-level `system` parameter — there is no `"system"` role for input
99
- messages in the Messages API.
97
+ [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
98
+ top-level `system` parameter — there is no `"system"` role for input messages in
99
+ the Messages API.
100
100
 
101
101
  There is a limit of 100,000 messages in a single request.
102
102
  """
@@ -109,7 +109,11 @@ class MessageCountTokensParams(TypedDict, total=False):
109
109
  """
110
110
 
111
111
  context_management: Optional[BetaContextManagementConfigParam]
112
- """Configuration for context management operations."""
112
+ """Context management configuration.
113
+
114
+ This allows you to control how Claude manages context across multiple requests,
115
+ such as whether to clear function results or not.
116
+ """
113
117
 
114
118
  mcp_servers: Iterable[BetaRequestMCPServerURLDefinitionParam]
115
119
  """MCP servers to be utilized in this request"""
@@ -119,7 +123,7 @@ class MessageCountTokensParams(TypedDict, total=False):
119
123
 
120
124
  A system prompt is a way of providing context and instructions to Claude, such
121
125
  as specifying a particular goal or role. See our
122
- [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
126
+ [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
123
127
  """
124
128
 
125
129
  thinking: BetaThinkingConfigParam
@@ -130,7 +134,7 @@ class MessageCountTokensParams(TypedDict, total=False):
130
134
  tokens and counts towards your `max_tokens` limit.
131
135
 
132
136
  See
133
- [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
137
+ [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
134
138
  for details.
135
139
  """
136
140
 
@@ -151,9 +155,9 @@ class MessageCountTokensParams(TypedDict, total=False):
151
155
 
152
156
  There are two types of tools: **client tools** and **server tools**. The
153
157
  behavior described below applies to client tools. For
154
- [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
158
+ [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
155
159
  see their individual documentation as each has its own behavior (e.g., the
156
- [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
160
+ [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
157
161
 
158
162
  Each tool definition includes:
159
163
 
@@ -216,7 +220,7 @@ class MessageCountTokensParams(TypedDict, total=False):
216
220
  functions, or more generally whenever you want the model to produce a particular
217
221
  JSON structure of output.
218
222
 
219
- See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
223
+ See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
220
224
  """
221
225
 
222
226
  betas: Annotated[List[AnthropicBetaParam], PropertyInfo(alias="anthropic-beta")]
@@ -3,7 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import List, Union, Iterable, Optional
6
- from typing_extensions import Literal, Required, Annotated, TypedDict
6
+ from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
7
7
 
8
8
  from ..._types import SequenceNotStr
9
9
  from ..._utils import PropertyInfo
@@ -11,6 +11,7 @@ from ..model_param import ModelParam
11
11
  from .beta_message_param import BetaMessageParam
12
12
  from .beta_metadata_param import BetaMetadataParam
13
13
  from ..anthropic_beta_param import AnthropicBetaParam
14
+ from .beta_container_params import BetaContainerParams
14
15
  from .beta_text_block_param import BetaTextBlockParam
15
16
  from .beta_tool_union_param import BetaToolUnionParam
16
17
  from .beta_tool_choice_param import BetaToolChoiceParam
@@ -18,7 +19,7 @@ from .beta_thinking_config_param import BetaThinkingConfigParam
18
19
  from .beta_context_management_config_param import BetaContextManagementConfigParam
19
20
  from .beta_request_mcp_server_url_definition_param import BetaRequestMCPServerURLDefinitionParam
20
21
 
21
- __all__ = ["MessageCreateParamsBase", "MessageCreateParamsNonStreaming", "MessageCreateParamsStreaming"]
22
+ __all__ = ["MessageCreateParamsBase", "Container", "MessageCreateParamsNonStreaming", "MessageCreateParamsStreaming"]
22
23
 
23
24
 
24
25
  class MessageCreateParamsBase(TypedDict, total=False):
@@ -29,7 +30,7 @@ class MessageCreateParamsBase(TypedDict, total=False):
29
30
  only specifies the absolute maximum number of tokens to generate.
30
31
 
31
32
  Different models have different maximum values for this parameter. See
32
- [models](https://docs.anthropic.com/en/docs/models-overview) for details.
33
+ [models](https://docs.claude.com/en/docs/models-overview) for details.
33
34
  """
34
35
 
35
36
  messages: Required[Iterable[BetaMessageParam]]
@@ -90,12 +91,12 @@ class MessageCreateParamsBase(TypedDict, total=False):
90
91
  { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
91
92
  ```
92
93
 
93
- See [input examples](https://docs.anthropic.com/en/api/messages-examples).
94
+ See [input examples](https://docs.claude.com/en/api/messages-examples).
94
95
 
95
96
  Note that if you want to include a
96
- [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
97
- the top-level `system` parameter — there is no `"system"` role for input
98
- messages in the Messages API.
97
+ [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
98
+ top-level `system` parameter — there is no `"system"` role for input messages in
99
+ the Messages API.
99
100
 
100
101
  There is a limit of 100,000 messages in a single request.
101
102
  """
@@ -107,11 +108,15 @@ class MessageCreateParamsBase(TypedDict, total=False):
107
108
  details and options.
108
109
  """
109
110
 
110
- container: Optional[str]
111
+ container: Optional[Container]
111
112
  """Container identifier for reuse across requests."""
112
113
 
113
114
  context_management: Optional[BetaContextManagementConfigParam]
114
- """Configuration for context management operations."""
115
+ """Context management configuration.
116
+
117
+ This allows you to control how Claude manages context across multiple requests,
118
+ such as whether to clear function results or not.
119
+ """
115
120
 
116
121
  mcp_servers: Iterable[BetaRequestMCPServerURLDefinitionParam]
117
122
  """MCP servers to be utilized in this request"""
@@ -125,7 +130,7 @@ class MessageCreateParamsBase(TypedDict, total=False):
125
130
  for this request.
126
131
 
127
132
  Anthropic offers different levels of service for your API requests. See
128
- [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
133
+ [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
129
134
  """
130
135
 
131
136
  stop_sequences: SequenceNotStr[str]
@@ -145,7 +150,7 @@ class MessageCreateParamsBase(TypedDict, total=False):
145
150
 
146
151
  A system prompt is a way of providing context and instructions to Claude, such
147
152
  as specifying a particular goal or role. See our
148
- [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
153
+ [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
149
154
  """
150
155
 
151
156
  temperature: float
@@ -167,7 +172,7 @@ class MessageCreateParamsBase(TypedDict, total=False):
167
172
  tokens and counts towards your `max_tokens` limit.
168
173
 
169
174
  See
170
- [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
175
+ [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
171
176
  for details.
172
177
  """
173
178
 
@@ -188,9 +193,9 @@ class MessageCreateParamsBase(TypedDict, total=False):
188
193
 
189
194
  There are two types of tools: **client tools** and **server tools**. The
190
195
  behavior described below applies to client tools. For
191
- [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
196
+ [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
192
197
  see their individual documentation as each has its own behavior (e.g., the
193
- [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
198
+ [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
194
199
 
195
200
  Each tool definition includes:
196
201
 
@@ -253,7 +258,7 @@ class MessageCreateParamsBase(TypedDict, total=False):
253
258
  functions, or more generally whenever you want the model to produce a particular
254
259
  JSON structure of output.
255
260
 
256
- See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
261
+ See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
257
262
  """
258
263
 
259
264
  top_k: int
@@ -282,12 +287,14 @@ class MessageCreateParamsBase(TypedDict, total=False):
282
287
  """Optional header to specify the beta version(s) you want to use."""
283
288
 
284
289
 
290
+ Container: TypeAlias = Union[BetaContainerParams, str]
291
+
292
+
285
293
  class MessageCreateParamsNonStreaming(MessageCreateParamsBase, total=False):
286
294
  stream: Literal[False]
287
295
  """Whether to incrementally stream the response using server-sent events.
288
296
 
289
- See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
290
- details.
297
+ See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
291
298
  """
292
299
 
293
300
 
@@ -295,8 +302,7 @@ class MessageCreateParamsStreaming(MessageCreateParamsBase):
295
302
  stream: Required[Literal[True]]
296
303
  """Whether to incrementally stream the response using server-sent events.
297
304
 
298
- See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
299
- details.
305
+ See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
300
306
  """
301
307
 
302
308
 
@@ -23,6 +23,7 @@ class BatchCreateParams(TypedDict, total=False):
23
23
  """Optional header to specify the beta version(s) you want to use."""
24
24
 
25
25
 
26
+
26
27
  class Request(TypedDict, total=False):
27
28
  custom_id: Required[str]
28
29
  """Developer-provided ID created for each request in a Message Batch.
@@ -0,0 +1,31 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import List, Optional
6
+ from typing_extensions import Annotated, TypedDict
7
+
8
+ from ..._types import FileTypes, SequenceNotStr
9
+ from ..._utils import PropertyInfo
10
+ from ..anthropic_beta_param import AnthropicBetaParam
11
+
12
+ __all__ = ["SkillCreateParams"]
13
+
14
+
15
+ class SkillCreateParams(TypedDict, total=False):
16
+ display_title: Optional[str]
17
+ """Display title for the skill.
18
+
19
+ This is a human-readable label that is not included in the prompt sent to the
20
+ model.
21
+ """
22
+
23
+ files: Optional[SequenceNotStr[FileTypes]]
24
+ """Files to upload for the skill.
25
+
26
+ All files must be in the same top-level directory and must include a SKILL.md
27
+ file at the root of that directory.
28
+ """
29
+
30
+ betas: Annotated[List[AnthropicBetaParam], PropertyInfo(alias="anthropic-beta")]
31
+ """Optional header to specify the beta version(s) you want to use."""
@@ -0,0 +1,49 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["SkillCreateResponse"]
8
+
9
+
10
+ class SkillCreateResponse(BaseModel):
11
+ id: str
12
+ """Unique identifier for the skill.
13
+
14
+ The format and length of IDs may change over time.
15
+ """
16
+
17
+ created_at: str
18
+ """ISO 8601 timestamp of when the skill was created."""
19
+
20
+ display_title: Optional[str] = None
21
+ """Display title for the skill.
22
+
23
+ This is a human-readable label that is not included in the prompt sent to the
24
+ model.
25
+ """
26
+
27
+ latest_version: Optional[str] = None
28
+ """The latest version identifier for the skill.
29
+
30
+ This represents the most recent version of the skill that has been created.
31
+ """
32
+
33
+ source: str
34
+ """Source of the skill.
35
+
36
+ This may be one of the following values:
37
+
38
+ - `"custom"`: the skill was created by a user
39
+ - `"anthropic"`: the skill was created by Anthropic
40
+ """
41
+
42
+ type: str
43
+ """Object type.
44
+
45
+ For Skills, this is always `"skill"`.
46
+ """
47
+
48
+ updated_at: str
49
+ """ISO 8601 timestamp of when the skill was last updated."""
@@ -0,0 +1,19 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from ..._models import BaseModel
4
+
5
+ __all__ = ["SkillDeleteResponse"]
6
+
7
+
8
+ class SkillDeleteResponse(BaseModel):
9
+ id: str
10
+ """Unique identifier for the skill.
11
+
12
+ The format and length of IDs may change over time.
13
+ """
14
+
15
+ type: str
16
+ """Deleted object type.
17
+
18
+ For Skills, this is always `"skill_deleted"`.
19
+ """
@@ -0,0 +1,38 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import List, Optional
6
+ from typing_extensions import Annotated, TypedDict
7
+
8
+ from ..._utils import PropertyInfo
9
+ from ..anthropic_beta_param import AnthropicBetaParam
10
+
11
+ __all__ = ["SkillListParams"]
12
+
13
+
14
+ class SkillListParams(TypedDict, total=False):
15
+ limit: int
16
+ """Number of results to return per page.
17
+
18
+ Maximum value is 100. Defaults to 20.
19
+ """
20
+
21
+ page: Optional[str]
22
+ """Pagination token for fetching a specific page of results.
23
+
24
+ Pass the value from a previous response's `next_page` field to get the next page
25
+ of results.
26
+ """
27
+
28
+ source: Optional[str]
29
+ """Filter skills by source.
30
+
31
+ If provided, only skills from the specified source will be returned:
32
+
33
+ - `"custom"`: only return user-created skills
34
+ - `"anthropic"`: only return Anthropic-created skills
35
+ """
36
+
37
+ betas: Annotated[List[AnthropicBetaParam], PropertyInfo(alias="anthropic-beta")]
38
+ """Optional header to specify the beta version(s) you want to use."""
@@ -0,0 +1,49 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["SkillListResponse"]
8
+
9
+
10
+ class SkillListResponse(BaseModel):
11
+ id: str
12
+ """Unique identifier for the skill.
13
+
14
+ The format and length of IDs may change over time.
15
+ """
16
+
17
+ created_at: str
18
+ """ISO 8601 timestamp of when the skill was created."""
19
+
20
+ display_title: Optional[str] = None
21
+ """Display title for the skill.
22
+
23
+ This is a human-readable label that is not included in the prompt sent to the
24
+ model.
25
+ """
26
+
27
+ latest_version: Optional[str] = None
28
+ """The latest version identifier for the skill.
29
+
30
+ This represents the most recent version of the skill that has been created.
31
+ """
32
+
33
+ source: str
34
+ """Source of the skill.
35
+
36
+ This may be one of the following values:
37
+
38
+ - `"custom"`: the skill was created by a user
39
+ - `"anthropic"`: the skill was created by Anthropic
40
+ """
41
+
42
+ type: str
43
+ """Object type.
44
+
45
+ For Skills, this is always `"skill"`.
46
+ """
47
+
48
+ updated_at: str
49
+ """ISO 8601 timestamp of when the skill was last updated."""
@@ -0,0 +1,49 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["SkillRetrieveResponse"]
8
+
9
+
10
+ class SkillRetrieveResponse(BaseModel):
11
+ id: str
12
+ """Unique identifier for the skill.
13
+
14
+ The format and length of IDs may change over time.
15
+ """
16
+
17
+ created_at: str
18
+ """ISO 8601 timestamp of when the skill was created."""
19
+
20
+ display_title: Optional[str] = None
21
+ """Display title for the skill.
22
+
23
+ This is a human-readable label that is not included in the prompt sent to the
24
+ model.
25
+ """
26
+
27
+ latest_version: Optional[str] = None
28
+ """The latest version identifier for the skill.
29
+
30
+ This represents the most recent version of the skill that has been created.
31
+ """
32
+
33
+ source: str
34
+ """Source of the skill.
35
+
36
+ This may be one of the following values:
37
+
38
+ - `"custom"`: the skill was created by a user
39
+ - `"anthropic"`: the skill was created by Anthropic
40
+ """
41
+
42
+ type: str
43
+ """Object type.
44
+
45
+ For Skills, this is always `"skill"`.
46
+ """
47
+
48
+ updated_at: str
49
+ """ISO 8601 timestamp of when the skill was last updated."""
@@ -0,0 +1,10 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .version_list_params import VersionListParams as VersionListParams
6
+ from .version_create_params import VersionCreateParams as VersionCreateParams
7
+ from .version_list_response import VersionListResponse as VersionListResponse
8
+ from .version_create_response import VersionCreateResponse as VersionCreateResponse
9
+ from .version_delete_response import VersionDeleteResponse as VersionDeleteResponse
10
+ from .version_retrieve_response import VersionRetrieveResponse as VersionRetrieveResponse
@@ -0,0 +1,24 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import List, Optional
6
+ from typing_extensions import Annotated, TypedDict
7
+
8
+ from ...._types import FileTypes, SequenceNotStr
9
+ from ...._utils import PropertyInfo
10
+ from ...anthropic_beta_param import AnthropicBetaParam
11
+
12
+ __all__ = ["VersionCreateParams"]
13
+
14
+
15
+ class VersionCreateParams(TypedDict, total=False):
16
+ files: Optional[SequenceNotStr[FileTypes]]
17
+ """Files to upload for the skill.
18
+
19
+ All files must be in the same top-level directory and must include a SKILL.md
20
+ file at the root of that directory.
21
+ """
22
+
23
+ betas: Annotated[List[AnthropicBetaParam], PropertyInfo(alias="anthropic-beta")]
24
+ """Optional header to specify the beta version(s) you want to use."""
@@ -0,0 +1,49 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from ...._models import BaseModel
4
+
5
+ __all__ = ["VersionCreateResponse"]
6
+
7
+
8
+ class VersionCreateResponse(BaseModel):
9
+ id: str
10
+ """Unique identifier for the skill version.
11
+
12
+ The format and length of IDs may change over time.
13
+ """
14
+
15
+ created_at: str
16
+ """ISO 8601 timestamp of when the skill version was created."""
17
+
18
+ description: str
19
+ """Description of the skill version.
20
+
21
+ This is extracted from the SKILL.md file in the skill upload.
22
+ """
23
+
24
+ directory: str
25
+ """Directory name of the skill version.
26
+
27
+ This is the top-level directory name that was extracted from the uploaded files.
28
+ """
29
+
30
+ name: str
31
+ """Human-readable name of the skill version.
32
+
33
+ This is extracted from the SKILL.md file in the skill upload.
34
+ """
35
+
36
+ skill_id: str
37
+ """Identifier for the skill that this version belongs to."""
38
+
39
+ type: str
40
+ """Object type.
41
+
42
+ For Skill Versions, this is always `"skill_version"`.
43
+ """
44
+
45
+ version: str
46
+ """Version identifier for the skill.
47
+
48
+ Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
49
+ """