From 5e247a3c3afb9a3dad954eaa5890de106ae2edb9 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Wed, 8 Jan 2025 20:39:16 -0600 Subject: [PATCH] fix: use proper count tokens endpoint --- src/AnthropicClient/AnthropicApiClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AnthropicClient/AnthropicApiClient.cs b/src/AnthropicClient/AnthropicApiClient.cs index 831161d..1cc6ebb 100644 --- a/src/AnthropicClient/AnthropicApiClient.cs +++ b/src/AnthropicClient/AnthropicApiClient.cs @@ -71,7 +71,7 @@ public class AnthropicApiClient : IAnthropicApiClient private const string BaseUrl = "https://api.anthropic.com/v1/"; private const string ApiKeyHeader = "x-api-key"; private const string MessagesEndpoint = "messages"; - private string CountTokensEndpoint => $"{MessagesEndpoint}/count-tokens"; + private string CountTokensEndpoint => $"{MessagesEndpoint}/count_tokens"; private string MessageBatchesEndpoint => $"{MessagesEndpoint}/batches"; private const string ModelsEndpoint = "models"; private const string JsonContentType = "application/json";