Artifacts resource group.
Wraps GET /v1/compliance/apps/artifacts/{artifact_version_id}/content
for downloading versioned text artifacts (code, markdown, structured
output) that Claude generates as part of assistant responses.
Unlike files and generated_files, Artifacts has no
metadata endpoint and no DELETE — only the content download. The
reference metadata (id, version_id, title,
artifact_type) is carried inline on chat messages, so the listing
shape is part of the Chats response, not a separate Artifacts call.
Artifacts
Synchronous client for compliance artifact content.
download
download(artifact_version_id: str) -> bytes
Eager download bounded by max_download_bytes.
Raises FileTooLargeError when
the content exceeds the cap. Use download_to_file or
download_stream for larger artifacts.
download_to_file
download_to_file(
artifact_version_id: str, dest: PathLike
) -> None
Stream the artifact to dest (unbounded).
download_stream
download_stream(
artifact_version_id: str,
) -> Iterator[bytes]
Yield response chunks to the caller.
AsyncArtifacts
Asynchronous client for compliance artifact content.
download
async
download(artifact_version_id: str) -> bytes
Async analogue of download.
download_to_file
async
download_to_file(
artifact_version_id: str, dest: PathLike
) -> None
Async analogue of download_to_file.
download_stream
download_stream(
artifact_version_id: str,
) -> AsyncIterator[bytes]
Async analogue of download_stream.