2024-11-19 20:13:35 +00:00
<!DOCTYPE html>
2024-07-07 16:16:55 -05:00
< html >
< head >
< meta charset = "utf-8" >
< title > Interface IAnthropicApiClient | AnthropicClient </ title >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< meta name = "title" content = "Interface IAnthropicApiClient | AnthropicClient " >
< meta name = "description" content = "Represents a client for interacting with the Anthropic API." >
< link rel = "icon" href = "../favicon.ico" >
< link rel = "stylesheet" href = "../public/docfx.min.css" >
< link rel = "stylesheet" href = "../public/main.css" >
< meta name = "docfx:navrel" content = "../toc.html" >
< meta name = "docfx:tocrel" content = "toc.html" >
< meta name = "docfx:rel" content = "../" >
2024-07-07 16:46:36 -05:00
< meta name = "docfx:docurl" content = "https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_IAnthropicApiClient.md&value=---%0Auid%3A%20AnthropicClient.IAnthropicApiClient%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" >
2024-07-07 16:16:55 -05:00
< meta name = "loc:inThisArticle" content = "In this article" >
< meta name = "loc:searchResultsCount" content = "{count} results for "{query}"" >
< meta name = "loc:searchNoResults" content = "No results for "{query}"" >
< meta name = "loc:tocFilter" content = "Filter by title" >
< meta name = "loc:nextArticle" content = "Next" >
< meta name = "loc:prevArticle" content = "Previous" >
< meta name = "loc:themeLight" content = "Light" >
< meta name = "loc:themeDark" content = "Dark" >
< meta name = "loc:themeAuto" content = "Auto" >
< meta name = "loc:changeTheme" content = "Change theme" >
< meta name = "loc:copy" content = "Copy" >
< meta name = "loc:downloadPdf" content = "Download PDF" >
< script type = "module" src = "./../public/docfx.min.js" ></ script >
< script >
const theme = localStorage . getItem ( 'theme' ) || 'auto'
document . documentElement . setAttribute ( 'data-bs-theme' , theme === 'auto' ? ( window . matchMedia ( '(prefers-color-scheme: dark)' ). matches ? 'dark' : 'light' ) : theme )
</ script >
</ head >
< body class = "tex2jax_ignore" data-layout = "" data-yaml-mime = "ManagedReference" >
< header class = "bg-body border-bottom" >
< nav id = "autocollapse" class = "navbar navbar-expand-md" role = "navigation" >
< div class = "container-xxl flex-nowrap" >
< a class = "navbar-brand" href = "../index.html" >
< img id = "logo" class = "svg" src = "../logo.svg" alt = "AnthropicClient" >
AnthropicClient
</ a >
< button class = "btn btn-lg d-md-none border-0" type = "button" data-bs-toggle = "collapse" data-bs-target = "#navpanel" aria-controls = "navpanel" aria-expanded = "false" aria-label = "Toggle navigation" >
< i class = "bi bi-three-dots" ></ i >
</ button >
< div class = "collapse navbar-collapse" id = "navpanel" >
< div id = "navbar" >
< form class = "search" role = "search" id = "search" >
< i class = "bi bi-search" ></ i >
2024-11-19 20:13:35 +00:00
< input class = "form-control" id = "search-query" type = "search" disabled placeholder = "Search" autocomplete = "off" aria-label = "Search" >
2024-07-07 16:16:55 -05:00
</ form >
</ div >
</ div >
</ div >
</ nav >
</ header >
< main class = "container-xxl" >
< div class = "toc-offcanvas" >
< div class = "offcanvas-md offcanvas-start" tabindex = "-1" id = "tocOffcanvas" aria-labelledby = "tocOffcanvasLabel" >
< div class = "offcanvas-header" >
< h5 class = "offcanvas-title" id = "tocOffcanvasLabel" > Table of Contents</ h5 >
< button type = "button" class = "btn-close" data-bs-dismiss = "offcanvas" data-bs-target = "#tocOffcanvas" aria-label = "Close" ></ button >
</ div >
< div class = "offcanvas-body" >
< nav class = "toc" id = "toc" ></ nav >
</ div >
</ div >
</ div >
< div class = "content" >
< div class = "actionbar" >
< button class = "btn btn-lg border-0 d-md-none" type = "button" data-bs-toggle = "offcanvas" data-bs-target = "#tocOffcanvas" aria-controls = "tocOffcanvas" aria-expanded = "false" aria-label = "Show table of contents" >
< i class = "bi bi-list" ></ i >
</ button >
< nav id = "breadcrumb" ></ nav >
</ div >
< article data-uid = "AnthropicClient.IAnthropicApiClient" >
< h1 id = "AnthropicClient_IAnthropicApiClient" data-uid = "AnthropicClient.IAnthropicApiClient" class = "text-break" >
2025-01-15 16:33:05 +00:00
Interface IAnthropicApiClient < a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L8" >< i class = "bi bi-code-slash" ></ i ></ a >
2024-07-07 16:16:55 -05:00
</ h1 >
< div class = "facts text-secondary" >
< dl >< dt > Namespace</ dt >< dd >< a class = "xref" href = "AnthropicClient.html" > AnthropicClient</ a ></ dd ></ dl >
< dl >< dt > Assembly</ dt >< dd > AnthropicClient.dll</ dd ></ dl >
</ div >
< div class = "markdown summary" >< p > Represents a client for interacting with the Anthropic API.</ p >
</ div >
< div class = "markdown conceptual" ></ div >
< div class = "codewrapper" >
< pre >< code class = "lang-csharp hljs" > public interface IAnthropicApiClient</ code ></ pre >
</ div >
< h2 class = "section" id = "methods" > Methods
</ h2 >
2025-01-15 16:33:05 +00:00
< a id = "AnthropicClient_IAnthropicApiClient_CancelMessageBatchAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.CancelMessageBatchAsync*" ></ a >
2025-05-19 20:34:34 +00:00
< h3 id = "AnthropicClient_IAnthropicApiClient_CancelMessageBatchAsync_System_String_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.CancelMessageBatchAsync(System.String,System.Threading.CancellationToken)" >
CancelMessageBatchAsync(string, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L64" >< i class = "bi bi-code-slash" ></ i ></ a >
2025-01-15 16:33:05 +00:00
</ h3 >
< div class = "markdown level1 summary" >< p > Cancels a message batch asynchronously.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
2025-05-19 20:34:34 +00:00
< pre >< code class = "lang-csharp hljs" > Task< AnthropicResult< MessageBatchResponse>> CancelMessageBatchAsync(string batchId, CancellationToken cancellationToken = default)</ code ></ pre >
2025-01-15 16:33:05 +00:00
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > batchId</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.string" > string</ a ></ dt >
< dd >< p > The ID of the message batch to cancel.</ p >
2025-05-19 20:34:34 +00:00
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
2025-01-15 16:33:05 +00:00
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1" > Task</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.MessageBatchResponse.html" > MessageBatchResponse</ a > >> </ dt >
< dd >< p > A task that represents the asynchronous operation. The task result contains the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.MessageBatchResponse.html" > MessageBatchResponse</ a > .</ p >
</ dd >
</ dl >
2025-01-03 02:56:41 +00:00
< a id = "AnthropicClient_IAnthropicApiClient_CountMessageTokensAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.CountMessageTokensAsync*" ></ a >
2025-05-19 20:34:34 +00:00
< h3 id = "AnthropicClient_IAnthropicApiClient_CountMessageTokensAsync_AnthropicClient_Models_CountMessageTokensRequest_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.CountMessageTokensAsync(AnthropicClient.Models.CountMessageTokensRequest,System.Threading.CancellationToken)" >
CountMessageTokensAsync(CountMessageTokensRequest, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L88" >< i class = "bi bi-code-slash" ></ i ></ a >
2025-01-03 02:56:41 +00:00
</ h3 >
< div class = "markdown level1 summary" >< p > Counts the tokens in a message asynchronously.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
2025-05-19 20:34:34 +00:00
< pre >< code class = "lang-csharp hljs" > Task< AnthropicResult< TokenCountResponse>> CountMessageTokensAsync(CountMessageTokensRequest request, CancellationToken cancellationToken = default)</ code ></ pre >
2025-01-03 02:56:41 +00:00
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > request</ code > < a class = "xref" href = "AnthropicClient.Models.CountMessageTokensRequest.html" > CountMessageTokensRequest</ a ></ dt >
< dd >< p > The count message tokens request.</ p >
2025-05-19 20:34:34 +00:00
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
2025-01-03 02:56:41 +00:00
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1" > Task</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.TokenCountResponse.html" > TokenCountResponse</ a > >> </ dt >
< dd >< p > A task that represents the asynchronous operation. The task result contains the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.TokenCountResponse.html" > TokenCountResponse</ a > .</ p >
</ dd >
</ dl >
2025-07-15 04:30:56 +00:00
< a id = "AnthropicClient_IAnthropicApiClient_CreateFileAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.CreateFileAsync*" ></ a >
< h3 id = "AnthropicClient_IAnthropicApiClient_CreateFileAsync_AnthropicClient_Models_CreateFileRequest_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.CreateFileAsync(AnthropicClient.Models.CreateFileRequest,System.Threading.CancellationToken)" >
CreateFileAsync(CreateFileRequest, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L121" >< i class = "bi bi-code-slash" ></ i ></ a >
</ h3 >
< div class = "markdown level1 summary" >< p > Creates a file asynchronously using the Files API.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
< pre >< code class = "lang-csharp hljs" > Task< AnthropicResult< AnthropicFile>> CreateFileAsync(CreateFileRequest request, CancellationToken cancellationToken = default)</ code ></ pre >
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > request</ code > < a class = "xref" href = "AnthropicClient.Models.CreateFileRequest.html" > CreateFileRequest</ a ></ dt >
< dd >< p > The file creation request.</ p >
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1" > Task</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.AnthropicFile.html" > AnthropicFile</ a > >> </ dt >
< dd >< p > A task that represents the asynchronous operation. The task result contains the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.AnthropicFile.html" > AnthropicFile</ a > .</ p >
</ dd >
</ dl >
2024-07-07 16:16:55 -05:00
< a id = "AnthropicClient_IAnthropicApiClient_CreateMessageAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.CreateMessageAsync*" ></ a >
2025-05-19 20:34:34 +00:00
< h3 id = "AnthropicClient_IAnthropicApiClient_CreateMessageAsync_AnthropicClient_Models_MessageRequest_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.CreateMessageAsync(AnthropicClient.Models.MessageRequest,System.Threading.CancellationToken)" >
CreateMessageAsync(MessageRequest, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L16" >< i class = "bi bi-code-slash" ></ i ></ a >
2024-07-07 16:16:55 -05:00
</ h3 >
< div class = "markdown level1 summary" >< p > Creates a message asynchronously.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
2025-05-19 20:34:34 +00:00
< pre >< code class = "lang-csharp hljs" > Task< AnthropicResult< MessageResponse>> CreateMessageAsync(MessageRequest request, CancellationToken cancellationToken = default)</ code ></ pre >
2024-07-07 16:16:55 -05:00
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > request</ code > < a class = "xref" href = "AnthropicClient.Models.MessageRequest.html" > MessageRequest</ a ></ dt >
< dd >< p > The message request to create.</ p >
2025-05-19 20:34:34 +00:00
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
2024-07-07 16:16:55 -05:00
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1" > Task</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.MessageResponse.html" > MessageResponse</ a > >> </ dt >
< dd >< p > A task that represents the asynchronous operation. The task result contains the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > .</ p >
</ dd >
</ dl >
< a id = "AnthropicClient_IAnthropicApiClient_CreateMessageAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.CreateMessageAsync*" ></ a >
2025-05-19 20:34:34 +00:00
< h3 id = "AnthropicClient_IAnthropicApiClient_CreateMessageAsync_AnthropicClient_Models_StreamMessageRequest_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.CreateMessageAsync(AnthropicClient.Models.StreamMessageRequest,System.Threading.CancellationToken)" >
CreateMessageAsync(StreamMessageRequest, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L24" >< i class = "bi bi-code-slash" ></ i ></ a >
2024-07-07 16:16:55 -05:00
</ h3 >
< div class = "markdown level1 summary" >< p > Creates a message asynchronously and streams the response.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
2025-05-19 20:34:34 +00:00
< pre >< code class = "lang-csharp hljs" > IAsyncEnumerable< AnthropicEvent> CreateMessageAsync(StreamMessageRequest request, CancellationToken cancellationToken = default)</ code ></ pre >
2024-07-07 16:16:55 -05:00
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > request</ code > < a class = "xref" href = "AnthropicClient.Models.StreamMessageRequest.html" > StreamMessageRequest</ a ></ dt >
< dd >< p > The message request to create.</ p >
2025-05-19 20:34:34 +00:00
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
2024-07-07 16:16:55 -05:00
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.collections.generic.iasyncenumerable-1" > IAsyncEnumerable</ a > < < a class = "xref" href = "AnthropicClient.Models.AnthropicEvent.html" > AnthropicEvent</ a > > </ dt >
< dd >< p > An asynchronous enumerable that yields the response event by event.</ p >
</ dd >
</ dl >
2025-01-15 16:33:05 +00:00
< a id = "AnthropicClient_IAnthropicApiClient_CreateMessageBatchAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.CreateMessageBatchAsync*" ></ a >
2025-05-19 20:34:34 +00:00
< h3 id = "AnthropicClient_IAnthropicApiClient_CreateMessageBatchAsync_AnthropicClient_Models_MessageBatchRequest_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.CreateMessageBatchAsync(AnthropicClient.Models.MessageBatchRequest,System.Threading.CancellationToken)" >
CreateMessageBatchAsync(MessageBatchRequest, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L32" >< i class = "bi bi-code-slash" ></ i ></ a >
2025-01-15 16:33:05 +00:00
</ h3 >
< div class = "markdown level1 summary" >< p > Creates a batch of messages asynchronously.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
2025-05-19 20:34:34 +00:00
< pre >< code class = "lang-csharp hljs" > Task< AnthropicResult< MessageBatchResponse>> CreateMessageBatchAsync(MessageBatchRequest request, CancellationToken cancellationToken = default)</ code ></ pre >
2025-01-15 16:33:05 +00:00
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > request</ code > < a class = "xref" href = "AnthropicClient.Models.MessageBatchRequest.html" > MessageBatchRequest</ a ></ dt >
< dd >< p > The message batch request to create.</ p >
2025-05-19 20:34:34 +00:00
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
2025-01-15 16:33:05 +00:00
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1" > Task</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.MessageBatchResponse.html" > MessageBatchResponse</ a > >> </ dt >
< dd >< p > A task that represents the asynchronous operation. The task result contains the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.MessageBatchResponse.html" > MessageBatchResponse</ a > .</ p >
</ dd >
</ dl >
2025-07-15 04:30:56 +00:00
< a id = "AnthropicClient_IAnthropicApiClient_DeleteFileAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.DeleteFileAsync*" ></ a >
< h3 id = "AnthropicClient_IAnthropicApiClient_DeleteFileAsync_System_String_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.DeleteFileAsync(System.String,System.Threading.CancellationToken)" >
DeleteFileAsync(string, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L162" >< i class = "bi bi-code-slash" ></ i ></ a >
</ h3 >
< div class = "markdown level1 summary" >< p > Deletes a file by its ID asynchronously.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
< pre >< code class = "lang-csharp hljs" > Task< AnthropicResult< AnthropicFileDeleteResponse>> DeleteFileAsync(string fileId, CancellationToken cancellationToken = default)</ code ></ pre >
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > fileId</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.string" > string</ a ></ dt >
< dd >< p > The ID of the file to delete.</ p >
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1" > Task</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.AnthropicFileDeleteResponse.html" > AnthropicFileDeleteResponse</ a > >> </ dt >
< dd >< p > A task that represents the asynchronous operation. The task result contains the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.AnthropicFileDeleteResponse.html" > AnthropicFileDeleteResponse</ a > .</ p >
</ dd >
</ dl >
2025-01-15 16:33:05 +00:00
< a id = "AnthropicClient_IAnthropicApiClient_DeleteMessageBatchAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.DeleteMessageBatchAsync*" ></ a >
2025-05-19 20:34:34 +00:00
< h3 id = "AnthropicClient_IAnthropicApiClient_DeleteMessageBatchAsync_System_String_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.DeleteMessageBatchAsync(System.String,System.Threading.CancellationToken)" >
DeleteMessageBatchAsync(string, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L72" >< i class = "bi bi-code-slash" ></ i ></ a >
2025-01-15 16:33:05 +00:00
</ h3 >
< div class = "markdown level1 summary" >< p > Deletes a message batch asynchronously.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
2025-05-19 20:34:34 +00:00
< pre >< code class = "lang-csharp hljs" > Task< AnthropicResult< MessageBatchDeleteResponse>> DeleteMessageBatchAsync(string batchId, CancellationToken cancellationToken = default)</ code ></ pre >
2025-01-15 16:33:05 +00:00
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > batchId</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.string" > string</ a ></ dt >
< dd >< p > The ID of the message batch to delete.</ p >
2025-05-19 20:34:34 +00:00
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
2025-01-15 16:33:05 +00:00
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1" > Task</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.MessageBatchDeleteResponse.html" > MessageBatchDeleteResponse</ a > >> </ dt >
< dd >< p > A task that represents the asynchronous operation. The task result contains the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.MessageBatchDeleteResponse.html" > MessageBatchDeleteResponse</ a > .</ p >
</ dd >
</ dl >
2025-07-15 04:30:56 +00:00
< a id = "AnthropicClient_IAnthropicApiClient_GetFileAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.GetFileAsync*" ></ a >
< h3 id = "AnthropicClient_IAnthropicApiClient_GetFileAsync_System_String_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.GetFileAsync(System.String,System.Threading.CancellationToken)" >
GetFileAsync(string, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L153" >< i class = "bi bi-code-slash" ></ i ></ a >
</ h3 >
< div class = "markdown level1 summary" >< p > Gets a file's content by its ID asynchronously.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
< pre >< code class = "lang-csharp hljs" > Task< AnthropicResult< Stream>> GetFileAsync(string fileId, CancellationToken cancellationToken = default)</ code ></ pre >
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > fileId</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.string" > string</ a ></ dt >
< dd >< p > The ID of the file to get the content for.</ p >
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1" > Task</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.io.stream" > Stream</ a > >> </ dt >
< dd >< p > A task that represents the asynchronous operation. The task result contains the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is a stream containing the file content.</ p >
</ dd >
</ dl >
< a id = "AnthropicClient_IAnthropicApiClient_GetFileInfoAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.GetFileInfoAsync*" ></ a >
< h3 id = "AnthropicClient_IAnthropicApiClient_GetFileInfoAsync_System_String_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.GetFileInfoAsync(System.String,System.Threading.CancellationToken)" >
GetFileInfoAsync(string, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L145" >< i class = "bi bi-code-slash" ></ i ></ a >
</ h3 >
< div class = "markdown level1 summary" >< p > Gets a file's metadata by its ID asynchronously.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
< pre >< code class = "lang-csharp hljs" > Task< AnthropicResult< AnthropicFile>> GetFileInfoAsync(string fileId, CancellationToken cancellationToken = default)</ code ></ pre >
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > fileId</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.string" > string</ a ></ dt >
< dd >< p > The ID of the file to get.</ p >
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1" > Task</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.AnthropicFile.html" > AnthropicFile</ a > >> </ dt >
< dd >< p > A task that represents the asynchronous operation. The task result contains the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.AnthropicFile.html" > AnthropicFile</ a > .</ p >
</ dd >
</ dl >
2025-01-15 16:33:05 +00:00
< a id = "AnthropicClient_IAnthropicApiClient_GetMessageBatchAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.GetMessageBatchAsync*" ></ a >
2025-05-19 20:34:34 +00:00
< h3 id = "AnthropicClient_IAnthropicApiClient_GetMessageBatchAsync_System_String_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.GetMessageBatchAsync(System.String,System.Threading.CancellationToken)" >
GetMessageBatchAsync(string, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L40" >< i class = "bi bi-code-slash" ></ i ></ a >
2025-01-15 16:33:05 +00:00
</ h3 >
< div class = "markdown level1 summary" >< p > Gets a message batch asynchronously.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
2025-05-19 20:34:34 +00:00
< pre >< code class = "lang-csharp hljs" > Task< AnthropicResult< MessageBatchResponse>> GetMessageBatchAsync(string batchId, CancellationToken cancellationToken = default)</ code ></ pre >
2025-01-15 16:33:05 +00:00
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > batchId</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.string" > string</ a ></ dt >
< dd >< p > The ID of the message batch to get.</ p >
2025-05-19 20:34:34 +00:00
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
2025-01-15 16:33:05 +00:00
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1" > Task</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.MessageBatchResponse.html" > MessageBatchResponse</ a > >> </ dt >
< dd >< p > A task that represents the asynchronous operation. The task result contains the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.MessageBatchResponse.html" > MessageBatchResponse</ a > .</ p >
</ dd >
</ dl >
< a id = "AnthropicClient_IAnthropicApiClient_GetMessageBatchResultsAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.GetMessageBatchResultsAsync*" ></ a >
2025-05-19 20:34:34 +00:00
< h3 id = "AnthropicClient_IAnthropicApiClient_GetMessageBatchResultsAsync_System_String_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.GetMessageBatchResultsAsync(System.String,System.Threading.CancellationToken)" >
GetMessageBatchResultsAsync(string, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L80" >< i class = "bi bi-code-slash" ></ i ></ a >
2025-01-15 16:33:05 +00:00
</ h3 >
< div class = "markdown level1 summary" >< p > Gets the results of a message batch asynchronously.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
2025-05-19 20:34:34 +00:00
< pre >< code class = "lang-csharp hljs" > Task< AnthropicResult< IAsyncEnumerable< MessageBatchResultItem>>> GetMessageBatchResultsAsync(string batchId, CancellationToken cancellationToken = default)</ code ></ pre >
2025-01-15 16:33:05 +00:00
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > batchId</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.string" > string</ a ></ dt >
< dd >< p > The ID of the message batch to get the results for.</ p >
2025-05-19 20:34:34 +00:00
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
2025-01-15 16:33:05 +00:00
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1" > Task</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.collections.generic.iasyncenumerable-1" > IAsyncEnumerable</ a > < < a class = "xref" href = "AnthropicClient.Models.MessageBatchResultItem.html" > MessageBatchResultItem</ a > >>> </ dt >
< dd >< p > A task that represents the asynchronous operation. The task result contains the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.collections.generic.iasyncenumerable-1" > IAsyncEnumerable< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.MessageBatchResultItem.html" > MessageBatchResultItem</ a > .</ p >
</ dd >
</ dl >
2025-01-06 04:04:17 +00:00
< a id = "AnthropicClient_IAnthropicApiClient_GetModelAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.GetModelAsync*" ></ a >
2025-05-19 20:34:34 +00:00
< h3 id = "AnthropicClient_IAnthropicApiClient_GetModelAsync_System_String_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.GetModelAsync(System.String,System.Threading.CancellationToken)" >
GetModelAsync(string, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L113" >< i class = "bi bi-code-slash" ></ i ></ a >
2025-01-06 04:04:17 +00:00
</ h3 >
< div class = "markdown level1 summary" >< p > Gets a model by its ID asynchronously.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
2025-05-19 20:34:34 +00:00
< pre >< code class = "lang-csharp hljs" > Task< AnthropicResult< AnthropicModel>> GetModelAsync(string modelId, CancellationToken cancellationToken = default)</ code ></ pre >
2025-01-06 04:04:17 +00:00
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > modelId</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.string" > string</ a ></ dt >
< dd >< p > The ID of the model to get.</ p >
2025-05-19 20:34:34 +00:00
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
2025-01-06 04:04:17 +00:00
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1" > Task</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.AnthropicModel.html" > AnthropicModel</ a > >> </ dt >
< dd >< p > A task that represents the asynchronous operation. The task result contains the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.AnthropicModel.html" > AnthropicModel</ a > .</ p >
</ dd >
</ dl >
2025-07-15 04:30:56 +00:00
< a id = "AnthropicClient_IAnthropicApiClient_ListAllFilesAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.ListAllFilesAsync*" ></ a >
< h3 id = "AnthropicClient_IAnthropicApiClient_ListAllFilesAsync_System_Int32_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.ListAllFilesAsync(System.Int32,System.Threading.CancellationToken)" >
ListAllFilesAsync(int, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L137" >< i class = "bi bi-code-slash" ></ i ></ a >
</ h3 >
< div class = "markdown level1 summary" >< p > Lists all files asynchronously, returning every page of results.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
< pre >< code class = "lang-csharp hljs" > IAsyncEnumerable< AnthropicResult< Page< AnthropicFile>>> ListAllFilesAsync(int limit = 20, CancellationToken cancellationToken = default)</ code ></ pre >
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > limit</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.int32" > int</ a ></ dt >
< dd >< p > The maximum number of files to return in each page.</ p >
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.collections.generic.iasyncenumerable-1" > IAsyncEnumerable</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.Page-1.html" > Page</ a > < < a class = "xref" href = "AnthropicClient.Models.AnthropicFile.html" > AnthropicFile</ a > >>> </ dt >
< dd >< p > An asynchronous enumerable that yields the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.Page-1.html" > Page< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.AnthropicFile.html" > AnthropicFile</ a > .</ p >
</ dd >
</ dl >
2025-01-15 16:33:05 +00:00
< a id = "AnthropicClient_IAnthropicApiClient_ListAllMessageBatchesAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.ListAllMessageBatchesAsync*" ></ a >
2025-05-19 20:34:34 +00:00
< h3 id = "AnthropicClient_IAnthropicApiClient_ListAllMessageBatchesAsync_System_Int32_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.ListAllMessageBatchesAsync(System.Int32,System.Threading.CancellationToken)" >
ListAllMessageBatchesAsync(int, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L56" >< i class = "bi bi-code-slash" ></ i ></ a >
2025-01-15 16:33:05 +00:00
</ h3 >
< div class = "markdown level1 summary" >< p > Lists all message batches asynchronously.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
2025-05-19 20:34:34 +00:00
< pre >< code class = "lang-csharp hljs" > IAsyncEnumerable< AnthropicResult< Page< MessageBatchResponse>>> ListAllMessageBatchesAsync(int limit = 20, CancellationToken cancellationToken = default)</ code ></ pre >
2025-01-15 16:33:05 +00:00
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > limit</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.int32" > int</ a ></ dt >
< dd >< p > The maximum number of message batches to return in each page.</ p >
2025-05-19 20:34:34 +00:00
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
2025-01-15 16:33:05 +00:00
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.collections.generic.iasyncenumerable-1" > IAsyncEnumerable</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.Page-1.html" > Page</ a > < < a class = "xref" href = "AnthropicClient.Models.MessageBatchResponse.html" > MessageBatchResponse</ a > >>> </ dt >
< dd >< p > An asynchronous enumerable that yields the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.Page-1.html" > Page< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.MessageBatchResponse.html" > MessageBatchResponse</ a > .</ p >
</ dd >
</ dl >
2025-01-06 04:04:17 +00:00
< a id = "AnthropicClient_IAnthropicApiClient_ListAllModelsAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.ListAllModelsAsync*" ></ a >
2025-05-19 20:34:34 +00:00
< h3 id = "AnthropicClient_IAnthropicApiClient_ListAllModelsAsync_System_Int32_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.ListAllModelsAsync(System.Int32,System.Threading.CancellationToken)" >
ListAllModelsAsync(int, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L105" >< i class = "bi bi-code-slash" ></ i ></ a >
2025-01-06 04:04:17 +00:00
</ h3 >
2025-05-19 20:34:34 +00:00
< div class = "markdown level1 summary" >< p > Lists all models asynchronously, returning every page of results.</ p >
2025-01-06 04:04:17 +00:00
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
2025-05-19 20:34:34 +00:00
< pre >< code class = "lang-csharp hljs" > IAsyncEnumerable< AnthropicResult< Page< AnthropicModel>>> ListAllModelsAsync(int limit = 20, CancellationToken cancellationToken = default)</ code ></ pre >
2025-01-06 04:04:17 +00:00
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > limit</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.int32" > int</ a ></ dt >
< dd >< p > The maximum number of models to return in each page.</ p >
2025-05-19 20:34:34 +00:00
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
2025-01-06 04:04:17 +00:00
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.collections.generic.iasyncenumerable-1" > IAsyncEnumerable</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.Page-1.html" > Page</ a > < < a class = "xref" href = "AnthropicClient.Models.AnthropicModel.html" > AnthropicModel</ a > >>> </ dt >
< dd >< p > An asynchronous enumerable that yields the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.Page-1.html" > Page< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.AnthropicModel.html" > AnthropicModel</ a > .</ p >
</ dd >
</ dl >
2025-07-15 04:30:56 +00:00
< a id = "AnthropicClient_IAnthropicApiClient_ListFilesAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.ListFilesAsync*" ></ a >
< h3 id = "AnthropicClient_IAnthropicApiClient_ListFilesAsync_AnthropicClient_Models_PagingRequest_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.ListFilesAsync(AnthropicClient.Models.PagingRequest,System.Threading.CancellationToken)" >
ListFilesAsync(PagingRequest?, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L129" >< i class = "bi bi-code-slash" ></ i ></ a >
</ h3 >
< div class = "markdown level1 summary" >< p > Lists files asynchronously, returning a single page of results.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
< pre >< code class = "lang-csharp hljs" > Task< AnthropicResult< Page< AnthropicFile>>> ListFilesAsync(PagingRequest? request = null, CancellationToken cancellationToken = default)</ code ></ pre >
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > request</ code > < a class = "xref" href = "AnthropicClient.Models.PagingRequest.html" > PagingRequest</ a ></ dt >
< dd >< p > The paging request to use for listing the files.</ p >
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1" > Task</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.Page-1.html" > Page</ a > < < a class = "xref" href = "AnthropicClient.Models.AnthropicFile.html" > AnthropicFile</ a > >>> </ dt >
< dd >< p > A task that represents the asynchronous operation. The task result contains the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.Page-1.html" > Page< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.AnthropicFile.html" > AnthropicFile</ a > .</ p >
</ dd >
</ dl >
2025-01-15 16:33:05 +00:00
< a id = "AnthropicClient_IAnthropicApiClient_ListMessageBatchesAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.ListMessageBatchesAsync*" ></ a >
2025-05-19 20:34:34 +00:00
< h3 id = "AnthropicClient_IAnthropicApiClient_ListMessageBatchesAsync_AnthropicClient_Models_PagingRequest_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.ListMessageBatchesAsync(AnthropicClient.Models.PagingRequest,System.Threading.CancellationToken)" >
ListMessageBatchesAsync(PagingRequest?, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L48" >< i class = "bi bi-code-slash" ></ i ></ a >
2025-01-15 16:33:05 +00:00
</ h3 >
< div class = "markdown level1 summary" >< p > Lists the message batches asynchronously.</ p >
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
2025-05-19 20:34:34 +00:00
< pre >< code class = "lang-csharp hljs" > Task< AnthropicResult< Page< MessageBatchResponse>>> ListMessageBatchesAsync(PagingRequest? request = null, CancellationToken cancellationToken = default)</ code ></ pre >
2025-01-15 16:33:05 +00:00
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > request</ code > < a class = "xref" href = "AnthropicClient.Models.PagingRequest.html" > PagingRequest</ a ></ dt >
< dd >< p > The paging request to use for listing the message batches.</ p >
2025-05-19 20:34:34 +00:00
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
2025-01-15 16:33:05 +00:00
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1" > Task</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.Page-1.html" > Page</ a > < < a class = "xref" href = "AnthropicClient.Models.MessageBatchResponse.html" > MessageBatchResponse</ a > >>> </ dt >
< dd >< p > A task that represents the asynchronous operation. The task result contains the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.Page-1.html" > Page< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.MessageBatchResponse.html" > MessageBatchResponse</ a > .</ p >
</ dd >
</ dl >
2025-01-06 04:04:17 +00:00
< a id = "AnthropicClient_IAnthropicApiClient_ListModelsAsync_" data-uid = "AnthropicClient.IAnthropicApiClient.ListModelsAsync*" ></ a >
2025-05-19 20:34:34 +00:00
< h3 id = "AnthropicClient_IAnthropicApiClient_ListModelsAsync_AnthropicClient_Models_PagingRequest_System_Threading_CancellationToken_" data-uid = "AnthropicClient.IAnthropicApiClient.ListModelsAsync(AnthropicClient.Models.PagingRequest,System.Threading.CancellationToken)" >
ListModelsAsync(PagingRequest?, CancellationToken)
< a class = "header-action link-secondary" title = "View source" href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L96" >< i class = "bi bi-code-slash" ></ i ></ a >
2025-01-06 04:04:17 +00:00
</ h3 >
2025-05-19 20:34:34 +00:00
< div class = "markdown level1 summary" >< p > Lists models asynchronously, returning a single page of results.</ p >
2025-01-06 04:04:17 +00:00
</ div >
< div class = "markdown level1 conceptual" ></ div >
< div class = "codewrapper" >
2025-05-19 20:34:34 +00:00
< pre >< code class = "lang-csharp hljs" > Task< AnthropicResult< Page< AnthropicModel>>> ListModelsAsync(PagingRequest? request = null, CancellationToken cancellationToken = default)</ code ></ pre >
2025-01-06 04:04:17 +00:00
</ div >
< h4 class = "section" > Parameters</ h4 >
< dl class = "parameters" >
< dt >< code > request</ code > < a class = "xref" href = "AnthropicClient.Models.PagingRequest.html" > PagingRequest</ a ></ dt >
< dd >< p > The paging request to use for listing the models.</ p >
2025-05-19 20:34:34 +00:00
</ dd >
< dt >< code > cancellationToken</ code > < a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken" > CancellationToken</ a ></ dt >
< dd >< p > A token to cancel the asynchronous operation.</ p >
2025-01-06 04:04:17 +00:00
</ dd >
</ dl >
< h4 class = "section" > Returns</ h4 >
< dl class = "parameters" >
< dt >< a class = "xref" href = "https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1" > Task</ a > < < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult</ a > < < a class = "xref" href = "AnthropicClient.Models.Page-1.html" > Page</ a > < < a class = "xref" href = "AnthropicClient.Models.AnthropicModel.html" > AnthropicModel</ a > >>> </ dt >
< dd >< p > A task that represents the asynchronous operation. The task result contains the response as an < a class = "xref" href = "AnthropicResult-1.html" > AnthropicResult< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.Page-1.html" > Page< T> </ a > where T is < a class = "xref" href = "AnthropicClient.Models.AnthropicModel.html" > AnthropicModel</ a > .</ p >
</ dd >
</ dl >
2024-07-07 16:16:55 -05:00
</ article >
< div class = "contribution d-print-none" >
2025-01-15 16:33:05 +00:00
< a href = "https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L8" class = "edit-link" > Edit this page</ a >
2024-07-07 16:16:55 -05:00
</ div >
</ div >
< div class = "affix" >
< nav id = "affix" ></ nav >
</ div >
</ main >
< div class = "container-xxl search-results" id = "search-results" ></ div >
< footer class = "border-top text-secondary" >
< div class = "container-xxl" >
< div class = "flex-fill" >
< span > Made with < a href = "https://dotnet.github.io/docfx" > docfx</ a ></ span >
</ div >
</ div >
</ footer >
</ body >
</ html >