@effect/ai-openrouter 0.8.1 → 0.8.2

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.
@@ -3,9 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ModelsListResponse = exports.ModelsCountResponse = exports.ModelName = exports.ModelGroup = exports.ModelArchitectureInstructType = exports.ModelArchitecture = exports.Model = exports.Message = exports.ListProviders200 = exports.ListParams = exports.ListEndpointsZdr200 = exports.ListEndpointsResponseArchitectureEnumInstructType = exports.ListEndpointsResponseArchitecture = exports.ListEndpointsResponse = exports.ListEndpoints200 = exports.List200 = exports.JSONSchemaConfig = exports.InternalServerResponseErrorData = exports.InternalServerResponse = exports.InputModality = exports.ImageGenerationStatus = exports.GetUserActivityParams = exports.GetUserActivity200 = exports.GetParametersParams = exports.GetParameters200 = exports.GetModelsParams = exports.GetKey200 = exports.GetGenerationParams = exports.GetGeneration200DataApiType = exports.GetGeneration200 = exports.GetCurrentKey200 = exports.GetCredits200 = exports.ForbiddenResponseErrorData = exports.ForbiddenResponse = exports.FilePathType = exports.FilePath = exports.FileCitationType = exports.FileCitation = exports.FileAnnotationDetailType = exports.FileAnnotationDetail = exports.ExchangeAuthCodeForAPIKeyRequestCodeChallengeMethod = exports.ExchangeAuthCodeForAPIKeyRequest = exports.ExchangeAuthCodeForAPIKey200 = exports.EndpointStatus = exports.EdgeNetworkTimeoutResponseErrorData = exports.EdgeNetworkTimeoutResponse = exports.DeleteKeys200 = exports.DefaultParameters = exports.DataCollection = exports.CreateKeysRequestLimitReset = exports.CreateKeysRequest = exports.CreateKeys201 = exports.CreateEmbeddingsRequestEncodingFormat = exports.CreateEmbeddingsRequest = exports.CreateEmbeddings200Object = exports.CreateEmbeddings200 = exports.CreateCoinbaseCharge200 = exports.CreateChargeRequestChainId = exports.CreateChargeRequest = exports.CreateAuthKeysCodeRequestCodeChallengeMethod = exports.CreateAuthKeysCodeRequest = exports.CreateAuthKeysCode200 = exports.CompletionUsage = exports.CompletionResponse = exports.CompletionLogprobs = exports.CompletionFinishReasonEnum = exports.CompletionFinishReason = exports.CompletionCreateParams = exports.CompletionChoice = exports.ClientError = exports.ChatStreamOptions = exports.ChatResponseChoice = exports.ChatResponse = exports.ChatMessageToolCall = exports.ChatMessageTokenLogprobs = exports.ChatMessageTokenLogprob = exports.ChatMessageContentItemVideo = exports.ChatMessageContentItemText = exports.ChatMessageContentItemImageImageUrlDetail = exports.ChatMessageContentItemImage = exports.ChatMessageContentItemCacheControlTtl = exports.ChatMessageContentItemCacheControl = exports.ChatMessageContentItemAudio = exports.ChatMessageContentItem = exports.ChatGenerationTokenUsage = exports.ChatGenerationParamsRouteEnum = exports.ChatGenerationParamsReasoningEffortEnum = exports.ChatGenerationParamsProviderEnumDataCollectionEnum = exports.ChatGenerationParams = exports.ChatError = exports.ChatCompletionFinishReason = exports.CacheControlEphemeral = exports.BigNumberUnion = exports.BadRequestResponseErrorData = exports.BadRequestResponse = exports.BadGatewayResponseErrorData = exports.BadGatewayResponse = exports.AssistantMessage = exports.AnnotationDetail = exports.ActivityItem = void 0;
7
- exports.ReasoningDetailSummary = exports.ReasoningDetailEncryptedType = exports.ReasoningDetailEncryptedFormat = exports.ReasoningDetailEncrypted = exports.ReasoningDetail = exports.Quantization = exports.PublicPricing = exports.PublicEndpointQuantizationEnum = exports.PublicEndpointQuantization = exports.PublicEndpoint = exports.ProviderSortUnion = exports.ProviderSortConfigPartitionEnum = exports.ProviderSortConfig = exports.ProviderSort = exports.ProviderPreferencesSort = exports.ProviderPreferences = exports.ProviderOverloadedResponseErrorData = exports.ProviderOverloadedResponse = exports.ProviderName = exports.PerRequestLimits = exports.PaymentRequiredResponseErrorData = exports.PaymentRequiredResponse = exports.PayloadTooLargeResponseErrorData = exports.PayloadTooLargeResponse = exports.Parameter = exports.PDFParserOptions = exports.PDFParserEngine = exports.OutputModality = exports.OutputMessageType = exports.OutputMessageStatusEnum = exports.OutputMessageRole = exports.OutputMessage = exports.OutputItemWebSearchCallType = exports.OutputItemWebSearchCall = exports.OutputItemReasoningType = exports.OutputItemReasoningStatusEnum = exports.OutputItemReasoning = exports.OutputItemImageGenerationCallType = exports.OutputItemImageGenerationCall = exports.OutputItemFunctionCallType = exports.OutputItemFunctionCallStatusEnum = exports.OutputItemFunctionCall = exports.OutputItemFileSearchCallType = exports.OutputItemFileSearchCall = exports.OpenResponsesWebSearchToolType = exports.OpenResponsesWebSearchTool = exports.OpenResponsesWebSearchPreviewToolType = exports.OpenResponsesWebSearchPreviewTool = exports.OpenResponsesWebSearchPreview20250311ToolType = exports.OpenResponsesWebSearchPreview20250311Tool = exports.OpenResponsesWebSearch20250826ToolType = exports.OpenResponsesWebSearch20250826Tool = exports.OpenResponsesResponseTextVerbosity = exports.OpenResponsesResponseText = exports.OpenResponsesRequestTruncationEnum = exports.OpenResponsesRequestTruncation = exports.OpenResponsesRequestServiceTier = exports.OpenResponsesRequestRoute = exports.OpenResponsesRequestMetadata = exports.OpenResponsesRequest = exports.OpenResponsesReasoningType = exports.OpenResponsesReasoningStatusEnum = exports.OpenResponsesReasoningFormat = exports.OpenResponsesReasoningConfig = exports.OpenResponsesReasoning = exports.OpenResponsesNonStreamingResponseObject = exports.OpenResponsesNonStreamingResponse = exports.OpenResponsesInputMessageItemType = exports.OpenResponsesInputMessageItemRoleEnum = exports.OpenResponsesInputMessageItem = exports.OpenResponsesInput = exports.OpenResponsesFunctionToolCallType = exports.OpenResponsesFunctionToolCall = exports.OpenResponsesFunctionCallOutputType = exports.OpenResponsesFunctionCallOutput = exports.OpenResponsesEasyInputMessageType = exports.OpenResponsesEasyInputMessageRoleEnum = exports.OpenResponsesEasyInputMessage = exports.OpenAIResponsesUsage = exports.OpenAIResponsesTruncation = exports.OpenAIResponsesToolChoiceEnumTypeEnum = exports.OpenAIResponsesToolChoiceEnumType = exports.OpenAIResponsesToolChoiceEnum = exports.OpenAIResponsesToolChoice = exports.OpenAIResponsesServiceTier = exports.OpenAIResponsesResponseStatus = exports.OpenAIResponsesRefusalContentType = exports.OpenAIResponsesRefusalContent = exports.OpenAIResponsesReasoningEffort = exports.OpenAIResponsesReasoningConfig = exports.OpenAIResponsesPrompt = exports.OpenAIResponsesInput = exports.OpenAIResponsesIncompleteDetailsReason = exports.OpenAIResponsesIncompleteDetails = exports.OpenAIResponsesIncludable = exports.OpenAIResponsesAnnotation = exports.NotFoundResponseErrorData = exports.NotFoundResponse = exports.NamedToolChoice = exports.ModelsListResponseData = void 0;
8
- exports.make = exports.WebSearchStatus = exports.WebSearchPreviewToolUserLocationType = exports.WebSearchPreviewToolUserLocation = exports.WebSearchEngine = exports.UserMessage = exports.UpdateKeysRequestLimitReset = exports.UpdateKeysRequest = exports.UpdateKeys200 = exports.UnprocessableEntityResponseErrorData = exports.UnprocessableEntityResponse = exports.UnauthorizedResponseErrorData = exports.UnauthorizedResponse = exports.URLCitationType = exports.URLCitationAnnotationDetailType = exports.URLCitationAnnotationDetail = exports.URLCitation = exports.TopProviderInfo = exports.ToolResponseMessage = exports.ToolDefinitionJson = exports.ToolChoiceOption = exports.ToolCallStatus = exports.TooManyRequestsResponseErrorData = exports.TooManyRequestsResponse = exports.SystemMessage = exports.ServiceUnavailableResponseErrorData = exports.ServiceUnavailableResponse = exports.Schema6 = exports.Schema5Enum = exports.Schema5 = exports.Schema4 = exports.Schema3 = exports.Schema2 = exports.Schema1 = exports.Schema0 = exports.ResponsesWebSearchUserLocationType = exports.ResponsesWebSearchUserLocation = exports.ResponsesWebSearchCallOutputType = exports.ResponsesWebSearchCallOutput = exports.ResponsesSearchContextSize = exports.ResponsesOutputMessageType = exports.ResponsesOutputMessageStatusEnum = exports.ResponsesOutputMessageRole = exports.ResponsesOutputMessage = exports.ResponsesOutputItemReasoningType = exports.ResponsesOutputItemReasoningStatusEnum = exports.ResponsesOutputItemReasoning = exports.ResponsesOutputItemFunctionCallType = exports.ResponsesOutputItemFunctionCallStatusEnum = exports.ResponsesOutputItemFunctionCall = exports.ResponsesOutputItemFileSearchCallType = exports.ResponsesOutputItemFileSearchCall = exports.ResponsesImageGenerationCallType = exports.ResponsesImageGenerationCall = exports.ResponsesFormatTextType = exports.ResponsesFormatTextJSONSchemaConfigType = exports.ResponsesFormatTextJSONSchemaConfig = exports.ResponsesFormatText = exports.ResponsesFormatJSONObjectType = exports.ResponsesFormatJSONObject = exports.ResponsesErrorFieldCode = exports.ResponsesErrorField = exports.ResponseTextConfigVerbosity = exports.ResponseTextConfig = exports.ResponseOutputTextType = exports.ResponseOutputText = exports.ResponseInputTextType = exports.ResponseInputText = exports.ResponseInputImageType = exports.ResponseInputImageDetail = exports.ResponseInputImage = exports.ResponseInputFileType = exports.ResponseInputFile = exports.ResponseInputAudioType = exports.ResponseInputAudioInputAudioFormat = exports.ResponseInputAudio = exports.ResponseFormatTextGrammar = exports.ResponseFormatTextConfig = exports.ResponseFormatJSONSchema = exports.RequestTimeoutResponseErrorData = exports.RequestTimeoutResponse = exports.ReasoningTextContentType = exports.ReasoningTextContent = exports.ReasoningSummaryVerbosity = exports.ReasoningSummaryTextType = exports.ReasoningSummaryText = exports.ReasoningDetailTextType = exports.ReasoningDetailTextFormat = exports.ReasoningDetailText = exports.ReasoningDetailSummaryType = exports.ReasoningDetailSummaryFormat = void 0;
6
+ exports.ExchangeAuthCodeForAPIKeyRequestCodeChallengeMethod = exports.ExchangeAuthCodeForAPIKeyRequest = exports.ExchangeAuthCodeForAPIKey200 = exports.EndpointStatus = exports.EdgeNetworkTimeoutResponseErrorData = exports.EdgeNetworkTimeoutResponse = exports.DeleteKeys200 = exports.DeleteGuardrail200 = exports.DefaultParameters = exports.DataCollection = exports.CreateMessages529Type = exports.CreateMessages529 = exports.CreateMessages503Type = exports.CreateMessages503 = exports.CreateMessages500Type = exports.CreateMessages500 = exports.CreateMessages429Type = exports.CreateMessages429 = exports.CreateMessages404Type = exports.CreateMessages404 = exports.CreateMessages403Type = exports.CreateMessages403 = exports.CreateMessages401Type = exports.CreateMessages401 = exports.CreateMessages400Type = exports.CreateMessages400 = exports.CreateKeysRequestLimitReset = exports.CreateKeysRequest = exports.CreateKeys201 = exports.CreateGuardrailRequestResetInterval = exports.CreateGuardrailRequest = exports.CreateGuardrail201DataResetInterval = exports.CreateGuardrail201 = exports.CreateEmbeddingsRequestEncodingFormat = exports.CreateEmbeddingsRequest = exports.CreateEmbeddings200Object = exports.CreateEmbeddings200 = exports.CreateCoinbaseCharge200 = exports.CreateChargeRequestChainId = exports.CreateChargeRequest = exports.CreateAuthKeysCodeRequestCodeChallengeMethod = exports.CreateAuthKeysCodeRequest = exports.CreateAuthKeysCode200 = exports.CompletionUsage = exports.CompletionResponse = exports.CompletionLogprobs = exports.CompletionFinishReasonEnum = exports.CompletionFinishReason = exports.CompletionCreateParams = exports.CompletionChoice = exports.ClientError = exports.ChatStreamOptions = exports.ChatResponseChoice = exports.ChatResponse = exports.ChatMessageToolCall = exports.ChatMessageTokenLogprobs = exports.ChatMessageTokenLogprob = exports.ChatMessageContentItemVideo = exports.ChatMessageContentItemText = exports.ChatMessageContentItemImageImageUrlDetail = exports.ChatMessageContentItemImage = exports.ChatMessageContentItemCacheControlTtl = exports.ChatMessageContentItemCacheControl = exports.ChatMessageContentItemAudio = exports.ChatMessageContentItem = exports.ChatGenerationTokenUsage = exports.ChatGenerationParamsRouteEnum = exports.ChatGenerationParamsReasoningEffortEnum = exports.ChatGenerationParamsProviderEnumDataCollectionEnum = exports.ChatGenerationParams = exports.ChatError = exports.ChatCompletionFinishReason = exports.CacheControlEphemeral = exports.BulkUnassignMembersFromGuardrailRequest = exports.BulkUnassignMembersFromGuardrail200 = exports.BulkUnassignKeysFromGuardrailRequest = exports.BulkUnassignKeysFromGuardrail200 = exports.BulkAssignMembersToGuardrailRequest = exports.BulkAssignMembersToGuardrail200 = exports.BulkAssignKeysToGuardrailRequest = exports.BulkAssignKeysToGuardrail200 = exports.BigNumberUnion = exports.BadRequestResponseErrorData = exports.BadRequestResponse = exports.BadGatewayResponseErrorData = exports.BadGatewayResponse = exports.AssistantMessage = exports.AnthropicMessagesResponseUsageServiceTier = exports.AnthropicMessagesResponseType = exports.AnthropicMessagesResponseStopReason = exports.AnthropicMessagesResponseRole = exports.AnthropicMessagesResponse = exports.AnthropicMessagesRequestToolChoiceEnumType = exports.AnthropicMessagesRequestThinkingEnumType = exports.AnthropicMessagesRequestServiceTier = exports.AnthropicMessagesRequestRoute = exports.AnthropicMessagesRequestProviderSort = exports.AnthropicMessagesRequest = exports.AnnotationDetail = exports.ActivityItem = void 0;
7
+ exports.OpenResponsesWebSearch20250826ToolType = exports.OpenResponsesWebSearch20250826Tool = exports.OpenResponsesResponseTextVerbosity = exports.OpenResponsesResponseText = exports.OpenResponsesRequestTruncationEnum = exports.OpenResponsesRequestTruncation = exports.OpenResponsesRequestServiceTier = exports.OpenResponsesRequestRoute = exports.OpenResponsesRequestMetadata = exports.OpenResponsesRequest = exports.OpenResponsesReasoningType = exports.OpenResponsesReasoningStatusEnum = exports.OpenResponsesReasoningFormat = exports.OpenResponsesReasoningConfig = exports.OpenResponsesReasoning = exports.OpenResponsesNonStreamingResponseObject = exports.OpenResponsesNonStreamingResponse = exports.OpenResponsesInputMessageItemType = exports.OpenResponsesInputMessageItemRoleEnum = exports.OpenResponsesInputMessageItem = exports.OpenResponsesInput = exports.OpenResponsesFunctionToolCallType = exports.OpenResponsesFunctionToolCall = exports.OpenResponsesFunctionCallOutputType = exports.OpenResponsesFunctionCallOutput = exports.OpenResponsesEasyInputMessageType = exports.OpenResponsesEasyInputMessageRoleEnum = exports.OpenResponsesEasyInputMessage = exports.OpenAIResponsesUsage = exports.OpenAIResponsesTruncation = exports.OpenAIResponsesToolChoiceEnumTypeEnum = exports.OpenAIResponsesToolChoiceEnumType = exports.OpenAIResponsesToolChoiceEnum = exports.OpenAIResponsesToolChoice = exports.OpenAIResponsesServiceTier = exports.OpenAIResponsesResponseStatus = exports.OpenAIResponsesRefusalContentType = exports.OpenAIResponsesRefusalContent = exports.OpenAIResponsesReasoningEffort = exports.OpenAIResponsesReasoningConfig = exports.OpenAIResponsesPrompt = exports.OpenAIResponsesInput = exports.OpenAIResponsesIncompleteDetailsReason = exports.OpenAIResponsesIncompleteDetails = exports.OpenAIResponsesIncludable = exports.OpenAIResponsesAnnotation = exports.NotFoundResponseErrorData = exports.NotFoundResponse = exports.NamedToolChoice = exports.ModelsListResponseData = exports.ModelsListResponse = exports.ModelsCountResponse = exports.ModelName = exports.ModelGroup = exports.ModelArchitectureInstructType = exports.ModelArchitecture = exports.Model = exports.Message = exports.ListProviders200 = exports.ListParams = exports.ListMemberAssignmentsParams = exports.ListMemberAssignments200 = exports.ListKeyAssignmentsParams = exports.ListKeyAssignments200 = exports.ListGuardrailsParams = exports.ListGuardrails200 = exports.ListGuardrailMemberAssignmentsParams = exports.ListGuardrailMemberAssignments200 = exports.ListGuardrailKeyAssignmentsParams = exports.ListGuardrailKeyAssignments200 = exports.ListEndpointsZdr200 = exports.ListEndpointsResponseArchitectureEnumInstructType = exports.ListEndpointsResponseArchitecture = exports.ListEndpointsResponse = exports.ListEndpoints200 = exports.List200 = exports.JSONSchemaConfig = exports.InternalServerResponseErrorData = exports.InternalServerResponse = exports.InputModality = exports.ImageGenerationStatus = exports.GetUserActivityParams = exports.GetUserActivity200 = exports.GetModelsParamsCategory = exports.GetModelsParams = exports.GetKey200 = exports.GetGuardrail200DataResetInterval = exports.GetGuardrail200 = exports.GetGenerationParams = exports.GetGeneration200DataApiType = exports.GetGeneration200 = exports.GetCurrentKey200 = exports.GetCredits200 = exports.ForbiddenResponseErrorData = exports.ForbiddenResponse = exports.FilePathType = exports.FilePath = exports.FileCitationType = exports.FileCitation = exports.FileAnnotationDetail = void 0;
8
+ exports.ResponsesOutputItemReasoningFormat = exports.ResponsesOutputItemReasoning = exports.ResponsesOutputItemFunctionCallType = exports.ResponsesOutputItemFunctionCallStatusEnum = exports.ResponsesOutputItemFunctionCall = exports.ResponsesOutputItemFileSearchCallType = exports.ResponsesOutputItemFileSearchCall = exports.ResponsesImageGenerationCallType = exports.ResponsesImageGenerationCall = exports.ResponsesFormatTextType = exports.ResponsesFormatTextJSONSchemaConfigType = exports.ResponsesFormatTextJSONSchemaConfig = exports.ResponsesFormatText = exports.ResponsesFormatJSONObjectType = exports.ResponsesFormatJSONObject = exports.ResponsesErrorFieldCode = exports.ResponsesErrorField = exports.ResponseTextConfigVerbosity = exports.ResponseTextConfig = exports.ResponseOutputTextType = exports.ResponseOutputText = exports.ResponseInputVideoType = exports.ResponseInputVideo = exports.ResponseInputTextType = exports.ResponseInputText = exports.ResponseInputImageType = exports.ResponseInputImageDetail = exports.ResponseInputImage = exports.ResponseInputFileType = exports.ResponseInputFile = exports.ResponseInputAudioType = exports.ResponseInputAudioInputAudioFormat = exports.ResponseInputAudio = exports.ResponseFormatTextGrammar = exports.ResponseFormatTextConfig = exports.ResponseFormatJSONSchema = exports.RequestTimeoutResponseErrorData = exports.RequestTimeoutResponse = exports.ReasoningTextContentType = exports.ReasoningTextContent = exports.ReasoningSummaryVerbosity = exports.ReasoningSummaryTextType = exports.ReasoningSummaryText = exports.ReasoningDetailText = exports.ReasoningDetailSummary = exports.ReasoningDetailEncrypted = exports.ReasoningDetail = exports.Quantization = exports.PublicPricing = exports.PublicEndpointThroughputLast30M = exports.PublicEndpointQuantizationEnum = exports.PublicEndpointQuantization = exports.PublicEndpoint = exports.ProviderSortUnion = exports.ProviderSortConfigPartitionEnum = exports.ProviderSortConfig = exports.ProviderSort = exports.ProviderPreferencesSort = exports.ProviderPreferences = exports.ProviderOverloadedResponseErrorData = exports.ProviderOverloadedResponse = exports.ProviderName = exports.PreferredMinThroughput = exports.PreferredMaxLatency = exports.PercentileThroughputCutoffs = exports.PercentileStats = exports.PercentileLatencyCutoffs = exports.PerRequestLimits = exports.PaymentRequiredResponseErrorData = exports.PaymentRequiredResponse = exports.PayloadTooLargeResponseErrorData = exports.PayloadTooLargeResponse = exports.Parameter = exports.PDFParserOptions = exports.PDFParserEngine = exports.OutputModality = exports.OutputMessageType = exports.OutputMessageStatusEnum = exports.OutputMessageRole = exports.OutputMessage = exports.OutputItemWebSearchCallType = exports.OutputItemWebSearchCall = exports.OutputItemReasoningType = exports.OutputItemReasoningStatusEnum = exports.OutputItemReasoning = exports.OutputItemImageGenerationCallType = exports.OutputItemImageGenerationCall = exports.OutputItemFunctionCallType = exports.OutputItemFunctionCallStatusEnum = exports.OutputItemFunctionCall = exports.OutputItemFileSearchCallType = exports.OutputItemFileSearchCall = exports.OpenRouterAnthropicMessageParamRole = exports.OpenRouterAnthropicMessageParam = exports.OpenResponsesWebSearchToolType = exports.OpenResponsesWebSearchTool = exports.OpenResponsesWebSearchPreviewToolType = exports.OpenResponsesWebSearchPreviewTool = exports.OpenResponsesWebSearchPreview20250311ToolType = exports.OpenResponsesWebSearchPreview20250311Tool = void 0;
9
+ exports.make = exports.WebSearchStatus = exports.WebSearchPreviewToolUserLocationType = exports.WebSearchPreviewToolUserLocation = exports.WebSearchEngine = exports.UserMessage = exports.UpdateKeysRequestLimitReset = exports.UpdateKeysRequest = exports.UpdateKeys200 = exports.UpdateGuardrailRequestResetInterval = exports.UpdateGuardrailRequest = exports.UpdateGuardrail200DataResetInterval = exports.UpdateGuardrail200 = exports.UnprocessableEntityResponseErrorData = exports.UnprocessableEntityResponse = exports.UnauthorizedResponseErrorData = exports.UnauthorizedResponse = exports.URLCitationType = exports.URLCitationAnnotationDetail = exports.URLCitation = exports.TopProviderInfo = exports.ToolResponseMessage = exports.ToolDefinitionJson = exports.ToolChoiceOption = exports.ToolCallStatus = exports.TooManyRequestsResponseErrorData = exports.TooManyRequestsResponse = exports.SystemMessage = exports.ServiceUnavailableResponseErrorData = exports.ServiceUnavailableResponse = exports.Schema6 = exports.Schema5 = exports.Schema4Enum = exports.Schema4 = exports.Schema3 = exports.Schema2 = exports.Schema1 = exports.Schema0 = exports.ResponsesWebSearchUserLocationType = exports.ResponsesWebSearchUserLocation = exports.ResponsesWebSearchCallOutputType = exports.ResponsesWebSearchCallOutput = exports.ResponsesSearchContextSize = exports.ResponsesOutputModality = exports.ResponsesOutputMessageType = exports.ResponsesOutputMessageStatusEnum = exports.ResponsesOutputMessageRole = exports.ResponsesOutputMessage = exports.ResponsesOutputItemReasoningType = exports.ResponsesOutputItemReasoningStatusEnum = void 0;
9
10
  var HttpClientError = _interopRequireWildcard(require("@effect/platform/HttpClientError"));
10
11
  var HttpClientRequest = _interopRequireWildcard(require("@effect/platform/HttpClientRequest"));
11
12
  var HttpClientResponse = _interopRequireWildcard(require("@effect/platform/HttpClientResponse"));
@@ -17,89 +18,92 @@ class CacheControlEphemeral extends /*#__PURE__*/S.Class("CacheControlEphemeral"
17
18
  "type": /*#__PURE__*/S.Literal("ephemeral")
18
19
  }) {}
19
20
  exports.CacheControlEphemeral = CacheControlEphemeral;
20
- class ReasoningDetailSummaryType extends /*#__PURE__*/S.Literal("reasoning.summary") {}
21
- exports.ReasoningDetailSummaryType = ReasoningDetailSummaryType;
22
- class ReasoningDetailSummaryFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "anthropic-claude-v1") {}
23
- /**
24
- * Reasoning summary detail
25
- */
26
- exports.ReasoningDetailSummaryFormat = ReasoningDetailSummaryFormat;
27
- class ReasoningDetailSummary extends /*#__PURE__*/S.Class("ReasoningDetailSummary")({
28
- "type": ReasoningDetailSummaryType,
29
- "summary": S.String,
30
- "id": /*#__PURE__*/S.optionalWith(S.String, {
21
+ class OpenResponsesReasoningFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "azure-openai-responses-v1", "xai-responses-v1", "anthropic-claude-v1", "google-gemini-v1") {}
22
+ exports.OpenResponsesReasoningFormat = OpenResponsesReasoningFormat;
23
+ class OpenResponsesReasoningType extends /*#__PURE__*/S.Literal("reasoning") {}
24
+ exports.OpenResponsesReasoningType = OpenResponsesReasoningType;
25
+ class ReasoningTextContentType extends /*#__PURE__*/S.Literal("reasoning_text") {}
26
+ exports.ReasoningTextContentType = ReasoningTextContentType;
27
+ class ReasoningTextContent extends /*#__PURE__*/S.Class("ReasoningTextContent")({
28
+ "type": ReasoningTextContentType,
29
+ "text": S.String
30
+ }) {}
31
+ exports.ReasoningTextContent = ReasoningTextContent;
32
+ class ReasoningSummaryTextType extends /*#__PURE__*/S.Literal("summary_text") {}
33
+ exports.ReasoningSummaryTextType = ReasoningSummaryTextType;
34
+ class ReasoningSummaryText extends /*#__PURE__*/S.Class("ReasoningSummaryText")({
35
+ "type": ReasoningSummaryTextType,
36
+ "text": S.String
37
+ }) {}
38
+ exports.ReasoningSummaryText = ReasoningSummaryText;
39
+ class OpenResponsesReasoningStatusEnum extends /*#__PURE__*/S.Literal("in_progress") {}
40
+ exports.OpenResponsesReasoningStatusEnum = OpenResponsesReasoningStatusEnum;
41
+ class OpenResponsesReasoning extends /*#__PURE__*/S.Class("OpenResponsesReasoning")({
42
+ "signature": /*#__PURE__*/S.optionalWith(S.String, {
31
43
  nullable: true
32
44
  }),
33
- "format": /*#__PURE__*/S.optionalWith(ReasoningDetailSummaryFormat, {
34
- nullable: true,
35
- default: () => "anthropic-claude-v1"
45
+ "format": /*#__PURE__*/S.optionalWith(OpenResponsesReasoningFormat, {
46
+ nullable: true
47
+ }),
48
+ "type": OpenResponsesReasoningType,
49
+ "id": S.String,
50
+ "content": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(ReasoningTextContent), {
51
+ nullable: true
52
+ }),
53
+ "summary": /*#__PURE__*/S.Array(ReasoningSummaryText),
54
+ "encrypted_content": /*#__PURE__*/S.optionalWith(S.String, {
55
+ nullable: true
36
56
  }),
37
- "index": /*#__PURE__*/S.optionalWith(S.Number, {
57
+ "status": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(OpenResponsesReasoningStatusEnum, OpenResponsesReasoningStatusEnum, OpenResponsesReasoningStatusEnum), {
38
58
  nullable: true
39
59
  })
40
60
  }) {}
61
+ exports.OpenResponsesReasoning = OpenResponsesReasoning;
62
+ class ReasoningDetailSummary extends /*#__PURE__*/S.Class("ReasoningDetailSummary")({
63
+ id: /*#__PURE__*/S.optionalWith(S.String, {
64
+ nullable: true
65
+ }),
66
+ type: /*#__PURE__*/S.Literal("reasoning.summary"),
67
+ index: /*#__PURE__*/S.optional(S.Number),
68
+ format: /*#__PURE__*/S.optionalWith(OpenResponsesReasoningFormat, {
69
+ nullable: true
70
+ }),
71
+ summary: S.String
72
+ }) {}
41
73
  exports.ReasoningDetailSummary = ReasoningDetailSummary;
42
- class ReasoningDetailEncryptedType extends /*#__PURE__*/S.Literal("reasoning.encrypted") {}
43
- exports.ReasoningDetailEncryptedType = ReasoningDetailEncryptedType;
44
- class ReasoningDetailEncryptedFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "anthropic-claude-v1") {}
45
- /**
46
- * Encrypted reasoning detail
47
- */
48
- exports.ReasoningDetailEncryptedFormat = ReasoningDetailEncryptedFormat;
49
74
  class ReasoningDetailEncrypted extends /*#__PURE__*/S.Class("ReasoningDetailEncrypted")({
50
- "type": ReasoningDetailEncryptedType,
51
- "data": S.String,
52
- "id": /*#__PURE__*/S.optionalWith(S.String, {
75
+ id: /*#__PURE__*/S.optionalWith(S.String, {
53
76
  nullable: true
54
77
  }),
55
- "format": /*#__PURE__*/S.optionalWith(ReasoningDetailEncryptedFormat, {
56
- nullable: true,
57
- default: () => "anthropic-claude-v1"
58
- }),
59
- "index": /*#__PURE__*/S.optionalWith(S.Number, {
78
+ type: /*#__PURE__*/S.Literal("reasoning.encrypted"),
79
+ index: /*#__PURE__*/S.optional(S.Number),
80
+ format: /*#__PURE__*/S.optionalWith(OpenResponsesReasoningFormat, {
60
81
  nullable: true
61
- })
82
+ }),
83
+ data: S.String
62
84
  }) {}
63
85
  exports.ReasoningDetailEncrypted = ReasoningDetailEncrypted;
64
- class ReasoningDetailTextType extends /*#__PURE__*/S.Literal("reasoning.text") {}
65
- exports.ReasoningDetailTextType = ReasoningDetailTextType;
66
- class ReasoningDetailTextFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "anthropic-claude-v1") {}
67
- /**
68
- * Text reasoning detail
69
- */
70
- exports.ReasoningDetailTextFormat = ReasoningDetailTextFormat;
71
86
  class ReasoningDetailText extends /*#__PURE__*/S.Class("ReasoningDetailText")({
72
- "type": ReasoningDetailTextType,
73
- "text": /*#__PURE__*/S.optionalWith(S.String, {
87
+ id: /*#__PURE__*/S.optionalWith(S.String, {
74
88
  nullable: true
75
89
  }),
76
- "signature": /*#__PURE__*/S.optionalWith(S.String, {
90
+ type: /*#__PURE__*/S.Literal("reasoning.text"),
91
+ index: /*#__PURE__*/S.optional(S.Number),
92
+ format: /*#__PURE__*/S.optionalWith(OpenResponsesReasoningFormat, {
77
93
  nullable: true
78
94
  }),
79
- "id": /*#__PURE__*/S.optionalWith(S.String, {
95
+ text: /*#__PURE__*/S.optionalWith(S.String, {
80
96
  nullable: true
81
97
  }),
82
- "format": /*#__PURE__*/S.optionalWith(ReasoningDetailTextFormat, {
83
- nullable: true,
84
- default: () => "anthropic-claude-v1"
85
- }),
86
- "index": /*#__PURE__*/S.optionalWith(S.Number, {
98
+ signature: /*#__PURE__*/S.optionalWith(S.String, {
87
99
  nullable: true
88
100
  })
89
101
  }) {}
90
- /**
91
- * Reasoning detail information
92
- */
93
102
  exports.ReasoningDetailText = ReasoningDetailText;
94
103
  class ReasoningDetail extends /*#__PURE__*/S.Union(ReasoningDetailSummary, ReasoningDetailEncrypted, ReasoningDetailText) {}
95
104
  exports.ReasoningDetail = ReasoningDetail;
96
- class FileAnnotationDetailType extends /*#__PURE__*/S.Literal("file") {}
97
- /**
98
- * File annotation with content
99
- */
100
- exports.FileAnnotationDetailType = FileAnnotationDetailType;
101
105
  class FileAnnotationDetail extends /*#__PURE__*/S.Class("FileAnnotationDetail")({
102
- "type": FileAnnotationDetailType,
106
+ "type": /*#__PURE__*/S.Literal("file"),
103
107
  "file": /*#__PURE__*/S.Struct({
104
108
  "hash": S.String,
105
109
  "name": /*#__PURE__*/S.optionalWith(S.String, {
@@ -117,13 +121,8 @@ class FileAnnotationDetail extends /*#__PURE__*/S.Class("FileAnnotationDetail")(
117
121
  })
118
122
  }) {}
119
123
  exports.FileAnnotationDetail = FileAnnotationDetail;
120
- class URLCitationAnnotationDetailType extends /*#__PURE__*/S.Literal("url_citation") {}
121
- /**
122
- * URL citation annotation
123
- */
124
- exports.URLCitationAnnotationDetailType = URLCitationAnnotationDetailType;
125
124
  class URLCitationAnnotationDetail extends /*#__PURE__*/S.Class("URLCitationAnnotationDetail")({
126
- "type": URLCitationAnnotationDetailType,
125
+ "type": /*#__PURE__*/S.Literal("url_citation"),
127
126
  "url_citation": /*#__PURE__*/S.Struct({
128
127
  "end_index": S.Number,
129
128
  "start_index": S.Number,
@@ -134,53 +133,9 @@ class URLCitationAnnotationDetail extends /*#__PURE__*/S.Class("URLCitationAnnot
134
133
  })
135
134
  })
136
135
  }) {}
137
- /**
138
- * Annotation information
139
- */
140
136
  exports.URLCitationAnnotationDetail = URLCitationAnnotationDetail;
141
137
  class AnnotationDetail extends /*#__PURE__*/S.Union(FileAnnotationDetail, URLCitationAnnotationDetail) {}
142
138
  exports.AnnotationDetail = AnnotationDetail;
143
- class OpenResponsesReasoningFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "xai-responses-v1", "anthropic-claude-v1", "google-gemini-v1") {}
144
- exports.OpenResponsesReasoningFormat = OpenResponsesReasoningFormat;
145
- class OpenResponsesReasoningType extends /*#__PURE__*/S.Literal("reasoning") {}
146
- exports.OpenResponsesReasoningType = OpenResponsesReasoningType;
147
- class ReasoningTextContentType extends /*#__PURE__*/S.Literal("reasoning_text") {}
148
- exports.ReasoningTextContentType = ReasoningTextContentType;
149
- class ReasoningTextContent extends /*#__PURE__*/S.Class("ReasoningTextContent")({
150
- "type": ReasoningTextContentType,
151
- "text": S.String
152
- }) {}
153
- exports.ReasoningTextContent = ReasoningTextContent;
154
- class ReasoningSummaryTextType extends /*#__PURE__*/S.Literal("summary_text") {}
155
- exports.ReasoningSummaryTextType = ReasoningSummaryTextType;
156
- class ReasoningSummaryText extends /*#__PURE__*/S.Class("ReasoningSummaryText")({
157
- "type": ReasoningSummaryTextType,
158
- "text": S.String
159
- }) {}
160
- exports.ReasoningSummaryText = ReasoningSummaryText;
161
- class OpenResponsesReasoningStatusEnum extends /*#__PURE__*/S.Literal("in_progress") {}
162
- exports.OpenResponsesReasoningStatusEnum = OpenResponsesReasoningStatusEnum;
163
- class OpenResponsesReasoning extends /*#__PURE__*/S.Class("OpenResponsesReasoning")({
164
- "signature": /*#__PURE__*/S.optionalWith(S.String, {
165
- nullable: true
166
- }),
167
- "format": /*#__PURE__*/S.optionalWith(OpenResponsesReasoningFormat, {
168
- nullable: true
169
- }),
170
- "type": OpenResponsesReasoningType,
171
- "id": S.String,
172
- "content": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(ReasoningTextContent), {
173
- nullable: true
174
- }),
175
- "summary": /*#__PURE__*/S.Array(ReasoningSummaryText),
176
- "encrypted_content": /*#__PURE__*/S.optionalWith(S.String, {
177
- nullable: true
178
- }),
179
- "status": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(OpenResponsesReasoningStatusEnum, OpenResponsesReasoningStatusEnum, OpenResponsesReasoningStatusEnum), {
180
- nullable: true
181
- })
182
- }) {}
183
- exports.OpenResponsesReasoning = OpenResponsesReasoning;
184
139
  class OpenResponsesEasyInputMessageType extends /*#__PURE__*/S.Literal("message") {}
185
140
  exports.OpenResponsesEasyInputMessageType = OpenResponsesEasyInputMessageType;
186
141
  class OpenResponsesEasyInputMessageRoleEnum extends /*#__PURE__*/S.Literal("developer") {}
@@ -195,21 +150,6 @@ class ResponseInputText extends /*#__PURE__*/S.Class("ResponseInputText")({
195
150
  "text": S.String
196
151
  }) {}
197
152
  exports.ResponseInputText = ResponseInputText;
198
- class ResponseInputImageType extends /*#__PURE__*/S.Literal("input_image") {}
199
- exports.ResponseInputImageType = ResponseInputImageType;
200
- class ResponseInputImageDetail extends /*#__PURE__*/S.Literal("auto", "high", "low") {}
201
- /**
202
- * Image input content item
203
- */
204
- exports.ResponseInputImageDetail = ResponseInputImageDetail;
205
- class ResponseInputImage extends /*#__PURE__*/S.Class("ResponseInputImage")({
206
- "type": ResponseInputImageType,
207
- "detail": ResponseInputImageDetail,
208
- "image_url": /*#__PURE__*/S.optionalWith(S.String, {
209
- nullable: true
210
- })
211
- }) {}
212
- exports.ResponseInputImage = ResponseInputImage;
213
153
  class ResponseInputFileType extends /*#__PURE__*/S.Literal("input_file") {}
214
154
  /**
215
155
  * File input content item
@@ -246,12 +186,35 @@ class ResponseInputAudio extends /*#__PURE__*/S.Class("ResponseInputAudio")({
246
186
  })
247
187
  }) {}
248
188
  exports.ResponseInputAudio = ResponseInputAudio;
189
+ class ResponseInputVideoType extends /*#__PURE__*/S.Literal("input_video") {}
190
+ /**
191
+ * Video input content item
192
+ */
193
+ exports.ResponseInputVideoType = ResponseInputVideoType;
194
+ class ResponseInputVideo extends /*#__PURE__*/S.Class("ResponseInputVideo")({
195
+ "type": ResponseInputVideoType,
196
+ /**
197
+ * A base64 data URL or remote URL that resolves to a video file
198
+ */
199
+ "video_url": S.String
200
+ }) {}
201
+ exports.ResponseInputVideo = ResponseInputVideo;
249
202
  class OpenResponsesEasyInputMessage extends /*#__PURE__*/S.Class("OpenResponsesEasyInputMessage")({
250
203
  "type": /*#__PURE__*/S.optionalWith(OpenResponsesEasyInputMessageType, {
251
204
  nullable: true
252
205
  }),
253
206
  "role": /*#__PURE__*/S.Union(OpenResponsesEasyInputMessageRoleEnum, OpenResponsesEasyInputMessageRoleEnum, OpenResponsesEasyInputMessageRoleEnum, OpenResponsesEasyInputMessageRoleEnum),
254
- "content": /*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ResponseInputText, ResponseInputImage, ResponseInputFile, ResponseInputAudio)), S.String)
207
+ "content": /*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ResponseInputText, /*#__PURE__*/
208
+ /**
209
+ * Image input content item
210
+ */
211
+ S.Struct({
212
+ "type": /*#__PURE__*/S.Literal("input_image"),
213
+ "detail": /*#__PURE__*/S.Literal("auto", "high", "low"),
214
+ "image_url": /*#__PURE__*/S.optionalWith(S.String, {
215
+ nullable: true
216
+ })
217
+ }), ResponseInputFile, ResponseInputAudio, ResponseInputVideo)), S.String)
255
218
  }) {}
256
219
  exports.OpenResponsesEasyInputMessage = OpenResponsesEasyInputMessage;
257
220
  class OpenResponsesInputMessageItemType extends /*#__PURE__*/S.Literal("message") {}
@@ -266,7 +229,17 @@ class OpenResponsesInputMessageItem extends /*#__PURE__*/S.Class("OpenResponsesI
266
229
  nullable: true
267
230
  }),
268
231
  "role": /*#__PURE__*/S.Union(OpenResponsesInputMessageItemRoleEnum, OpenResponsesInputMessageItemRoleEnum, OpenResponsesInputMessageItemRoleEnum),
269
- "content": /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ResponseInputText, ResponseInputImage, ResponseInputFile, ResponseInputAudio))
232
+ "content": /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ResponseInputText, /*#__PURE__*/
233
+ /**
234
+ * Image input content item
235
+ */
236
+ S.Struct({
237
+ "type": /*#__PURE__*/S.Literal("input_image"),
238
+ "detail": /*#__PURE__*/S.Literal("auto", "high", "low"),
239
+ "image_url": /*#__PURE__*/S.optionalWith(S.String, {
240
+ nullable: true
241
+ })
242
+ }), ResponseInputFile, ResponseInputAudio, ResponseInputVideo))
270
243
  }) {}
271
244
  exports.OpenResponsesInputMessageItem = OpenResponsesInputMessageItem;
272
245
  class OpenResponsesFunctionToolCallType extends /*#__PURE__*/S.Literal("function_call") {}
@@ -346,6 +319,18 @@ class ResponseOutputText extends /*#__PURE__*/S.Class("ResponseOutputText")({
346
319
  "text": S.String,
347
320
  "annotations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(OpenAIResponsesAnnotation), {
348
321
  nullable: true
322
+ }),
323
+ "logprobs": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
324
+ "token": S.String,
325
+ "bytes": /*#__PURE__*/S.Array(S.Number),
326
+ "logprob": S.Number,
327
+ "top_logprobs": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
328
+ "token": S.String,
329
+ "bytes": /*#__PURE__*/S.Array(S.Number),
330
+ "logprob": S.Number
331
+ }))
332
+ })), {
333
+ nullable: true
349
334
  })
350
335
  }) {}
351
336
  exports.ResponseOutputText = ResponseOutputText;
@@ -365,12 +350,29 @@ class ResponsesOutputMessage extends /*#__PURE__*/S.Class("ResponsesOutputMessag
365
350
  }),
366
351
  "content": /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ResponseOutputText, OpenAIResponsesRefusalContent))
367
352
  }) {}
353
+ /**
354
+ * The format of the reasoning content
355
+ */
368
356
  exports.ResponsesOutputMessage = ResponsesOutputMessage;
357
+ class ResponsesOutputItemReasoningFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "azure-openai-responses-v1", "xai-responses-v1", "anthropic-claude-v1", "google-gemini-v1") {}
358
+ exports.ResponsesOutputItemReasoningFormat = ResponsesOutputItemReasoningFormat;
369
359
  class ResponsesOutputItemReasoningType extends /*#__PURE__*/S.Literal("reasoning") {}
370
360
  exports.ResponsesOutputItemReasoningType = ResponsesOutputItemReasoningType;
371
361
  class ResponsesOutputItemReasoningStatusEnum extends /*#__PURE__*/S.Literal("in_progress") {}
372
362
  exports.ResponsesOutputItemReasoningStatusEnum = ResponsesOutputItemReasoningStatusEnum;
373
363
  class ResponsesOutputItemReasoning extends /*#__PURE__*/S.Class("ResponsesOutputItemReasoning")({
364
+ /**
365
+ * A signature for the reasoning content, used for verification
366
+ */
367
+ "signature": /*#__PURE__*/S.optionalWith(S.String, {
368
+ nullable: true
369
+ }),
370
+ /**
371
+ * The format of the reasoning content
372
+ */
373
+ "format": /*#__PURE__*/S.optionalWith(ResponsesOutputItemReasoningFormat, {
374
+ nullable: true
375
+ }),
374
376
  "type": ResponsesOutputItemReasoningType,
375
377
  "id": S.String,
376
378
  "content": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(ReasoningTextContent), {
@@ -656,6 +658,8 @@ class OpenResponsesReasoningConfig extends /*#__PURE__*/S.Class("OpenResponsesRe
656
658
  })
657
659
  }) {}
658
660
  exports.OpenResponsesReasoningConfig = OpenResponsesReasoningConfig;
661
+ class ResponsesOutputModality extends /*#__PURE__*/S.Literal("text", "image") {}
662
+ exports.ResponsesOutputModality = ResponsesOutputModality;
659
663
  class OpenAIResponsesPrompt extends /*#__PURE__*/S.Class("OpenAIResponsesPrompt")({
660
664
  "id": S.String,
661
665
  "variables": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Record({
@@ -682,7 +686,7 @@ class OpenResponsesRequestTruncation extends OpenResponsesRequestTruncationEnum
682
686
  exports.OpenResponsesRequestTruncation = OpenResponsesRequestTruncation;
683
687
  class DataCollection extends /*#__PURE__*/S.Literal("deny", "allow") {}
684
688
  exports.DataCollection = DataCollection;
685
- class ProviderName extends /*#__PURE__*/S.Literal("AI21", "AionLabs", "Alibaba", "Amazon Bedrock", "Amazon Nova", "Anthropic", "Arcee AI", "AtlasCloud", "Avian", "Azure", "BaseTen", "BytePlus", "Black Forest Labs", "Cerebras", "Chutes", "Cirrascale", "Clarifai", "Cloudflare", "Cohere", "Crusoe", "DeepInfra", "DeepSeek", "Featherless", "Fireworks", "Friendli", "GMICloud", "GoPomelo", "Google", "Google AI Studio", "Groq", "Hyperbolic", "Inception", "InferenceNet", "Infermatic", "Inflection", "Liquid", "Mara", "Mancer 2", "Minimax", "ModelRun", "Mistral", "Modular", "Moonshot AI", "Morph", "NCompass", "Nebius", "NextBit", "Novita", "Nvidia", "OpenAI", "OpenInference", "Parasail", "Perplexity", "Phala", "Relace", "SambaNova", "SiliconFlow", "Sourceful", "Stealth", "StreamLake", "Switchpoint", "Targon", "Together", "Venice", "WandB", "Xiaomi", "xAI", "Z.AI", "FakeProvider") {}
689
+ class ProviderName extends /*#__PURE__*/S.Literal("AI21", "AionLabs", "Alibaba", "Amazon Bedrock", "Amazon Nova", "Anthropic", "Arcee AI", "AtlasCloud", "Avian", "Azure", "BaseTen", "BytePlus", "Black Forest Labs", "Cerebras", "Chutes", "Cirrascale", "Clarifai", "Cloudflare", "Cohere", "Crusoe", "DeepInfra", "DeepSeek", "Featherless", "Fireworks", "Friendli", "GMICloud", "Google", "Google AI Studio", "Groq", "Hyperbolic", "Inception", "Inceptron", "InferenceNet", "Infermatic", "Inflection", "Liquid", "Mara", "Mancer 2", "Minimax", "ModelRun", "Mistral", "Modular", "Moonshot AI", "Morph", "NCompass", "Nebius", "NextBit", "Novita", "Nvidia", "OpenAI", "OpenInference", "Parasail", "Perplexity", "Phala", "Relace", "SambaNova", "Seed", "SiliconFlow", "Sourceful", "Stealth", "StreamLake", "Switchpoint", "Together", "Upstage", "Venice", "WandB", "Xiaomi", "xAI", "Z.AI", "FakeProvider") {}
686
690
  exports.ProviderName = ProviderName;
687
691
  class Quantization extends /*#__PURE__*/S.Literal("int4", "int8", "fp4", "fp6", "fp8", "fp16", "bf16", "fp32", "unknown") {}
688
692
  exports.Quantization = Quantization;
@@ -704,9 +708,79 @@ class ProviderSortConfig extends /*#__PURE__*/S.Class("ProviderSortConfig")({
704
708
  exports.ProviderSortConfig = ProviderSortConfig;
705
709
  class BigNumberUnion extends S.String {}
706
710
  /**
707
- * The search engine to use for web search.
711
+ * Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
708
712
  */
709
713
  exports.BigNumberUnion = BigNumberUnion;
714
+ class PercentileThroughputCutoffs extends /*#__PURE__*/S.Class("PercentileThroughputCutoffs")({
715
+ /**
716
+ * Minimum p50 throughput (tokens/sec)
717
+ */
718
+ "p50": /*#__PURE__*/S.optionalWith(S.Number, {
719
+ nullable: true
720
+ }),
721
+ /**
722
+ * Minimum p75 throughput (tokens/sec)
723
+ */
724
+ "p75": /*#__PURE__*/S.optionalWith(S.Number, {
725
+ nullable: true
726
+ }),
727
+ /**
728
+ * Minimum p90 throughput (tokens/sec)
729
+ */
730
+ "p90": /*#__PURE__*/S.optionalWith(S.Number, {
731
+ nullable: true
732
+ }),
733
+ /**
734
+ * Minimum p99 throughput (tokens/sec)
735
+ */
736
+ "p99": /*#__PURE__*/S.optionalWith(S.Number, {
737
+ nullable: true
738
+ })
739
+ }) {}
740
+ /**
741
+ * Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
742
+ */
743
+ exports.PercentileThroughputCutoffs = PercentileThroughputCutoffs;
744
+ class PreferredMinThroughput extends /*#__PURE__*/S.Union(S.Number, PercentileThroughputCutoffs) {}
745
+ /**
746
+ * Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
747
+ */
748
+ exports.PreferredMinThroughput = PreferredMinThroughput;
749
+ class PercentileLatencyCutoffs extends /*#__PURE__*/S.Class("PercentileLatencyCutoffs")({
750
+ /**
751
+ * Maximum p50 latency (seconds)
752
+ */
753
+ "p50": /*#__PURE__*/S.optionalWith(S.Number, {
754
+ nullable: true
755
+ }),
756
+ /**
757
+ * Maximum p75 latency (seconds)
758
+ */
759
+ "p75": /*#__PURE__*/S.optionalWith(S.Number, {
760
+ nullable: true
761
+ }),
762
+ /**
763
+ * Maximum p90 latency (seconds)
764
+ */
765
+ "p90": /*#__PURE__*/S.optionalWith(S.Number, {
766
+ nullable: true
767
+ }),
768
+ /**
769
+ * Maximum p99 latency (seconds)
770
+ */
771
+ "p99": /*#__PURE__*/S.optionalWith(S.Number, {
772
+ nullable: true
773
+ })
774
+ }) {}
775
+ /**
776
+ * Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
777
+ */
778
+ exports.PercentileLatencyCutoffs = PercentileLatencyCutoffs;
779
+ class PreferredMaxLatency extends /*#__PURE__*/S.Union(S.Number, PercentileLatencyCutoffs) {}
780
+ /**
781
+ * The search engine to use for web search.
782
+ */
783
+ exports.PreferredMaxLatency = PreferredMaxLatency;
710
784
  class WebSearchEngine extends /*#__PURE__*/S.Literal("native", "exa") {}
711
785
  /**
712
786
  * The engine to use for parsing PDF files.
@@ -775,9 +849,36 @@ class OpenResponsesRequest extends /*#__PURE__*/S.Class("OpenResponsesRequest")(
775
849
  "top_p": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), {
776
850
  nullable: true
777
851
  }),
852
+ "top_logprobs": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(20)), {
853
+ nullable: true
854
+ }),
855
+ "max_tool_calls": /*#__PURE__*/S.optionalWith(S.Int, {
856
+ nullable: true
857
+ }),
858
+ "presence_penalty": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(-2), /*#__PURE__*/S.lessThanOrEqualTo(2)), {
859
+ nullable: true
860
+ }),
861
+ "frequency_penalty": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(-2), /*#__PURE__*/S.lessThanOrEqualTo(2)), {
862
+ nullable: true
863
+ }),
778
864
  "top_k": /*#__PURE__*/S.optionalWith(S.Number, {
779
865
  nullable: true
780
866
  }),
867
+ /**
868
+ * Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
869
+ */
870
+ "image_config": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Record({
871
+ key: S.String,
872
+ value: S.Unknown
873
+ }), {
874
+ nullable: true
875
+ }),
876
+ /**
877
+ * Output modalities for the response. Supported values are "text" and "image".
878
+ */
879
+ "modalities": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(ResponsesOutputModality), {
880
+ nullable: true
881
+ }),
781
882
  "prompt_cache_key": /*#__PURE__*/S.optionalWith(S.String, {
782
883
  nullable: true
783
884
  }),
@@ -896,28 +997,10 @@ class OpenResponsesRequest extends /*#__PURE__*/S.Class("OpenResponsesRequest")(
896
997
  }), {
897
998
  nullable: true
898
999
  }),
899
- /**
900
- * Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
901
- */
902
- "preferred_min_throughput": /*#__PURE__*/S.optionalWith(S.Number, {
903
- nullable: true
904
- }),
905
- /**
906
- * Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
907
- */
908
- "preferred_max_latency": /*#__PURE__*/S.optionalWith(S.Number, {
909
- nullable: true
910
- }),
911
- /**
912
- * **DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput.
913
- */
914
- "min_throughput": /*#__PURE__*/S.optionalWith(S.Number, {
1000
+ "preferred_min_throughput": /*#__PURE__*/S.optionalWith(PreferredMinThroughput, {
915
1001
  nullable: true
916
1002
  }),
917
- /**
918
- * **DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency.
919
- */
920
- "max_latency": /*#__PURE__*/S.optionalWith(S.Number, {
1003
+ "preferred_max_latency": /*#__PURE__*/S.optionalWith(PreferredMaxLatency, {
921
1004
  nullable: true
922
1005
  })
923
1006
  }), {
@@ -927,6 +1010,20 @@ class OpenResponsesRequest extends /*#__PURE__*/S.Class("OpenResponsesRequest")(
927
1010
  * Plugins you want to enable for this request, including their settings.
928
1011
  */
929
1012
  "plugins": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1013
+ "id": /*#__PURE__*/S.Literal("auto-router"),
1014
+ /**
1015
+ * Set to false to disable the auto-router plugin for this request. Defaults to true.
1016
+ */
1017
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
1018
+ nullable: true
1019
+ }),
1020
+ /**
1021
+ * List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list.
1022
+ */
1023
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
1024
+ nullable: true
1025
+ })
1026
+ }), /*#__PURE__*/S.Struct({
930
1027
  "id": /*#__PURE__*/S.Literal("moderation")
931
1028
  }), /*#__PURE__*/S.Struct({
932
1029
  "id": /*#__PURE__*/S.Literal("web"),
@@ -1101,6 +1198,21 @@ class OpenAIResponsesIncompleteDetails extends /*#__PURE__*/S.Class("OpenAIRespo
1101
1198
  })
1102
1199
  }) {}
1103
1200
  exports.OpenAIResponsesIncompleteDetails = OpenAIResponsesIncompleteDetails;
1201
+ class ResponseInputImageType extends /*#__PURE__*/S.Literal("input_image") {}
1202
+ exports.ResponseInputImageType = ResponseInputImageType;
1203
+ class ResponseInputImageDetail extends /*#__PURE__*/S.Literal("auto", "high", "low") {}
1204
+ /**
1205
+ * Image input content item
1206
+ */
1207
+ exports.ResponseInputImageDetail = ResponseInputImageDetail;
1208
+ class ResponseInputImage extends /*#__PURE__*/S.Class("ResponseInputImage")({
1209
+ "type": ResponseInputImageType,
1210
+ "detail": ResponseInputImageDetail,
1211
+ "image_url": /*#__PURE__*/S.optionalWith(S.String, {
1212
+ nullable: true
1213
+ })
1214
+ }) {}
1215
+ exports.ResponseInputImage = ResponseInputImage;
1104
1216
  class OpenAIResponsesInput extends /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1105
1217
  "type": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("message"), {
1106
1218
  nullable: true
@@ -1173,9 +1285,8 @@ class OpenResponsesNonStreamingResponse extends /*#__PURE__*/S.Class("OpenRespon
1173
1285
  "object": OpenResponsesNonStreamingResponseObject,
1174
1286
  "created_at": S.Number,
1175
1287
  "model": S.String,
1176
- "status": /*#__PURE__*/S.optionalWith(OpenAIResponsesResponseStatus, {
1177
- nullable: true
1178
- }),
1288
+ "status": OpenAIResponsesResponseStatus,
1289
+ "completed_at": /*#__PURE__*/S.NullOr(S.Number),
1179
1290
  "user": /*#__PURE__*/S.optionalWith(S.String, {
1180
1291
  nullable: true
1181
1292
  }),
@@ -1201,6 +1312,8 @@ class OpenResponsesNonStreamingResponse extends /*#__PURE__*/S.Class("OpenRespon
1201
1312
  }),
1202
1313
  "temperature": /*#__PURE__*/S.NullOr(S.Number),
1203
1314
  "top_p": /*#__PURE__*/S.NullOr(S.Number),
1315
+ "presence_penalty": /*#__PURE__*/S.NullOr(S.Number),
1316
+ "frequency_penalty": /*#__PURE__*/S.NullOr(S.Number),
1204
1317
  "instructions": OpenAIResponsesInput,
1205
1318
  "metadata": /*#__PURE__*/S.NullOr(OpenResponsesRequestMetadata),
1206
1319
  "tools": /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/
@@ -1548,388 +1661,1659 @@ class ProviderOverloadedResponse extends /*#__PURE__*/S.Class("ProviderOverloade
1548
1661
  })
1549
1662
  }) {}
1550
1663
  exports.ProviderOverloadedResponse = ProviderOverloadedResponse;
1664
+ class OpenRouterAnthropicMessageParamRole extends /*#__PURE__*/S.Literal("user", "assistant") {}
1665
+ /**
1666
+ * Anthropic message with OpenRouter extensions
1667
+ */
1668
+ exports.OpenRouterAnthropicMessageParamRole = OpenRouterAnthropicMessageParamRole;
1669
+ class OpenRouterAnthropicMessageParam extends /*#__PURE__*/S.Class("OpenRouterAnthropicMessageParam")({
1670
+ "role": OpenRouterAnthropicMessageParamRole,
1671
+ "content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1672
+ "type": /*#__PURE__*/S.Literal("text"),
1673
+ "text": S.String,
1674
+ "citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1675
+ "type": /*#__PURE__*/S.Literal("char_location"),
1676
+ "cited_text": S.String,
1677
+ "document_index": S.Number,
1678
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1679
+ "start_char_index": S.Number,
1680
+ "end_char_index": S.Number
1681
+ }), /*#__PURE__*/S.Struct({
1682
+ "type": /*#__PURE__*/S.Literal("page_location"),
1683
+ "cited_text": S.String,
1684
+ "document_index": S.Number,
1685
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1686
+ "start_page_number": S.Number,
1687
+ "end_page_number": S.Number
1688
+ }), /*#__PURE__*/S.Struct({
1689
+ "type": /*#__PURE__*/S.Literal("content_block_location"),
1690
+ "cited_text": S.String,
1691
+ "document_index": S.Number,
1692
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1693
+ "start_block_index": S.Number,
1694
+ "end_block_index": S.Number
1695
+ }), /*#__PURE__*/S.Struct({
1696
+ "type": /*#__PURE__*/S.Literal("web_search_result_location"),
1697
+ "cited_text": S.String,
1698
+ "encrypted_index": S.String,
1699
+ "title": /*#__PURE__*/S.NullOr(S.String),
1700
+ "url": S.String
1701
+ }), /*#__PURE__*/S.Struct({
1702
+ "type": /*#__PURE__*/S.Literal("search_result_location"),
1703
+ "cited_text": S.String,
1704
+ "search_result_index": S.Number,
1705
+ "source": S.String,
1706
+ "title": /*#__PURE__*/S.NullOr(S.String),
1707
+ "start_block_index": S.Number,
1708
+ "end_block_index": S.Number
1709
+ }))), {
1710
+ nullable: true
1711
+ }),
1712
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1713
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1714
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1715
+ nullable: true
1716
+ })
1717
+ }), {
1718
+ nullable: true
1719
+ })
1720
+ }), /*#__PURE__*/S.Struct({
1721
+ "type": /*#__PURE__*/S.Literal("image"),
1722
+ "source": /*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1723
+ "type": /*#__PURE__*/S.Literal("base64"),
1724
+ "media_type": /*#__PURE__*/S.Literal("image/jpeg", "image/png", "image/gif", "image/webp"),
1725
+ "data": S.String
1726
+ }), /*#__PURE__*/S.Struct({
1727
+ "type": /*#__PURE__*/S.Literal("url"),
1728
+ "url": S.String
1729
+ })),
1730
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1731
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1732
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1733
+ nullable: true
1734
+ })
1735
+ }), {
1736
+ nullable: true
1737
+ })
1738
+ }), /*#__PURE__*/S.Struct({
1739
+ "type": /*#__PURE__*/S.Literal("document"),
1740
+ "source": /*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1741
+ "type": /*#__PURE__*/S.Literal("base64"),
1742
+ "media_type": /*#__PURE__*/S.Literal("application/pdf"),
1743
+ "data": S.String
1744
+ }), /*#__PURE__*/S.Struct({
1745
+ "type": /*#__PURE__*/S.Literal("text"),
1746
+ "media_type": /*#__PURE__*/S.Literal("text/plain"),
1747
+ "data": S.String
1748
+ }), /*#__PURE__*/S.Struct({
1749
+ "type": /*#__PURE__*/S.Literal("content"),
1750
+ "content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1751
+ "type": /*#__PURE__*/S.Literal("text"),
1752
+ "text": S.String,
1753
+ "citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1754
+ "type": /*#__PURE__*/S.Literal("char_location"),
1755
+ "cited_text": S.String,
1756
+ "document_index": S.Number,
1757
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1758
+ "start_char_index": S.Number,
1759
+ "end_char_index": S.Number
1760
+ }), /*#__PURE__*/S.Struct({
1761
+ "type": /*#__PURE__*/S.Literal("page_location"),
1762
+ "cited_text": S.String,
1763
+ "document_index": S.Number,
1764
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1765
+ "start_page_number": S.Number,
1766
+ "end_page_number": S.Number
1767
+ }), /*#__PURE__*/S.Struct({
1768
+ "type": /*#__PURE__*/S.Literal("content_block_location"),
1769
+ "cited_text": S.String,
1770
+ "document_index": S.Number,
1771
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1772
+ "start_block_index": S.Number,
1773
+ "end_block_index": S.Number
1774
+ }), /*#__PURE__*/S.Struct({
1775
+ "type": /*#__PURE__*/S.Literal("web_search_result_location"),
1776
+ "cited_text": S.String,
1777
+ "encrypted_index": S.String,
1778
+ "title": /*#__PURE__*/S.NullOr(S.String),
1779
+ "url": S.String
1780
+ }), /*#__PURE__*/S.Struct({
1781
+ "type": /*#__PURE__*/S.Literal("search_result_location"),
1782
+ "cited_text": S.String,
1783
+ "search_result_index": S.Number,
1784
+ "source": S.String,
1785
+ "title": /*#__PURE__*/S.NullOr(S.String),
1786
+ "start_block_index": S.Number,
1787
+ "end_block_index": S.Number
1788
+ }))), {
1789
+ nullable: true
1790
+ }),
1791
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1792
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1793
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1794
+ nullable: true
1795
+ })
1796
+ }), {
1797
+ nullable: true
1798
+ })
1799
+ }), /*#__PURE__*/S.Struct({
1800
+ "type": /*#__PURE__*/S.Literal("image"),
1801
+ "source": /*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1802
+ "type": /*#__PURE__*/S.Literal("base64"),
1803
+ "media_type": /*#__PURE__*/S.Literal("image/jpeg", "image/png", "image/gif", "image/webp"),
1804
+ "data": S.String
1805
+ }), /*#__PURE__*/S.Struct({
1806
+ "type": /*#__PURE__*/S.Literal("url"),
1807
+ "url": S.String
1808
+ })),
1809
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1810
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1811
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1812
+ nullable: true
1813
+ })
1814
+ }), {
1815
+ nullable: true
1816
+ })
1817
+ }))))
1818
+ }), /*#__PURE__*/S.Struct({
1819
+ "type": /*#__PURE__*/S.Literal("url"),
1820
+ "url": S.String
1821
+ })),
1822
+ "citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1823
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
1824
+ nullable: true
1825
+ })
1826
+ }), {
1827
+ nullable: true
1828
+ }),
1829
+ "context": /*#__PURE__*/S.optionalWith(S.String, {
1830
+ nullable: true
1831
+ }),
1832
+ "title": /*#__PURE__*/S.optionalWith(S.String, {
1833
+ nullable: true
1834
+ }),
1835
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1836
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1837
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1838
+ nullable: true
1839
+ })
1840
+ }), {
1841
+ nullable: true
1842
+ })
1843
+ }), /*#__PURE__*/S.Struct({
1844
+ "type": /*#__PURE__*/S.Literal("tool_use"),
1845
+ "id": S.String,
1846
+ "name": S.String,
1847
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1848
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1849
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1850
+ nullable: true
1851
+ })
1852
+ }), {
1853
+ nullable: true
1854
+ })
1855
+ }), /*#__PURE__*/S.Struct({
1856
+ "type": /*#__PURE__*/S.Literal("tool_result"),
1857
+ "tool_use_id": S.String,
1858
+ "content": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1859
+ "type": /*#__PURE__*/S.Literal("text"),
1860
+ "text": S.String,
1861
+ "citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1862
+ "type": /*#__PURE__*/S.Literal("char_location"),
1863
+ "cited_text": S.String,
1864
+ "document_index": S.Number,
1865
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1866
+ "start_char_index": S.Number,
1867
+ "end_char_index": S.Number
1868
+ }), /*#__PURE__*/S.Struct({
1869
+ "type": /*#__PURE__*/S.Literal("page_location"),
1870
+ "cited_text": S.String,
1871
+ "document_index": S.Number,
1872
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1873
+ "start_page_number": S.Number,
1874
+ "end_page_number": S.Number
1875
+ }), /*#__PURE__*/S.Struct({
1876
+ "type": /*#__PURE__*/S.Literal("content_block_location"),
1877
+ "cited_text": S.String,
1878
+ "document_index": S.Number,
1879
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1880
+ "start_block_index": S.Number,
1881
+ "end_block_index": S.Number
1882
+ }), /*#__PURE__*/S.Struct({
1883
+ "type": /*#__PURE__*/S.Literal("web_search_result_location"),
1884
+ "cited_text": S.String,
1885
+ "encrypted_index": S.String,
1886
+ "title": /*#__PURE__*/S.NullOr(S.String),
1887
+ "url": S.String
1888
+ }), /*#__PURE__*/S.Struct({
1889
+ "type": /*#__PURE__*/S.Literal("search_result_location"),
1890
+ "cited_text": S.String,
1891
+ "search_result_index": S.Number,
1892
+ "source": S.String,
1893
+ "title": /*#__PURE__*/S.NullOr(S.String),
1894
+ "start_block_index": S.Number,
1895
+ "end_block_index": S.Number
1896
+ }))), {
1897
+ nullable: true
1898
+ }),
1899
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1900
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1901
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1902
+ nullable: true
1903
+ })
1904
+ }), {
1905
+ nullable: true
1906
+ })
1907
+ }), /*#__PURE__*/S.Struct({
1908
+ "type": /*#__PURE__*/S.Literal("image"),
1909
+ "source": /*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1910
+ "type": /*#__PURE__*/S.Literal("base64"),
1911
+ "media_type": /*#__PURE__*/S.Literal("image/jpeg", "image/png", "image/gif", "image/webp"),
1912
+ "data": S.String
1913
+ }), /*#__PURE__*/S.Struct({
1914
+ "type": /*#__PURE__*/S.Literal("url"),
1915
+ "url": S.String
1916
+ })),
1917
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1918
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1919
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1920
+ nullable: true
1921
+ })
1922
+ }), {
1923
+ nullable: true
1924
+ })
1925
+ })))), {
1926
+ nullable: true
1927
+ }),
1928
+ "is_error": /*#__PURE__*/S.optionalWith(S.Boolean, {
1929
+ nullable: true
1930
+ }),
1931
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1932
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1933
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1934
+ nullable: true
1935
+ })
1936
+ }), {
1937
+ nullable: true
1938
+ })
1939
+ }), /*#__PURE__*/S.Struct({
1940
+ "type": /*#__PURE__*/S.Literal("thinking"),
1941
+ "thinking": S.String,
1942
+ "signature": S.String
1943
+ }), /*#__PURE__*/S.Struct({
1944
+ "type": /*#__PURE__*/S.Literal("redacted_thinking"),
1945
+ "data": S.String
1946
+ }), /*#__PURE__*/S.Struct({
1947
+ "type": /*#__PURE__*/S.Literal("server_tool_use"),
1948
+ "id": S.String,
1949
+ "name": /*#__PURE__*/S.Literal("web_search"),
1950
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1951
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1952
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1953
+ nullable: true
1954
+ })
1955
+ }), {
1956
+ nullable: true
1957
+ })
1958
+ }), /*#__PURE__*/S.Struct({
1959
+ "type": /*#__PURE__*/S.Literal("web_search_tool_result"),
1960
+ "tool_use_id": S.String,
1961
+ "content": /*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
1962
+ "type": /*#__PURE__*/S.Literal("web_search_result"),
1963
+ "encrypted_content": S.String,
1964
+ "title": S.String,
1965
+ "url": S.String,
1966
+ "page_age": /*#__PURE__*/S.optionalWith(S.String, {
1967
+ nullable: true
1968
+ })
1969
+ })), /*#__PURE__*/S.Struct({
1970
+ "type": /*#__PURE__*/S.Literal("web_search_tool_result_error"),
1971
+ "error_code": /*#__PURE__*/S.Literal("invalid_tool_input", "unavailable", "max_uses_exceeded", "too_many_requests", "query_too_long")
1972
+ })),
1973
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1974
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1975
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1976
+ nullable: true
1977
+ })
1978
+ }), {
1979
+ nullable: true
1980
+ })
1981
+ }), /*#__PURE__*/S.Struct({
1982
+ "type": /*#__PURE__*/S.Literal("search_result"),
1983
+ "source": S.String,
1984
+ "title": S.String,
1985
+ "content": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
1986
+ "type": /*#__PURE__*/S.Literal("text"),
1987
+ "text": S.String,
1988
+ "citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1989
+ "type": /*#__PURE__*/S.Literal("char_location"),
1990
+ "cited_text": S.String,
1991
+ "document_index": S.Number,
1992
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1993
+ "start_char_index": S.Number,
1994
+ "end_char_index": S.Number
1995
+ }), /*#__PURE__*/S.Struct({
1996
+ "type": /*#__PURE__*/S.Literal("page_location"),
1997
+ "cited_text": S.String,
1998
+ "document_index": S.Number,
1999
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2000
+ "start_page_number": S.Number,
2001
+ "end_page_number": S.Number
2002
+ }), /*#__PURE__*/S.Struct({
2003
+ "type": /*#__PURE__*/S.Literal("content_block_location"),
2004
+ "cited_text": S.String,
2005
+ "document_index": S.Number,
2006
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2007
+ "start_block_index": S.Number,
2008
+ "end_block_index": S.Number
2009
+ }), /*#__PURE__*/S.Struct({
2010
+ "type": /*#__PURE__*/S.Literal("web_search_result_location"),
2011
+ "cited_text": S.String,
2012
+ "encrypted_index": S.String,
2013
+ "title": /*#__PURE__*/S.NullOr(S.String),
2014
+ "url": S.String
2015
+ }), /*#__PURE__*/S.Struct({
2016
+ "type": /*#__PURE__*/S.Literal("search_result_location"),
2017
+ "cited_text": S.String,
2018
+ "search_result_index": S.Number,
2019
+ "source": S.String,
2020
+ "title": /*#__PURE__*/S.NullOr(S.String),
2021
+ "start_block_index": S.Number,
2022
+ "end_block_index": S.Number
2023
+ }))), {
2024
+ nullable: true
2025
+ }),
2026
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2027
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
2028
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
2029
+ nullable: true
2030
+ })
2031
+ }), {
2032
+ nullable: true
2033
+ })
2034
+ })),
2035
+ "citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2036
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
2037
+ nullable: true
2038
+ })
2039
+ }), {
2040
+ nullable: true
2041
+ }),
2042
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2043
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
2044
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
2045
+ nullable: true
2046
+ })
2047
+ }), {
2048
+ nullable: true
2049
+ })
2050
+ }))))
2051
+ }) {}
2052
+ exports.OpenRouterAnthropicMessageParam = OpenRouterAnthropicMessageParam;
2053
+ class AnthropicMessagesRequestToolChoiceEnumType extends /*#__PURE__*/S.Literal("tool") {}
2054
+ exports.AnthropicMessagesRequestToolChoiceEnumType = AnthropicMessagesRequestToolChoiceEnumType;
2055
+ class AnthropicMessagesRequestThinkingEnumType extends /*#__PURE__*/S.Literal("disabled") {}
2056
+ exports.AnthropicMessagesRequestThinkingEnumType = AnthropicMessagesRequestThinkingEnumType;
2057
+ class AnthropicMessagesRequestServiceTier extends /*#__PURE__*/S.Literal("auto", "standard_only") {}
2058
+ /**
2059
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
2060
+ */
2061
+ exports.AnthropicMessagesRequestServiceTier = AnthropicMessagesRequestServiceTier;
2062
+ class AnthropicMessagesRequestProviderSort extends /*#__PURE__*/S.Literal("price", "throughput", "latency") {}
2063
+ /**
2064
+ * **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
2065
+ */
2066
+ exports.AnthropicMessagesRequestProviderSort = AnthropicMessagesRequestProviderSort;
2067
+ class AnthropicMessagesRequestRoute extends /*#__PURE__*/S.Literal("fallback", "sort") {}
2068
+ /**
2069
+ * Request schema for Anthropic Messages API endpoint
2070
+ */
2071
+ exports.AnthropicMessagesRequestRoute = AnthropicMessagesRequestRoute;
2072
+ class AnthropicMessagesRequest extends /*#__PURE__*/S.Class("AnthropicMessagesRequest")({
2073
+ "model": S.String,
2074
+ "max_tokens": S.Number,
2075
+ "messages": /*#__PURE__*/S.Array(OpenRouterAnthropicMessageParam),
2076
+ "system": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2077
+ "type": /*#__PURE__*/S.Literal("text"),
2078
+ "text": S.String,
2079
+ "citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2080
+ "type": /*#__PURE__*/S.Literal("char_location"),
2081
+ "cited_text": S.String,
2082
+ "document_index": S.Number,
2083
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2084
+ "start_char_index": S.Number,
2085
+ "end_char_index": S.Number
2086
+ }), /*#__PURE__*/S.Struct({
2087
+ "type": /*#__PURE__*/S.Literal("page_location"),
2088
+ "cited_text": S.String,
2089
+ "document_index": S.Number,
2090
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2091
+ "start_page_number": S.Number,
2092
+ "end_page_number": S.Number
2093
+ }), /*#__PURE__*/S.Struct({
2094
+ "type": /*#__PURE__*/S.Literal("content_block_location"),
2095
+ "cited_text": S.String,
2096
+ "document_index": S.Number,
2097
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2098
+ "start_block_index": S.Number,
2099
+ "end_block_index": S.Number
2100
+ }), /*#__PURE__*/S.Struct({
2101
+ "type": /*#__PURE__*/S.Literal("web_search_result_location"),
2102
+ "cited_text": S.String,
2103
+ "encrypted_index": S.String,
2104
+ "title": /*#__PURE__*/S.NullOr(S.String),
2105
+ "url": S.String
2106
+ }), /*#__PURE__*/S.Struct({
2107
+ "type": /*#__PURE__*/S.Literal("search_result_location"),
2108
+ "cited_text": S.String,
2109
+ "search_result_index": S.Number,
2110
+ "source": S.String,
2111
+ "title": /*#__PURE__*/S.NullOr(S.String),
2112
+ "start_block_index": S.Number,
2113
+ "end_block_index": S.Number
2114
+ }))), {
2115
+ nullable: true
2116
+ }),
2117
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2118
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
2119
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
2120
+ nullable: true
2121
+ })
2122
+ }), {
2123
+ nullable: true
2124
+ })
2125
+ }))), {
2126
+ nullable: true
2127
+ }),
2128
+ "metadata": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2129
+ "user_id": /*#__PURE__*/S.optionalWith(S.String, {
2130
+ nullable: true
2131
+ })
2132
+ }), {
2133
+ nullable: true
2134
+ }),
2135
+ "stop_sequences": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
2136
+ nullable: true
2137
+ }),
2138
+ "stream": /*#__PURE__*/S.optionalWith(S.Boolean, {
2139
+ nullable: true
2140
+ }),
2141
+ "temperature": /*#__PURE__*/S.optionalWith(S.Number, {
2142
+ nullable: true
2143
+ }),
2144
+ "top_p": /*#__PURE__*/S.optionalWith(S.Number, {
2145
+ nullable: true
2146
+ }),
2147
+ "top_k": /*#__PURE__*/S.optionalWith(S.Number, {
2148
+ nullable: true
2149
+ }),
2150
+ "tools": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2151
+ "name": S.String,
2152
+ "description": /*#__PURE__*/S.optionalWith(S.String, {
2153
+ nullable: true
2154
+ }),
2155
+ "input_schema": /*#__PURE__*/S.Struct({
2156
+ "type": /*#__PURE__*/S.Literal("object"),
2157
+ "required": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
2158
+ nullable: true
2159
+ })
2160
+ }),
2161
+ "type": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("custom"), {
2162
+ nullable: true
2163
+ }),
2164
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2165
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
2166
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
2167
+ nullable: true
2168
+ })
2169
+ }), {
2170
+ nullable: true
2171
+ })
2172
+ }), /*#__PURE__*/S.Struct({
2173
+ "type": /*#__PURE__*/S.Literal("bash_20250124"),
2174
+ "name": /*#__PURE__*/S.Literal("bash"),
2175
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2176
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
2177
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
2178
+ nullable: true
2179
+ })
2180
+ }), {
2181
+ nullable: true
2182
+ })
2183
+ }), /*#__PURE__*/S.Struct({
2184
+ "type": /*#__PURE__*/S.Literal("text_editor_20250124"),
2185
+ "name": /*#__PURE__*/S.Literal("str_replace_editor"),
2186
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2187
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
2188
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
2189
+ nullable: true
2190
+ })
2191
+ }), {
2192
+ nullable: true
2193
+ })
2194
+ }), /*#__PURE__*/S.Struct({
2195
+ "type": /*#__PURE__*/S.Literal("web_search_20250305"),
2196
+ "name": /*#__PURE__*/S.Literal("web_search"),
2197
+ "allowed_domains": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
2198
+ nullable: true
2199
+ }),
2200
+ "blocked_domains": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
2201
+ nullable: true
2202
+ }),
2203
+ "max_uses": /*#__PURE__*/S.optionalWith(S.Number, {
2204
+ nullable: true
2205
+ }),
2206
+ "user_location": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2207
+ "type": /*#__PURE__*/S.Literal("approximate"),
2208
+ "city": /*#__PURE__*/S.optionalWith(S.String, {
2209
+ nullable: true
2210
+ }),
2211
+ "country": /*#__PURE__*/S.optionalWith(S.String, {
2212
+ nullable: true
2213
+ }),
2214
+ "region": /*#__PURE__*/S.optionalWith(S.String, {
2215
+ nullable: true
2216
+ }),
2217
+ "timezone": /*#__PURE__*/S.optionalWith(S.String, {
2218
+ nullable: true
2219
+ })
2220
+ }), {
2221
+ nullable: true
2222
+ }),
2223
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2224
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
2225
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
2226
+ nullable: true
2227
+ })
2228
+ }), {
2229
+ nullable: true
2230
+ })
2231
+ }))), {
2232
+ nullable: true
2233
+ }),
2234
+ "tool_choice": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2235
+ "type": AnthropicMessagesRequestToolChoiceEnumType,
2236
+ "disable_parallel_tool_use": /*#__PURE__*/S.optionalWith(S.Boolean, {
2237
+ nullable: true
2238
+ })
2239
+ }), /*#__PURE__*/S.Struct({
2240
+ "type": AnthropicMessagesRequestToolChoiceEnumType,
2241
+ "disable_parallel_tool_use": /*#__PURE__*/S.optionalWith(S.Boolean, {
2242
+ nullable: true
2243
+ })
2244
+ }), /*#__PURE__*/S.Struct({
2245
+ "type": AnthropicMessagesRequestToolChoiceEnumType
2246
+ }), /*#__PURE__*/S.Struct({
2247
+ "type": AnthropicMessagesRequestToolChoiceEnumType,
2248
+ "name": S.String,
2249
+ "disable_parallel_tool_use": /*#__PURE__*/S.optionalWith(S.Boolean, {
2250
+ nullable: true
2251
+ })
2252
+ })), {
2253
+ nullable: true
2254
+ }),
2255
+ "thinking": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2256
+ "type": AnthropicMessagesRequestThinkingEnumType,
2257
+ "budget_tokens": S.Number
2258
+ }), /*#__PURE__*/S.Struct({
2259
+ "type": AnthropicMessagesRequestThinkingEnumType
2260
+ })), {
2261
+ nullable: true
2262
+ }),
2263
+ "service_tier": /*#__PURE__*/S.optionalWith(AnthropicMessagesRequestServiceTier, {
2264
+ nullable: true
2265
+ }),
2266
+ /**
2267
+ * When multiple model providers are available, optionally indicate your routing preference.
2268
+ */
2269
+ "provider": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2270
+ /**
2271
+ * Whether to allow backup providers to serve requests
2272
+ * - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
2273
+ * - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
2274
+ */
2275
+ "allow_fallbacks": /*#__PURE__*/S.optionalWith(S.Boolean, {
2276
+ nullable: true
2277
+ }),
2278
+ /**
2279
+ * Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
2280
+ */
2281
+ "require_parameters": /*#__PURE__*/S.optionalWith(S.Boolean, {
2282
+ nullable: true
2283
+ }),
2284
+ "data_collection": /*#__PURE__*/S.optionalWith(DataCollection, {
2285
+ nullable: true
2286
+ }),
2287
+ /**
2288
+ * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
2289
+ */
2290
+ "zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
2291
+ nullable: true
2292
+ }),
2293
+ /**
2294
+ * Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
2295
+ */
2296
+ "enforce_distillable_text": /*#__PURE__*/S.optionalWith(S.Boolean, {
2297
+ nullable: true
2298
+ }),
2299
+ /**
2300
+ * An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
2301
+ */
2302
+ "order": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
2303
+ nullable: true
2304
+ }),
2305
+ /**
2306
+ * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
2307
+ */
2308
+ "only": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
2309
+ nullable: true
2310
+ }),
2311
+ /**
2312
+ * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
2313
+ */
2314
+ "ignore": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
2315
+ nullable: true
2316
+ }),
2317
+ /**
2318
+ * A list of quantization levels to filter the provider by.
2319
+ */
2320
+ "quantizations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(Quantization), {
2321
+ nullable: true
2322
+ }),
2323
+ "sort": /*#__PURE__*/S.optionalWith(AnthropicMessagesRequestProviderSort, {
2324
+ nullable: true
2325
+ }),
2326
+ /**
2327
+ * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
2328
+ */
2329
+ "max_price": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2330
+ "prompt": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2331
+ nullable: true
2332
+ }),
2333
+ "completion": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2334
+ nullable: true
2335
+ }),
2336
+ "image": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2337
+ nullable: true
2338
+ }),
2339
+ "audio": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2340
+ nullable: true
2341
+ }),
2342
+ "request": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2343
+ nullable: true
2344
+ })
2345
+ }), {
2346
+ nullable: true
2347
+ }),
2348
+ "preferred_min_throughput": /*#__PURE__*/S.optionalWith(PreferredMinThroughput, {
2349
+ nullable: true
2350
+ }),
2351
+ "preferred_max_latency": /*#__PURE__*/S.optionalWith(PreferredMaxLatency, {
2352
+ nullable: true
2353
+ })
2354
+ }), {
2355
+ nullable: true
2356
+ }),
2357
+ /**
2358
+ * Plugins you want to enable for this request, including their settings.
2359
+ */
2360
+ "plugins": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2361
+ "id": /*#__PURE__*/S.Literal("auto-router"),
2362
+ /**
2363
+ * Set to false to disable the auto-router plugin for this request. Defaults to true.
2364
+ */
2365
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
2366
+ nullable: true
2367
+ }),
2368
+ /**
2369
+ * List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list.
2370
+ */
2371
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
2372
+ nullable: true
2373
+ })
2374
+ }), /*#__PURE__*/S.Struct({
2375
+ "id": /*#__PURE__*/S.Literal("moderation")
2376
+ }), /*#__PURE__*/S.Struct({
2377
+ "id": /*#__PURE__*/S.Literal("web"),
2378
+ /**
2379
+ * Set to false to disable the web-search plugin for this request. Defaults to true.
2380
+ */
2381
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
2382
+ nullable: true
2383
+ }),
2384
+ "max_results": /*#__PURE__*/S.optionalWith(S.Number, {
2385
+ nullable: true
2386
+ }),
2387
+ "search_prompt": /*#__PURE__*/S.optionalWith(S.String, {
2388
+ nullable: true
2389
+ }),
2390
+ "engine": /*#__PURE__*/S.optionalWith(WebSearchEngine, {
2391
+ nullable: true
2392
+ })
2393
+ }), /*#__PURE__*/S.Struct({
2394
+ "id": /*#__PURE__*/S.Literal("file-parser"),
2395
+ /**
2396
+ * Set to false to disable the file-parser plugin for this request. Defaults to true.
2397
+ */
2398
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
2399
+ nullable: true
2400
+ }),
2401
+ "pdf": /*#__PURE__*/S.optionalWith(PDFParserOptions, {
2402
+ nullable: true
2403
+ })
2404
+ }), /*#__PURE__*/S.Struct({
2405
+ "id": /*#__PURE__*/S.Literal("response-healing"),
2406
+ /**
2407
+ * Set to false to disable the response-healing plugin for this request. Defaults to true.
2408
+ */
2409
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
2410
+ nullable: true
2411
+ })
2412
+ }))), {
2413
+ nullable: true
2414
+ }),
2415
+ /**
2416
+ * **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
2417
+ */
2418
+ "route": /*#__PURE__*/S.optionalWith(AnthropicMessagesRequestRoute, {
2419
+ nullable: true
2420
+ }),
2421
+ /**
2422
+ * A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
2423
+ */
2424
+ "user": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(128)), {
2425
+ nullable: true
2426
+ }),
2427
+ /**
2428
+ * A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
2429
+ */
2430
+ "session_id": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(128)), {
2431
+ nullable: true
2432
+ }),
2433
+ "models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
2434
+ nullable: true
2435
+ })
2436
+ }) {}
2437
+ exports.AnthropicMessagesRequest = AnthropicMessagesRequest;
2438
+ class AnthropicMessagesResponseType extends /*#__PURE__*/S.Literal("message") {}
2439
+ exports.AnthropicMessagesResponseType = AnthropicMessagesResponseType;
2440
+ class AnthropicMessagesResponseRole extends /*#__PURE__*/S.Literal("assistant") {}
2441
+ exports.AnthropicMessagesResponseRole = AnthropicMessagesResponseRole;
2442
+ class AnthropicMessagesResponseStopReason extends /*#__PURE__*/S.Literal("end_turn", "max_tokens", "stop_sequence", "tool_use", "pause_turn", "refusal", "model_context_window_exceeded") {}
2443
+ exports.AnthropicMessagesResponseStopReason = AnthropicMessagesResponseStopReason;
2444
+ class AnthropicMessagesResponseUsageServiceTier extends /*#__PURE__*/S.Literal("standard", "priority", "batch") {}
2445
+ exports.AnthropicMessagesResponseUsageServiceTier = AnthropicMessagesResponseUsageServiceTier;
2446
+ class AnthropicMessagesResponse extends /*#__PURE__*/S.Class("AnthropicMessagesResponse")({
2447
+ "id": S.String,
2448
+ "type": AnthropicMessagesResponseType,
2449
+ "role": AnthropicMessagesResponseRole,
2450
+ "content": /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2451
+ "type": /*#__PURE__*/S.Literal("text"),
2452
+ "text": S.String,
2453
+ "citations": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2454
+ "type": /*#__PURE__*/S.Literal("char_location"),
2455
+ "cited_text": S.String,
2456
+ "document_index": S.Number,
2457
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2458
+ "start_char_index": S.Number,
2459
+ "end_char_index": S.Number,
2460
+ "file_id": /*#__PURE__*/S.NullOr(S.String)
2461
+ }), /*#__PURE__*/S.Struct({
2462
+ "type": /*#__PURE__*/S.Literal("page_location"),
2463
+ "cited_text": S.String,
2464
+ "document_index": S.Number,
2465
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2466
+ "start_page_number": S.Number,
2467
+ "end_page_number": S.Number,
2468
+ "file_id": /*#__PURE__*/S.NullOr(S.String)
2469
+ }), /*#__PURE__*/S.Struct({
2470
+ "type": /*#__PURE__*/S.Literal("content_block_location"),
2471
+ "cited_text": S.String,
2472
+ "document_index": S.Number,
2473
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2474
+ "start_block_index": S.Number,
2475
+ "end_block_index": S.Number,
2476
+ "file_id": /*#__PURE__*/S.NullOr(S.String)
2477
+ }), /*#__PURE__*/S.Struct({
2478
+ "type": /*#__PURE__*/S.Literal("web_search_result_location"),
2479
+ "cited_text": S.String,
2480
+ "encrypted_index": S.String,
2481
+ "title": /*#__PURE__*/S.NullOr(S.String),
2482
+ "url": S.String
2483
+ }), /*#__PURE__*/S.Struct({
2484
+ "type": /*#__PURE__*/S.Literal("search_result_location"),
2485
+ "cited_text": S.String,
2486
+ "search_result_index": S.Number,
2487
+ "source": S.String,
2488
+ "title": /*#__PURE__*/S.NullOr(S.String),
2489
+ "start_block_index": S.Number,
2490
+ "end_block_index": S.Number
2491
+ }))))
2492
+ }), /*#__PURE__*/S.Struct({
2493
+ "type": /*#__PURE__*/S.Literal("tool_use"),
2494
+ "id": S.String,
2495
+ "name": S.String
2496
+ }), /*#__PURE__*/S.Struct({
2497
+ "type": /*#__PURE__*/S.Literal("thinking"),
2498
+ "thinking": S.String,
2499
+ "signature": S.String
2500
+ }), /*#__PURE__*/S.Struct({
2501
+ "type": /*#__PURE__*/S.Literal("redacted_thinking"),
2502
+ "data": S.String
2503
+ }), /*#__PURE__*/S.Struct({
2504
+ "type": /*#__PURE__*/S.Literal("server_tool_use"),
2505
+ "id": S.String,
2506
+ "name": /*#__PURE__*/S.Literal("web_search")
2507
+ }), /*#__PURE__*/S.Struct({
2508
+ "type": /*#__PURE__*/S.Literal("web_search_tool_result"),
2509
+ "tool_use_id": S.String,
2510
+ "content": /*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2511
+ "type": /*#__PURE__*/S.Literal("web_search_result"),
2512
+ "encrypted_content": S.String,
2513
+ "page_age": /*#__PURE__*/S.NullOr(S.String),
2514
+ "title": S.String,
2515
+ "url": S.String
2516
+ })), /*#__PURE__*/S.Struct({
2517
+ "type": /*#__PURE__*/S.Literal("web_search_tool_result_error"),
2518
+ "error_code": /*#__PURE__*/S.Literal("invalid_tool_input", "unavailable", "max_uses_exceeded", "too_many_requests", "query_too_long")
2519
+ }))
2520
+ }))),
2521
+ "model": S.String,
2522
+ "stop_reason": /*#__PURE__*/S.NullOr(AnthropicMessagesResponseStopReason),
2523
+ "stop_sequence": /*#__PURE__*/S.NullOr(S.String),
2524
+ "usage": /*#__PURE__*/S.Struct({
2525
+ "input_tokens": S.Number,
2526
+ "output_tokens": S.Number,
2527
+ "cache_creation_input_tokens": /*#__PURE__*/S.NullOr(S.Number),
2528
+ "cache_read_input_tokens": /*#__PURE__*/S.NullOr(S.Number),
2529
+ "cache_creation": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Struct({
2530
+ "ephemeral_5m_input_tokens": S.Number,
2531
+ "ephemeral_1h_input_tokens": S.Number
2532
+ })),
2533
+ "server_tool_use": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Struct({
2534
+ "web_search_requests": S.Number
2535
+ })),
2536
+ "service_tier": /*#__PURE__*/S.NullOr(AnthropicMessagesResponseUsageServiceTier)
2537
+ })
2538
+ }) {}
2539
+ exports.AnthropicMessagesResponse = AnthropicMessagesResponse;
2540
+ class CreateMessages400Type extends /*#__PURE__*/S.Literal("error") {}
2541
+ exports.CreateMessages400Type = CreateMessages400Type;
2542
+ class CreateMessages400 extends /*#__PURE__*/S.Struct({
2543
+ "type": CreateMessages400Type,
2544
+ "error": /*#__PURE__*/S.Struct({
2545
+ "type": S.String,
2546
+ "message": S.String
2547
+ })
2548
+ }) {}
2549
+ exports.CreateMessages400 = CreateMessages400;
2550
+ class CreateMessages401Type extends /*#__PURE__*/S.Literal("error") {}
2551
+ exports.CreateMessages401Type = CreateMessages401Type;
2552
+ class CreateMessages401 extends /*#__PURE__*/S.Struct({
2553
+ "type": CreateMessages401Type,
2554
+ "error": /*#__PURE__*/S.Struct({
2555
+ "type": S.String,
2556
+ "message": S.String
2557
+ })
2558
+ }) {}
2559
+ exports.CreateMessages401 = CreateMessages401;
2560
+ class CreateMessages403Type extends /*#__PURE__*/S.Literal("error") {}
2561
+ exports.CreateMessages403Type = CreateMessages403Type;
2562
+ class CreateMessages403 extends /*#__PURE__*/S.Struct({
2563
+ "type": CreateMessages403Type,
2564
+ "error": /*#__PURE__*/S.Struct({
2565
+ "type": S.String,
2566
+ "message": S.String
2567
+ })
2568
+ }) {}
2569
+ exports.CreateMessages403 = CreateMessages403;
2570
+ class CreateMessages404Type extends /*#__PURE__*/S.Literal("error") {}
2571
+ exports.CreateMessages404Type = CreateMessages404Type;
2572
+ class CreateMessages404 extends /*#__PURE__*/S.Struct({
2573
+ "type": CreateMessages404Type,
2574
+ "error": /*#__PURE__*/S.Struct({
2575
+ "type": S.String,
2576
+ "message": S.String
2577
+ })
2578
+ }) {}
2579
+ exports.CreateMessages404 = CreateMessages404;
2580
+ class CreateMessages429Type extends /*#__PURE__*/S.Literal("error") {}
2581
+ exports.CreateMessages429Type = CreateMessages429Type;
2582
+ class CreateMessages429 extends /*#__PURE__*/S.Struct({
2583
+ "type": CreateMessages429Type,
2584
+ "error": /*#__PURE__*/S.Struct({
2585
+ "type": S.String,
2586
+ "message": S.String
2587
+ })
2588
+ }) {}
2589
+ exports.CreateMessages429 = CreateMessages429;
2590
+ class CreateMessages500Type extends /*#__PURE__*/S.Literal("error") {}
2591
+ exports.CreateMessages500Type = CreateMessages500Type;
2592
+ class CreateMessages500 extends /*#__PURE__*/S.Struct({
2593
+ "type": CreateMessages500Type,
2594
+ "error": /*#__PURE__*/S.Struct({
2595
+ "type": S.String,
2596
+ "message": S.String
2597
+ })
2598
+ }) {}
2599
+ exports.CreateMessages500 = CreateMessages500;
2600
+ class CreateMessages503Type extends /*#__PURE__*/S.Literal("error") {}
2601
+ exports.CreateMessages503Type = CreateMessages503Type;
2602
+ class CreateMessages503 extends /*#__PURE__*/S.Struct({
2603
+ "type": CreateMessages503Type,
2604
+ "error": /*#__PURE__*/S.Struct({
2605
+ "type": S.String,
2606
+ "message": S.String
2607
+ })
2608
+ }) {}
2609
+ exports.CreateMessages503 = CreateMessages503;
2610
+ class CreateMessages529Type extends /*#__PURE__*/S.Literal("error") {}
2611
+ exports.CreateMessages529Type = CreateMessages529Type;
2612
+ class CreateMessages529 extends /*#__PURE__*/S.Struct({
2613
+ "type": CreateMessages529Type,
2614
+ "error": /*#__PURE__*/S.Struct({
2615
+ "type": S.String,
2616
+ "message": S.String
2617
+ })
2618
+ }) {}
2619
+ exports.CreateMessages529 = CreateMessages529;
1551
2620
  class GetUserActivityParams extends /*#__PURE__*/S.Struct({
1552
2621
  /**
1553
- * Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).
2622
+ * Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).
2623
+ */
2624
+ "date": /*#__PURE__*/S.optionalWith(S.String, {
2625
+ nullable: true
2626
+ })
2627
+ }) {}
2628
+ exports.GetUserActivityParams = GetUserActivityParams;
2629
+ class ActivityItem extends /*#__PURE__*/S.Class("ActivityItem")({
2630
+ /**
2631
+ * Date of the activity (YYYY-MM-DD format)
2632
+ */
2633
+ "date": S.String,
2634
+ /**
2635
+ * Model slug (e.g., "openai/gpt-4.1")
2636
+ */
2637
+ "model": S.String,
2638
+ /**
2639
+ * Model permaslug (e.g., "openai/gpt-4.1-2025-04-14")
2640
+ */
2641
+ "model_permaslug": S.String,
2642
+ /**
2643
+ * Unique identifier for the endpoint
2644
+ */
2645
+ "endpoint_id": S.String,
2646
+ /**
2647
+ * Name of the provider serving this endpoint
2648
+ */
2649
+ "provider_name": S.String,
2650
+ /**
2651
+ * Total cost in USD (OpenRouter credits spent)
2652
+ */
2653
+ "usage": S.Number,
2654
+ /**
2655
+ * BYOK inference cost in USD (external credits spent)
2656
+ */
2657
+ "byok_usage_inference": S.Number,
2658
+ /**
2659
+ * Number of requests made
2660
+ */
2661
+ "requests": S.Number,
2662
+ /**
2663
+ * Total prompt tokens used
2664
+ */
2665
+ "prompt_tokens": S.Number,
2666
+ /**
2667
+ * Total completion tokens generated
2668
+ */
2669
+ "completion_tokens": S.Number,
2670
+ /**
2671
+ * Total reasoning tokens used
2672
+ */
2673
+ "reasoning_tokens": S.Number
2674
+ }) {}
2675
+ exports.ActivityItem = ActivityItem;
2676
+ class GetUserActivity200 extends /*#__PURE__*/S.Struct({
2677
+ /**
2678
+ * List of activity items
2679
+ */
2680
+ "data": /*#__PURE__*/S.Array(ActivityItem)
2681
+ }) {}
2682
+ /**
2683
+ * Error data for ForbiddenResponse
2684
+ */
2685
+ exports.GetUserActivity200 = GetUserActivity200;
2686
+ class ForbiddenResponseErrorData extends /*#__PURE__*/S.Class("ForbiddenResponseErrorData")({
2687
+ "code": S.Int,
2688
+ "message": S.String,
2689
+ "metadata": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Record({
2690
+ key: S.String,
2691
+ value: S.Unknown
2692
+ }), {
2693
+ nullable: true
2694
+ })
2695
+ }) {}
2696
+ /**
2697
+ * Forbidden - Authentication successful but insufficient permissions
2698
+ */
2699
+ exports.ForbiddenResponseErrorData = ForbiddenResponseErrorData;
2700
+ class ForbiddenResponse extends /*#__PURE__*/S.Class("ForbiddenResponse")({
2701
+ "error": ForbiddenResponseErrorData,
2702
+ "user_id": /*#__PURE__*/S.optionalWith(S.String, {
2703
+ nullable: true
2704
+ })
2705
+ }) {}
2706
+ /**
2707
+ * Total credits purchased and used
2708
+ */
2709
+ exports.ForbiddenResponse = ForbiddenResponse;
2710
+ class GetCredits200 extends /*#__PURE__*/S.Struct({
2711
+ "data": /*#__PURE__*/S.Struct({
2712
+ /**
2713
+ * Total credits purchased
2714
+ */
2715
+ "total_credits": S.Number,
2716
+ /**
2717
+ * Total credits used
2718
+ */
2719
+ "total_usage": S.Number
2720
+ })
2721
+ }) {}
2722
+ exports.GetCredits200 = GetCredits200;
2723
+ class CreateChargeRequestChainId extends /*#__PURE__*/S.Literal(1, 137, 8453) {}
2724
+ /**
2725
+ * Create a Coinbase charge for crypto payment
2726
+ */
2727
+ exports.CreateChargeRequestChainId = CreateChargeRequestChainId;
2728
+ class CreateChargeRequest extends /*#__PURE__*/S.Class("CreateChargeRequest")({
2729
+ "amount": S.Number,
2730
+ "sender": S.String,
2731
+ "chain_id": CreateChargeRequestChainId
2732
+ }) {}
2733
+ exports.CreateChargeRequest = CreateChargeRequest;
2734
+ class CreateCoinbaseCharge200 extends /*#__PURE__*/S.Struct({
2735
+ "data": /*#__PURE__*/S.Struct({
2736
+ "id": S.String,
2737
+ "created_at": S.String,
2738
+ "expires_at": S.String,
2739
+ "web3_data": /*#__PURE__*/S.Struct({
2740
+ "transfer_intent": /*#__PURE__*/S.Struct({
2741
+ "call_data": /*#__PURE__*/S.Struct({
2742
+ "deadline": S.String,
2743
+ "fee_amount": S.String,
2744
+ "id": S.String,
2745
+ "operator": S.String,
2746
+ "prefix": S.String,
2747
+ "recipient": S.String,
2748
+ "recipient_amount": S.String,
2749
+ "recipient_currency": S.String,
2750
+ "refund_destination": S.String,
2751
+ "signature": S.String
2752
+ }),
2753
+ "metadata": /*#__PURE__*/S.Struct({
2754
+ "chain_id": S.Number,
2755
+ "contract_address": S.String,
2756
+ "sender": S.String
2757
+ })
2758
+ })
2759
+ })
2760
+ })
2761
+ }) {}
2762
+ exports.CreateCoinbaseCharge200 = CreateCoinbaseCharge200;
2763
+ class CreateEmbeddingsRequestEncodingFormat extends /*#__PURE__*/S.Literal("float", "base64") {}
2764
+ /**
2765
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
2766
+ */
2767
+ exports.CreateEmbeddingsRequestEncodingFormat = CreateEmbeddingsRequestEncodingFormat;
2768
+ class ProviderPreferencesSort extends /*#__PURE__*/S.Literal("price", "throughput", "latency") {}
2769
+ /**
2770
+ * Provider routing preferences for the request.
2771
+ */
2772
+ exports.ProviderPreferencesSort = ProviderPreferencesSort;
2773
+ class ProviderPreferences extends /*#__PURE__*/S.Class("ProviderPreferences")({
2774
+ /**
2775
+ * Whether to allow backup providers to serve requests
2776
+ * - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
2777
+ * - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
2778
+ */
2779
+ "allow_fallbacks": /*#__PURE__*/S.optionalWith(S.Boolean, {
2780
+ nullable: true
2781
+ }),
2782
+ /**
2783
+ * Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
2784
+ */
2785
+ "require_parameters": /*#__PURE__*/S.optionalWith(S.Boolean, {
2786
+ nullable: true
2787
+ }),
2788
+ "data_collection": /*#__PURE__*/S.optionalWith(DataCollection, {
2789
+ nullable: true
2790
+ }),
2791
+ /**
2792
+ * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
1554
2793
  */
1555
- "date": /*#__PURE__*/S.optionalWith(S.String, {
2794
+ "zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
2795
+ nullable: true
2796
+ }),
2797
+ /**
2798
+ * Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
2799
+ */
2800
+ "enforce_distillable_text": /*#__PURE__*/S.optionalWith(S.Boolean, {
2801
+ nullable: true
2802
+ }),
2803
+ /**
2804
+ * An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
2805
+ */
2806
+ "order": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
2807
+ nullable: true
2808
+ }),
2809
+ /**
2810
+ * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
2811
+ */
2812
+ "only": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
2813
+ nullable: true
2814
+ }),
2815
+ /**
2816
+ * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
2817
+ */
2818
+ "ignore": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
2819
+ nullable: true
2820
+ }),
2821
+ /**
2822
+ * A list of quantization levels to filter the provider by.
2823
+ */
2824
+ "quantizations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(Quantization), {
2825
+ nullable: true
2826
+ }),
2827
+ "sort": /*#__PURE__*/S.optionalWith(ProviderPreferencesSort, {
2828
+ nullable: true
2829
+ }),
2830
+ /**
2831
+ * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
2832
+ */
2833
+ "max_price": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2834
+ "prompt": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2835
+ nullable: true
2836
+ }),
2837
+ "completion": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2838
+ nullable: true
2839
+ }),
2840
+ "image": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2841
+ nullable: true
2842
+ }),
2843
+ "audio": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2844
+ nullable: true
2845
+ }),
2846
+ "request": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2847
+ nullable: true
2848
+ })
2849
+ }), {
2850
+ nullable: true
2851
+ }),
2852
+ "preferred_min_throughput": /*#__PURE__*/S.optionalWith(PreferredMinThroughput, {
2853
+ nullable: true
2854
+ }),
2855
+ "preferred_max_latency": /*#__PURE__*/S.optionalWith(PreferredMaxLatency, {
2856
+ nullable: true
2857
+ })
2858
+ }) {}
2859
+ exports.ProviderPreferences = ProviderPreferences;
2860
+ class CreateEmbeddingsRequest extends /*#__PURE__*/S.Class("CreateEmbeddingsRequest")({
2861
+ "input": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(S.String), /*#__PURE__*/S.Array(S.Number), /*#__PURE__*/S.Array(/*#__PURE__*/S.Array(S.Number)), /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2862
+ "content": /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2863
+ "type": /*#__PURE__*/S.Literal("text"),
2864
+ "text": S.String
2865
+ }), /*#__PURE__*/S.Struct({
2866
+ "type": /*#__PURE__*/S.Literal("image_url"),
2867
+ "image_url": /*#__PURE__*/S.Struct({
2868
+ "url": S.String
2869
+ })
2870
+ })))
2871
+ }))),
2872
+ "model": S.String,
2873
+ "encoding_format": /*#__PURE__*/S.optionalWith(CreateEmbeddingsRequestEncodingFormat, {
2874
+ nullable: true
2875
+ }),
2876
+ "dimensions": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThan(0)), {
2877
+ nullable: true
2878
+ }),
2879
+ "user": /*#__PURE__*/S.optionalWith(S.String, {
2880
+ nullable: true
2881
+ }),
2882
+ "provider": /*#__PURE__*/S.optionalWith(ProviderPreferences, {
2883
+ nullable: true
2884
+ }),
2885
+ "input_type": /*#__PURE__*/S.optionalWith(S.String, {
2886
+ nullable: true
2887
+ })
2888
+ }) {}
2889
+ exports.CreateEmbeddingsRequest = CreateEmbeddingsRequest;
2890
+ class CreateEmbeddings200Object extends /*#__PURE__*/S.Literal("list") {}
2891
+ exports.CreateEmbeddings200Object = CreateEmbeddings200Object;
2892
+ class CreateEmbeddings200 extends /*#__PURE__*/S.Struct({
2893
+ "id": /*#__PURE__*/S.optionalWith(S.String, {
2894
+ nullable: true
2895
+ }),
2896
+ "object": CreateEmbeddings200Object,
2897
+ "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2898
+ "object": /*#__PURE__*/S.Literal("embedding"),
2899
+ "embedding": /*#__PURE__*/S.Union(/*#__PURE__*/S.Array(S.Number), S.String),
2900
+ "index": /*#__PURE__*/S.optionalWith(S.Number, {
2901
+ nullable: true
2902
+ })
2903
+ })),
2904
+ "model": S.String,
2905
+ "usage": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2906
+ "prompt_tokens": S.Number,
2907
+ "total_tokens": S.Number,
2908
+ "cost": /*#__PURE__*/S.optionalWith(S.Number, {
2909
+ nullable: true
2910
+ })
2911
+ }), {
2912
+ nullable: true
2913
+ })
2914
+ }) {}
2915
+ /**
2916
+ * Pricing information for the model
2917
+ */
2918
+ exports.CreateEmbeddings200 = CreateEmbeddings200;
2919
+ class PublicPricing extends /*#__PURE__*/S.Class("PublicPricing")({
2920
+ "prompt": BigNumberUnion,
2921
+ "completion": BigNumberUnion,
2922
+ "request": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2923
+ nullable: true
2924
+ }),
2925
+ "image": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2926
+ nullable: true
2927
+ }),
2928
+ "image_token": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2929
+ nullable: true
2930
+ }),
2931
+ "image_output": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2932
+ nullable: true
2933
+ }),
2934
+ "audio": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2935
+ nullable: true
2936
+ }),
2937
+ "audio_output": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2938
+ nullable: true
2939
+ }),
2940
+ "input_audio_cache": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2941
+ nullable: true
2942
+ }),
2943
+ "web_search": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2944
+ nullable: true
2945
+ }),
2946
+ "internal_reasoning": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2947
+ nullable: true
2948
+ }),
2949
+ "input_cache_read": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2950
+ nullable: true
2951
+ }),
2952
+ "input_cache_write": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2953
+ nullable: true
2954
+ }),
2955
+ "discount": /*#__PURE__*/S.optionalWith(S.Number, {
2956
+ nullable: true
2957
+ })
2958
+ }) {}
2959
+ /**
2960
+ * Tokenizer type used by the model
2961
+ */
2962
+ exports.PublicPricing = PublicPricing;
2963
+ class ModelGroup extends /*#__PURE__*/S.Literal("Router", "Media", "Other", "GPT", "Claude", "Gemini", "Grok", "Cohere", "Nova", "Qwen", "Yi", "DeepSeek", "Mistral", "Llama2", "Llama3", "Llama4", "PaLM", "RWKV", "Qwen3") {}
2964
+ /**
2965
+ * Instruction format type
2966
+ */
2967
+ exports.ModelGroup = ModelGroup;
2968
+ class ModelArchitectureInstructType extends /*#__PURE__*/S.Literal("none", "airoboros", "alpaca", "alpaca-modif", "chatml", "claude", "code-llama", "gemma", "llama2", "llama3", "mistral", "nemotron", "neural", "openchat", "phi3", "rwkv", "vicuna", "zephyr", "deepseek-r1", "deepseek-v3.1", "qwq", "qwen3") {}
2969
+ exports.ModelArchitectureInstructType = ModelArchitectureInstructType;
2970
+ class InputModality extends /*#__PURE__*/S.Literal("text", "image", "file", "audio", "video") {}
2971
+ exports.InputModality = InputModality;
2972
+ class OutputModality extends /*#__PURE__*/S.Literal("text", "image", "embeddings", "audio") {}
2973
+ /**
2974
+ * Model architecture information
2975
+ */
2976
+ exports.OutputModality = OutputModality;
2977
+ class ModelArchitecture extends /*#__PURE__*/S.Class("ModelArchitecture")({
2978
+ "tokenizer": /*#__PURE__*/S.optionalWith(ModelGroup, {
2979
+ nullable: true
2980
+ }),
2981
+ /**
2982
+ * Instruction format type
2983
+ */
2984
+ "instruct_type": /*#__PURE__*/S.optionalWith(ModelArchitectureInstructType, {
2985
+ nullable: true
2986
+ }),
2987
+ /**
2988
+ * Primary modality of the model
2989
+ */
2990
+ "modality": /*#__PURE__*/S.NullOr(S.String),
2991
+ /**
2992
+ * Supported input modalities
2993
+ */
2994
+ "input_modalities": /*#__PURE__*/S.Array(InputModality),
2995
+ /**
2996
+ * Supported output modalities
2997
+ */
2998
+ "output_modalities": /*#__PURE__*/S.Array(OutputModality)
2999
+ }) {}
3000
+ /**
3001
+ * Information about the top provider for this model
3002
+ */
3003
+ exports.ModelArchitecture = ModelArchitecture;
3004
+ class TopProviderInfo extends /*#__PURE__*/S.Class("TopProviderInfo")({
3005
+ /**
3006
+ * Context length from the top provider
3007
+ */
3008
+ "context_length": /*#__PURE__*/S.optionalWith(S.Number, {
3009
+ nullable: true
3010
+ }),
3011
+ /**
3012
+ * Maximum completion tokens from the top provider
3013
+ */
3014
+ "max_completion_tokens": /*#__PURE__*/S.optionalWith(S.Number, {
3015
+ nullable: true
3016
+ }),
3017
+ /**
3018
+ * Whether the top provider moderates content
3019
+ */
3020
+ "is_moderated": S.Boolean
3021
+ }) {}
3022
+ /**
3023
+ * Per-request token limits
3024
+ */
3025
+ exports.TopProviderInfo = TopProviderInfo;
3026
+ class PerRequestLimits extends /*#__PURE__*/S.Class("PerRequestLimits")({
3027
+ /**
3028
+ * Maximum prompt tokens per request
3029
+ */
3030
+ "prompt_tokens": S.Number,
3031
+ /**
3032
+ * Maximum completion tokens per request
3033
+ */
3034
+ "completion_tokens": S.Number
3035
+ }) {}
3036
+ exports.PerRequestLimits = PerRequestLimits;
3037
+ class Parameter extends /*#__PURE__*/S.Literal("temperature", "top_p", "top_k", "min_p", "top_a", "frequency_penalty", "presence_penalty", "repetition_penalty", "max_tokens", "logit_bias", "logprobs", "top_logprobs", "seed", "response_format", "structured_outputs", "stop", "tools", "tool_choice", "parallel_tool_calls", "include_reasoning", "reasoning", "reasoning_effort", "web_search_options", "verbosity") {}
3038
+ /**
3039
+ * Default parameters for this model
3040
+ */
3041
+ exports.Parameter = Parameter;
3042
+ class DefaultParameters extends /*#__PURE__*/S.Class("DefaultParameters")({
3043
+ "temperature": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(2)), {
3044
+ nullable: true
3045
+ }),
3046
+ "top_p": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(1)), {
3047
+ nullable: true
3048
+ }),
3049
+ "frequency_penalty": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(-2), /*#__PURE__*/S.lessThanOrEqualTo(2)), {
1556
3050
  nullable: true
1557
3051
  })
1558
3052
  }) {}
1559
- exports.GetUserActivityParams = GetUserActivityParams;
1560
- class ActivityItem extends /*#__PURE__*/S.Class("ActivityItem")({
1561
- /**
1562
- * Date of the activity (YYYY-MM-DD format)
1563
- */
1564
- "date": S.String,
1565
- /**
1566
- * Model slug (e.g., "openai/gpt-4.1")
1567
- */
1568
- "model": S.String,
1569
- /**
1570
- * Model permaslug (e.g., "openai/gpt-4.1-2025-04-14")
1571
- */
1572
- "model_permaslug": S.String,
3053
+ /**
3054
+ * Information about an AI model available on OpenRouter
3055
+ */
3056
+ exports.DefaultParameters = DefaultParameters;
3057
+ class Model extends /*#__PURE__*/S.Class("Model")({
1573
3058
  /**
1574
- * Unique identifier for the endpoint
3059
+ * Unique identifier for the model
1575
3060
  */
1576
- "endpoint_id": S.String,
3061
+ "id": S.String,
1577
3062
  /**
1578
- * Name of the provider serving this endpoint
3063
+ * Canonical slug for the model
1579
3064
  */
1580
- "provider_name": S.String,
3065
+ "canonical_slug": S.String,
1581
3066
  /**
1582
- * Total cost in USD (OpenRouter credits spent)
3067
+ * Hugging Face model identifier, if applicable
1583
3068
  */
1584
- "usage": S.Number,
3069
+ "hugging_face_id": /*#__PURE__*/S.optionalWith(S.String, {
3070
+ nullable: true
3071
+ }),
1585
3072
  /**
1586
- * BYOK inference cost in USD (external credits spent)
3073
+ * Display name of the model
1587
3074
  */
1588
- "byok_usage_inference": S.Number,
3075
+ "name": S.String,
1589
3076
  /**
1590
- * Number of requests made
3077
+ * Unix timestamp of when the model was created
1591
3078
  */
1592
- "requests": S.Number,
3079
+ "created": S.Number,
1593
3080
  /**
1594
- * Total prompt tokens used
3081
+ * Description of the model
1595
3082
  */
1596
- "prompt_tokens": S.Number,
3083
+ "description": /*#__PURE__*/S.optionalWith(S.String, {
3084
+ nullable: true
3085
+ }),
3086
+ "pricing": PublicPricing,
1597
3087
  /**
1598
- * Total completion tokens generated
3088
+ * Maximum context length in tokens
1599
3089
  */
1600
- "completion_tokens": S.Number,
3090
+ "context_length": /*#__PURE__*/S.NullOr(S.Number),
3091
+ "architecture": ModelArchitecture,
3092
+ "top_provider": TopProviderInfo,
3093
+ "per_request_limits": /*#__PURE__*/S.NullOr(PerRequestLimits),
1601
3094
  /**
1602
- * Total reasoning tokens used
3095
+ * List of supported parameters for this model
1603
3096
  */
1604
- "reasoning_tokens": S.Number
1605
- }) {}
1606
- exports.ActivityItem = ActivityItem;
1607
- class GetUserActivity200 extends /*#__PURE__*/S.Struct({
3097
+ "supported_parameters": /*#__PURE__*/S.Array(Parameter),
3098
+ "default_parameters": /*#__PURE__*/S.NullOr(DefaultParameters),
1608
3099
  /**
1609
- * List of activity items
3100
+ * The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration.
1610
3101
  */
1611
- "data": /*#__PURE__*/S.Array(ActivityItem)
1612
- }) {}
1613
- /**
1614
- * Error data for ForbiddenResponse
1615
- */
1616
- exports.GetUserActivity200 = GetUserActivity200;
1617
- class ForbiddenResponseErrorData extends /*#__PURE__*/S.Class("ForbiddenResponseErrorData")({
1618
- "code": S.Int,
1619
- "message": S.String,
1620
- "metadata": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Record({
1621
- key: S.String,
1622
- value: S.Unknown
1623
- }), {
3102
+ "expiration_date": /*#__PURE__*/S.optionalWith(S.String, {
1624
3103
  nullable: true
1625
3104
  })
1626
3105
  }) {}
1627
3106
  /**
1628
- * Forbidden - Authentication successful but insufficient permissions
3107
+ * List of available models
1629
3108
  */
1630
- exports.ForbiddenResponseErrorData = ForbiddenResponseErrorData;
1631
- class ForbiddenResponse extends /*#__PURE__*/S.Class("ForbiddenResponse")({
1632
- "error": ForbiddenResponseErrorData,
1633
- "user_id": /*#__PURE__*/S.optionalWith(S.String, {
1634
- nullable: true
1635
- })
3109
+ exports.Model = Model;
3110
+ class ModelsListResponseData extends /*#__PURE__*/S.Array(Model) {}
3111
+ /**
3112
+ * List of available models
3113
+ */
3114
+ exports.ModelsListResponseData = ModelsListResponseData;
3115
+ class ModelsListResponse extends /*#__PURE__*/S.Class("ModelsListResponse")({
3116
+ "data": ModelsListResponseData
3117
+ }) {}
3118
+ exports.ModelsListResponse = ModelsListResponse;
3119
+ class GetGenerationParams extends /*#__PURE__*/S.Struct({
3120
+ "id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1))
1636
3121
  }) {}
1637
3122
  /**
1638
- * Total credits purchased and used
3123
+ * Type of API used for the generation
1639
3124
  */
1640
- exports.ForbiddenResponse = ForbiddenResponse;
1641
- class GetCredits200 extends /*#__PURE__*/S.Struct({
3125
+ exports.GetGenerationParams = GetGenerationParams;
3126
+ class GetGeneration200DataApiType extends /*#__PURE__*/S.Literal("completions", "embeddings") {}
3127
+ /**
3128
+ * Generation response
3129
+ */
3130
+ exports.GetGeneration200DataApiType = GetGeneration200DataApiType;
3131
+ class GetGeneration200 extends /*#__PURE__*/S.Struct({
3132
+ /**
3133
+ * Generation data
3134
+ */
1642
3135
  "data": /*#__PURE__*/S.Struct({
1643
3136
  /**
1644
- * Total credits purchased
3137
+ * Unique identifier for the generation
1645
3138
  */
1646
- "total_credits": S.Number,
3139
+ "id": S.String,
1647
3140
  /**
1648
- * Total credits used
3141
+ * Upstream provider's identifier for this generation
3142
+ */
3143
+ "upstream_id": /*#__PURE__*/S.NullOr(S.String),
3144
+ /**
3145
+ * Total cost of the generation in USD
3146
+ */
3147
+ "total_cost": S.Number,
3148
+ /**
3149
+ * Discount applied due to caching
3150
+ */
3151
+ "cache_discount": /*#__PURE__*/S.NullOr(S.Number),
3152
+ /**
3153
+ * Cost charged by the upstream provider
3154
+ */
3155
+ "upstream_inference_cost": /*#__PURE__*/S.NullOr(S.Number),
3156
+ /**
3157
+ * ISO 8601 timestamp of when the generation was created
1649
3158
  */
1650
- "total_usage": S.Number
1651
- })
1652
- }) {}
1653
- exports.GetCredits200 = GetCredits200;
1654
- class CreateChargeRequestChainId extends /*#__PURE__*/S.Literal(1, 137, 8453) {}
1655
- /**
1656
- * Create a Coinbase charge for crypto payment
1657
- */
1658
- exports.CreateChargeRequestChainId = CreateChargeRequestChainId;
1659
- class CreateChargeRequest extends /*#__PURE__*/S.Class("CreateChargeRequest")({
1660
- "amount": S.Number,
1661
- "sender": S.String,
1662
- "chain_id": CreateChargeRequestChainId
1663
- }) {}
1664
- exports.CreateChargeRequest = CreateChargeRequest;
1665
- class CreateCoinbaseCharge200 extends /*#__PURE__*/S.Struct({
1666
- "data": /*#__PURE__*/S.Struct({
1667
- "id": S.String,
1668
3159
  "created_at": S.String,
1669
- "expires_at": S.String,
1670
- "web3_data": /*#__PURE__*/S.Struct({
1671
- "transfer_intent": /*#__PURE__*/S.Struct({
1672
- "call_data": /*#__PURE__*/S.Struct({
1673
- "deadline": S.String,
1674
- "fee_amount": S.String,
1675
- "id": S.String,
1676
- "operator": S.String,
1677
- "prefix": S.String,
1678
- "recipient": S.String,
1679
- "recipient_amount": S.String,
1680
- "recipient_currency": S.String,
1681
- "refund_destination": S.String,
1682
- "signature": S.String
1683
- }),
1684
- "metadata": /*#__PURE__*/S.Struct({
1685
- "chain_id": S.Number,
1686
- "contract_address": S.String,
1687
- "sender": S.String
1688
- })
1689
- })
1690
- })
3160
+ /**
3161
+ * Model used for the generation
3162
+ */
3163
+ "model": S.String,
3164
+ /**
3165
+ * ID of the app that made the request
3166
+ */
3167
+ "app_id": /*#__PURE__*/S.NullOr(S.Number),
3168
+ /**
3169
+ * Whether the response was streamed
3170
+ */
3171
+ "streamed": /*#__PURE__*/S.NullOr(S.Boolean),
3172
+ /**
3173
+ * Whether the generation was cancelled
3174
+ */
3175
+ "cancelled": /*#__PURE__*/S.NullOr(S.Boolean),
3176
+ /**
3177
+ * Name of the provider that served the request
3178
+ */
3179
+ "provider_name": /*#__PURE__*/S.NullOr(S.String),
3180
+ /**
3181
+ * Total latency in milliseconds
3182
+ */
3183
+ "latency": /*#__PURE__*/S.NullOr(S.Number),
3184
+ /**
3185
+ * Moderation latency in milliseconds
3186
+ */
3187
+ "moderation_latency": /*#__PURE__*/S.NullOr(S.Number),
3188
+ /**
3189
+ * Time taken for generation in milliseconds
3190
+ */
3191
+ "generation_time": /*#__PURE__*/S.NullOr(S.Number),
3192
+ /**
3193
+ * Reason the generation finished
3194
+ */
3195
+ "finish_reason": /*#__PURE__*/S.NullOr(S.String),
3196
+ /**
3197
+ * Number of tokens in the prompt
3198
+ */
3199
+ "tokens_prompt": /*#__PURE__*/S.NullOr(S.Number),
3200
+ /**
3201
+ * Number of tokens in the completion
3202
+ */
3203
+ "tokens_completion": /*#__PURE__*/S.NullOr(S.Number),
3204
+ /**
3205
+ * Native prompt tokens as reported by provider
3206
+ */
3207
+ "native_tokens_prompt": /*#__PURE__*/S.NullOr(S.Number),
3208
+ /**
3209
+ * Native completion tokens as reported by provider
3210
+ */
3211
+ "native_tokens_completion": /*#__PURE__*/S.NullOr(S.Number),
3212
+ /**
3213
+ * Native completion image tokens as reported by provider
3214
+ */
3215
+ "native_tokens_completion_images": /*#__PURE__*/S.NullOr(S.Number),
3216
+ /**
3217
+ * Native reasoning tokens as reported by provider
3218
+ */
3219
+ "native_tokens_reasoning": /*#__PURE__*/S.NullOr(S.Number),
3220
+ /**
3221
+ * Native cached tokens as reported by provider
3222
+ */
3223
+ "native_tokens_cached": /*#__PURE__*/S.NullOr(S.Number),
3224
+ /**
3225
+ * Number of media items in the prompt
3226
+ */
3227
+ "num_media_prompt": /*#__PURE__*/S.NullOr(S.Number),
3228
+ /**
3229
+ * Number of audio inputs in the prompt
3230
+ */
3231
+ "num_input_audio_prompt": /*#__PURE__*/S.NullOr(S.Number),
3232
+ /**
3233
+ * Number of media items in the completion
3234
+ */
3235
+ "num_media_completion": /*#__PURE__*/S.NullOr(S.Number),
3236
+ /**
3237
+ * Number of search results included
3238
+ */
3239
+ "num_search_results": /*#__PURE__*/S.NullOr(S.Number),
3240
+ /**
3241
+ * Origin URL of the request
3242
+ */
3243
+ "origin": S.String,
3244
+ /**
3245
+ * Usage amount in USD
3246
+ */
3247
+ "usage": S.Number,
3248
+ /**
3249
+ * Whether this used bring-your-own-key
3250
+ */
3251
+ "is_byok": S.Boolean,
3252
+ /**
3253
+ * Native finish reason as reported by provider
3254
+ */
3255
+ "native_finish_reason": /*#__PURE__*/S.NullOr(S.String),
3256
+ /**
3257
+ * External user identifier
3258
+ */
3259
+ "external_user": /*#__PURE__*/S.NullOr(S.String),
3260
+ /**
3261
+ * Type of API used for the generation
3262
+ */
3263
+ "api_type": /*#__PURE__*/S.NullOr(GetGeneration200DataApiType),
3264
+ /**
3265
+ * Router used for the request (e.g., openrouter/auto)
3266
+ */
3267
+ "router": /*#__PURE__*/S.NullOr(S.String)
1691
3268
  })
1692
3269
  }) {}
1693
- exports.CreateCoinbaseCharge200 = CreateCoinbaseCharge200;
1694
- class CreateEmbeddingsRequestEncodingFormat extends /*#__PURE__*/S.Literal("float", "base64") {}
1695
- /**
1696
- * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
1697
- */
1698
- exports.CreateEmbeddingsRequestEncodingFormat = CreateEmbeddingsRequestEncodingFormat;
1699
- class ProviderPreferencesSort extends /*#__PURE__*/S.Literal("price", "throughput", "latency") {}
1700
3270
  /**
1701
- * Provider routing preferences for the request.
3271
+ * Model count data
1702
3272
  */
1703
- exports.ProviderPreferencesSort = ProviderPreferencesSort;
1704
- class ProviderPreferences extends /*#__PURE__*/S.Class("ProviderPreferences")({
1705
- /**
1706
- * Whether to allow backup providers to serve requests
1707
- * - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
1708
- * - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
1709
- */
1710
- "allow_fallbacks": /*#__PURE__*/S.optionalWith(S.Boolean, {
1711
- nullable: true
1712
- }),
1713
- /**
1714
- * Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
1715
- */
1716
- "require_parameters": /*#__PURE__*/S.optionalWith(S.Boolean, {
1717
- nullable: true
1718
- }),
1719
- "data_collection": /*#__PURE__*/S.optionalWith(DataCollection, {
1720
- nullable: true
1721
- }),
1722
- /**
1723
- * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
1724
- */
1725
- "zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
1726
- nullable: true
1727
- }),
1728
- /**
1729
- * Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
1730
- */
1731
- "enforce_distillable_text": /*#__PURE__*/S.optionalWith(S.Boolean, {
1732
- nullable: true
1733
- }),
1734
- /**
1735
- * An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
1736
- */
1737
- "order": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
1738
- nullable: true
1739
- }),
1740
- /**
1741
- * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
1742
- */
1743
- "only": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
1744
- nullable: true
1745
- }),
1746
- /**
1747
- * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
1748
- */
1749
- "ignore": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
1750
- nullable: true
1751
- }),
1752
- /**
1753
- * A list of quantization levels to filter the provider by.
1754
- */
1755
- "quantizations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(Quantization), {
1756
- nullable: true
1757
- }),
1758
- "sort": /*#__PURE__*/S.optionalWith(ProviderPreferencesSort, {
1759
- nullable: true
1760
- }),
1761
- /**
1762
- * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
1763
- */
1764
- "max_price": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1765
- "prompt": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1766
- nullable: true
1767
- }),
1768
- "completion": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1769
- nullable: true
1770
- }),
1771
- "image": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1772
- nullable: true
1773
- }),
1774
- "audio": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1775
- nullable: true
1776
- }),
1777
- "request": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1778
- nullable: true
1779
- })
1780
- }), {
1781
- nullable: true
1782
- }),
1783
- /**
1784
- * Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
1785
- */
1786
- "preferred_min_throughput": /*#__PURE__*/S.optionalWith(S.Number, {
1787
- nullable: true
1788
- }),
1789
- /**
1790
- * Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
1791
- */
1792
- "preferred_max_latency": /*#__PURE__*/S.optionalWith(S.Number, {
1793
- nullable: true
1794
- }),
1795
- /**
1796
- * **DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput.
1797
- */
1798
- "min_throughput": /*#__PURE__*/S.optionalWith(S.Number, {
1799
- nullable: true
1800
- }),
3273
+ exports.GetGeneration200 = GetGeneration200;
3274
+ class ModelsCountResponse extends /*#__PURE__*/S.Class("ModelsCountResponse")({
1801
3275
  /**
1802
- * **DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency.
3276
+ * Model count data
1803
3277
  */
1804
- "max_latency": /*#__PURE__*/S.optionalWith(S.Number, {
1805
- nullable: true
1806
- })
1807
- }) {}
1808
- exports.ProviderPreferences = ProviderPreferences;
1809
- class CreateEmbeddingsRequest extends /*#__PURE__*/S.Class("CreateEmbeddingsRequest")({
1810
- "input": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(S.String), /*#__PURE__*/S.Array(S.Number), /*#__PURE__*/S.Array(/*#__PURE__*/S.Array(S.Number)), /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
1811
- "content": /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1812
- "type": /*#__PURE__*/S.Literal("text"),
1813
- "text": S.String
1814
- }), /*#__PURE__*/S.Struct({
1815
- "type": /*#__PURE__*/S.Literal("image_url"),
1816
- "image_url": /*#__PURE__*/S.Struct({
1817
- "url": S.String
1818
- })
1819
- })))
1820
- }))),
1821
- "model": S.String,
1822
- "encoding_format": /*#__PURE__*/S.optionalWith(CreateEmbeddingsRequestEncodingFormat, {
1823
- nullable: true
1824
- }),
1825
- "dimensions": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThan(0)), {
1826
- nullable: true
1827
- }),
1828
- "user": /*#__PURE__*/S.optionalWith(S.String, {
1829
- nullable: true
1830
- }),
1831
- "provider": /*#__PURE__*/S.optionalWith(ProviderPreferences, {
1832
- nullable: true
1833
- }),
1834
- "input_type": /*#__PURE__*/S.optionalWith(S.String, {
1835
- nullable: true
1836
- })
1837
- }) {}
1838
- exports.CreateEmbeddingsRequest = CreateEmbeddingsRequest;
1839
- class CreateEmbeddings200Object extends /*#__PURE__*/S.Literal("list") {}
1840
- exports.CreateEmbeddings200Object = CreateEmbeddings200Object;
1841
- class CreateEmbeddings200 extends /*#__PURE__*/S.Struct({
1842
- "id": /*#__PURE__*/S.optionalWith(S.String, {
1843
- nullable: true
1844
- }),
1845
- "object": CreateEmbeddings200Object,
1846
- "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
1847
- "object": /*#__PURE__*/S.Literal("embedding"),
1848
- "embedding": /*#__PURE__*/S.Union(/*#__PURE__*/S.Array(S.Number), S.String),
1849
- "index": /*#__PURE__*/S.optionalWith(S.Number, {
1850
- nullable: true
1851
- })
1852
- })),
1853
- "model": S.String,
1854
- "usage": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1855
- "prompt_tokens": S.Number,
1856
- "total_tokens": S.Number,
1857
- "cost": /*#__PURE__*/S.optionalWith(S.Number, {
1858
- nullable: true
1859
- })
1860
- }), {
1861
- nullable: true
3278
+ "data": /*#__PURE__*/S.Struct({
3279
+ /**
3280
+ * Total number of available models
3281
+ */
3282
+ "count": S.Number
1862
3283
  })
1863
3284
  }) {}
1864
3285
  /**
1865
- * Pricing information for the model
3286
+ * Filter models by use case category
1866
3287
  */
1867
- exports.CreateEmbeddings200 = CreateEmbeddings200;
1868
- class PublicPricing extends /*#__PURE__*/S.Class("PublicPricing")({
1869
- "prompt": BigNumberUnion,
1870
- "completion": BigNumberUnion,
1871
- "request": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1872
- nullable: true
1873
- }),
1874
- "image": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1875
- nullable: true
1876
- }),
1877
- "image_token": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1878
- nullable: true
1879
- }),
1880
- "image_output": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1881
- nullable: true
1882
- }),
1883
- "audio": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1884
- nullable: true
1885
- }),
1886
- "input_audio_cache": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1887
- nullable: true
1888
- }),
1889
- "web_search": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1890
- nullable: true
1891
- }),
1892
- "internal_reasoning": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1893
- nullable: true
1894
- }),
1895
- "input_cache_read": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1896
- nullable: true
1897
- }),
1898
- "input_cache_write": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
3288
+ exports.ModelsCountResponse = ModelsCountResponse;
3289
+ class GetModelsParamsCategory extends /*#__PURE__*/S.Literal("programming", "roleplay", "marketing", "marketing/seo", "technology", "science", "translation", "legal", "finance", "health", "trivia", "academia") {}
3290
+ exports.GetModelsParamsCategory = GetModelsParamsCategory;
3291
+ class GetModelsParams extends /*#__PURE__*/S.Struct({
3292
+ /**
3293
+ * Filter models by use case category
3294
+ */
3295
+ "category": /*#__PURE__*/S.optionalWith(GetModelsParamsCategory, {
1899
3296
  nullable: true
1900
3297
  }),
1901
- "discount": /*#__PURE__*/S.optionalWith(S.Number, {
3298
+ "supported_parameters": /*#__PURE__*/S.optionalWith(S.String, {
1902
3299
  nullable: true
1903
3300
  })
1904
3301
  }) {}
1905
- /**
1906
- * Tokenizer type used by the model
1907
- */
1908
- exports.PublicPricing = PublicPricing;
1909
- class ModelGroup extends /*#__PURE__*/S.Literal("Router", "Media", "Other", "GPT", "Claude", "Gemini", "Grok", "Cohere", "Nova", "Qwen", "Yi", "DeepSeek", "Mistral", "Llama2", "Llama3", "Llama4", "PaLM", "RWKV", "Qwen3") {}
1910
3302
  /**
1911
3303
  * Instruction format type
1912
3304
  */
1913
- exports.ModelGroup = ModelGroup;
1914
- class ModelArchitectureInstructType extends /*#__PURE__*/S.Literal("none", "airoboros", "alpaca", "alpaca-modif", "chatml", "claude", "code-llama", "gemma", "llama2", "llama3", "mistral", "nemotron", "neural", "openchat", "phi3", "rwkv", "vicuna", "zephyr", "deepseek-r1", "deepseek-v3.1", "qwq", "qwen3") {}
1915
- exports.ModelArchitectureInstructType = ModelArchitectureInstructType;
1916
- class InputModality extends /*#__PURE__*/S.Literal("text", "image", "file", "audio", "video") {}
1917
- exports.InputModality = InputModality;
1918
- class OutputModality extends /*#__PURE__*/S.Literal("text", "image", "embeddings") {}
3305
+ exports.GetModelsParams = GetModelsParams;
3306
+ class ListEndpointsResponseArchitectureEnumInstructType extends /*#__PURE__*/S.Literal("none", "airoboros", "alpaca", "alpaca-modif", "chatml", "claude", "code-llama", "gemma", "llama2", "llama3", "mistral", "nemotron", "neural", "openchat", "phi3", "rwkv", "vicuna", "zephyr", "deepseek-r1", "deepseek-v3.1", "qwq", "qwen3") {}
1919
3307
  /**
1920
3308
  * Model architecture information
1921
3309
  */
1922
- exports.OutputModality = OutputModality;
1923
- class ModelArchitecture extends /*#__PURE__*/S.Class("ModelArchitecture")({
1924
- "tokenizer": /*#__PURE__*/S.optionalWith(ModelGroup, {
1925
- nullable: true
1926
- }),
3310
+ exports.ListEndpointsResponseArchitectureEnumInstructType = ListEndpointsResponseArchitectureEnumInstructType;
3311
+ class ListEndpointsResponseArchitecture extends /*#__PURE__*/S.Struct({
3312
+ "tokenizer": ModelGroup,
1927
3313
  /**
1928
- * Instruction format type
1929
- */
1930
- "instruct_type": /*#__PURE__*/S.optionalWith(ModelArchitectureInstructType, {
1931
- nullable: true
1932
- }),
3314
+ * Instruction format type
3315
+ */
3316
+ "instruct_type": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Literal("none", "airoboros", "alpaca", "alpaca-modif", "chatml", "claude", "code-llama", "gemma", "llama2", "llama3", "mistral", "nemotron", "neural", "openchat", "phi3", "rwkv", "vicuna", "zephyr", "deepseek-r1", "deepseek-v3.1", "qwq", "qwen3")),
1933
3317
  /**
1934
3318
  * Primary modality of the model
1935
3319
  */
@@ -1943,78 +3327,131 @@ class ModelArchitecture extends /*#__PURE__*/S.Class("ModelArchitecture")({
1943
3327
  */
1944
3328
  "output_modalities": /*#__PURE__*/S.Array(OutputModality)
1945
3329
  }) {}
3330
+ exports.ListEndpointsResponseArchitecture = ListEndpointsResponseArchitecture;
3331
+ class PublicEndpointQuantizationEnum extends /*#__PURE__*/S.Literal("int4", "int8", "fp4", "fp6", "fp8", "fp16", "bf16", "fp32", "unknown") {}
3332
+ exports.PublicEndpointQuantizationEnum = PublicEndpointQuantizationEnum;
3333
+ class PublicEndpointQuantization extends PublicEndpointQuantizationEnum {}
3334
+ exports.PublicEndpointQuantization = PublicEndpointQuantization;
3335
+ class EndpointStatus extends /*#__PURE__*/S.Literal(0, -1, -2, -3, -5, -10) {}
1946
3336
  /**
1947
- * Information about the top provider for this model
3337
+ * Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.
1948
3338
  */
1949
- exports.ModelArchitecture = ModelArchitecture;
1950
- class TopProviderInfo extends /*#__PURE__*/S.Class("TopProviderInfo")({
3339
+ exports.EndpointStatus = EndpointStatus;
3340
+ class PercentileStats extends /*#__PURE__*/S.Class("PercentileStats")({
1951
3341
  /**
1952
- * Context length from the top provider
3342
+ * Median (50th percentile)
1953
3343
  */
1954
- "context_length": /*#__PURE__*/S.optionalWith(S.Number, {
1955
- nullable: true
1956
- }),
3344
+ "p50": S.Number,
1957
3345
  /**
1958
- * Maximum completion tokens from the top provider
3346
+ * 75th percentile
1959
3347
  */
1960
- "max_completion_tokens": /*#__PURE__*/S.optionalWith(S.Number, {
1961
- nullable: true
1962
- }),
3348
+ "p75": S.Number,
1963
3349
  /**
1964
- * Whether the top provider moderates content
3350
+ * 90th percentile
1965
3351
  */
1966
- "is_moderated": S.Boolean
3352
+ "p90": S.Number,
3353
+ /**
3354
+ * 99th percentile
3355
+ */
3356
+ "p99": S.Number
1967
3357
  }) {}
1968
3358
  /**
1969
- * Per-request token limits
3359
+ * Throughput percentiles in tokens per second over the last 30 minutes. Throughput measures output token generation speed. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.
1970
3360
  */
1971
- exports.TopProviderInfo = TopProviderInfo;
1972
- class PerRequestLimits extends /*#__PURE__*/S.Class("PerRequestLimits")({
3361
+ exports.PercentileStats = PercentileStats;
3362
+ class PublicEndpointThroughputLast30M extends /*#__PURE__*/S.Struct({
1973
3363
  /**
1974
- * Maximum prompt tokens per request
3364
+ * Median (50th percentile)
1975
3365
  */
1976
- "prompt_tokens": S.Number,
3366
+ "p50": S.Number,
1977
3367
  /**
1978
- * Maximum completion tokens per request
3368
+ * 75th percentile
1979
3369
  */
1980
- "completion_tokens": S.Number
3370
+ "p75": S.Number,
3371
+ /**
3372
+ * 90th percentile
3373
+ */
3374
+ "p90": S.Number,
3375
+ /**
3376
+ * 99th percentile
3377
+ */
3378
+ "p99": S.Number
1981
3379
  }) {}
1982
- exports.PerRequestLimits = PerRequestLimits;
1983
- class Parameter extends /*#__PURE__*/S.Literal("temperature", "top_p", "top_k", "min_p", "top_a", "frequency_penalty", "presence_penalty", "repetition_penalty", "max_tokens", "logit_bias", "logprobs", "top_logprobs", "seed", "response_format", "structured_outputs", "stop", "tools", "tool_choice", "parallel_tool_calls", "include_reasoning", "reasoning", "reasoning_effort", "web_search_options", "verbosity") {}
1984
3380
  /**
1985
- * Default parameters for this model
3381
+ * Information about a specific model endpoint
1986
3382
  */
1987
- exports.Parameter = Parameter;
1988
- class DefaultParameters extends /*#__PURE__*/S.Class("DefaultParameters")({
1989
- "temperature": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(2)), {
1990
- nullable: true
3383
+ exports.PublicEndpointThroughputLast30M = PublicEndpointThroughputLast30M;
3384
+ class PublicEndpoint extends /*#__PURE__*/S.Class("PublicEndpoint")({
3385
+ "name": S.String,
3386
+ /**
3387
+ * The unique identifier for the model (permaslug)
3388
+ */
3389
+ "model_id": S.String,
3390
+ "model_name": S.String,
3391
+ "context_length": S.Number,
3392
+ "pricing": /*#__PURE__*/S.Struct({
3393
+ "prompt": BigNumberUnion,
3394
+ "completion": BigNumberUnion,
3395
+ "request": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
3396
+ nullable: true
3397
+ }),
3398
+ "image": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
3399
+ nullable: true
3400
+ }),
3401
+ "image_token": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
3402
+ nullable: true
3403
+ }),
3404
+ "image_output": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
3405
+ nullable: true
3406
+ }),
3407
+ "audio": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
3408
+ nullable: true
3409
+ }),
3410
+ "audio_output": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
3411
+ nullable: true
3412
+ }),
3413
+ "input_audio_cache": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
3414
+ nullable: true
3415
+ }),
3416
+ "web_search": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
3417
+ nullable: true
3418
+ }),
3419
+ "internal_reasoning": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
3420
+ nullable: true
3421
+ }),
3422
+ "input_cache_read": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
3423
+ nullable: true
3424
+ }),
3425
+ "input_cache_write": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
3426
+ nullable: true
3427
+ }),
3428
+ "discount": /*#__PURE__*/S.optionalWith(S.Number, {
3429
+ nullable: true
3430
+ })
1991
3431
  }),
1992
- "top_p": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(1)), {
3432
+ "provider_name": ProviderName,
3433
+ "tag": S.String,
3434
+ "quantization": PublicEndpointQuantization,
3435
+ "max_completion_tokens": /*#__PURE__*/S.NullOr(S.Number),
3436
+ "max_prompt_tokens": /*#__PURE__*/S.NullOr(S.Number),
3437
+ "supported_parameters": /*#__PURE__*/S.Array(Parameter),
3438
+ "status": /*#__PURE__*/S.optionalWith(EndpointStatus, {
1993
3439
  nullable: true
1994
3440
  }),
1995
- "frequency_penalty": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(-2), /*#__PURE__*/S.lessThanOrEqualTo(2)), {
1996
- nullable: true
1997
- })
3441
+ "uptime_last_30m": /*#__PURE__*/S.NullOr(S.Number),
3442
+ "supports_implicit_caching": S.Boolean,
3443
+ "latency_last_30m": /*#__PURE__*/S.NullOr(PercentileStats),
3444
+ "throughput_last_30m": PublicEndpointThroughputLast30M
1998
3445
  }) {}
1999
3446
  /**
2000
- * Information about an AI model available on OpenRouter
3447
+ * List of available endpoints for a model
2001
3448
  */
2002
- exports.DefaultParameters = DefaultParameters;
2003
- class Model extends /*#__PURE__*/S.Class("Model")({
3449
+ exports.PublicEndpoint = PublicEndpoint;
3450
+ class ListEndpointsResponse extends /*#__PURE__*/S.Class("ListEndpointsResponse")({
2004
3451
  /**
2005
3452
  * Unique identifier for the model
2006
3453
  */
2007
3454
  "id": S.String,
2008
- /**
2009
- * Canonical slug for the model
2010
- */
2011
- "canonical_slug": S.String,
2012
- /**
2013
- * Hugging Face model identifier, if applicable
2014
- */
2015
- "hugging_face_id": /*#__PURE__*/S.optionalWith(S.String, {
2016
- nullable: true
2017
- }),
2018
3455
  /**
2019
3456
  * Display name of the model
2020
3457
  */
@@ -2026,405 +3463,414 @@ class Model extends /*#__PURE__*/S.Class("Model")({
2026
3463
  /**
2027
3464
  * Description of the model
2028
3465
  */
2029
- "description": /*#__PURE__*/S.optionalWith(S.String, {
2030
- nullable: true
2031
- }),
2032
- "pricing": PublicPricing,
2033
- /**
2034
- * Maximum context length in tokens
2035
- */
2036
- "context_length": /*#__PURE__*/S.NullOr(S.Number),
2037
- "architecture": ModelArchitecture,
2038
- "top_provider": TopProviderInfo,
2039
- "per_request_limits": /*#__PURE__*/S.NullOr(PerRequestLimits),
3466
+ "description": S.String,
3467
+ "architecture": ListEndpointsResponseArchitecture,
2040
3468
  /**
2041
- * List of supported parameters for this model
3469
+ * List of available endpoints for this model
2042
3470
  */
2043
- "supported_parameters": /*#__PURE__*/S.Array(Parameter),
2044
- "default_parameters": /*#__PURE__*/S.NullOr(DefaultParameters)
3471
+ "endpoints": /*#__PURE__*/S.Array(PublicEndpoint)
2045
3472
  }) {}
2046
- /**
2047
- * List of available models
2048
- */
2049
- exports.Model = Model;
2050
- class ModelsListResponseData extends /*#__PURE__*/S.Array(Model) {}
2051
- /**
2052
- * List of available models
2053
- */
2054
- exports.ModelsListResponseData = ModelsListResponseData;
2055
- class ModelsListResponse extends /*#__PURE__*/S.Class("ModelsListResponse")({
2056
- "data": ModelsListResponseData
3473
+ exports.ListEndpointsResponse = ListEndpointsResponse;
3474
+ class ListEndpoints200 extends /*#__PURE__*/S.Struct({
3475
+ "data": ListEndpointsResponse
2057
3476
  }) {}
2058
- exports.ModelsListResponse = ModelsListResponse;
2059
- class GetGenerationParams extends /*#__PURE__*/S.Struct({
2060
- "id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1))
3477
+ exports.ListEndpoints200 = ListEndpoints200;
3478
+ class ListEndpointsZdr200 extends /*#__PURE__*/S.Struct({
3479
+ "data": /*#__PURE__*/S.Array(PublicEndpoint)
2061
3480
  }) {}
2062
- /**
2063
- * Type of API used for the generation
2064
- */
2065
- exports.GetGenerationParams = GetGenerationParams;
2066
- class GetGeneration200DataApiType extends /*#__PURE__*/S.Literal("completions", "embeddings") {}
2067
- /**
2068
- * Generation response
2069
- */
2070
- exports.GetGeneration200DataApiType = GetGeneration200DataApiType;
2071
- class GetGeneration200 extends /*#__PURE__*/S.Struct({
3481
+ exports.ListEndpointsZdr200 = ListEndpointsZdr200;
3482
+ class ListProviders200 extends /*#__PURE__*/S.Struct({
3483
+ "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
3484
+ /**
3485
+ * Display name of the provider
3486
+ */
3487
+ "name": S.String,
3488
+ /**
3489
+ * URL-friendly identifier for the provider
3490
+ */
3491
+ "slug": S.String,
3492
+ /**
3493
+ * URL to the provider's privacy policy
3494
+ */
3495
+ "privacy_policy_url": /*#__PURE__*/S.NullOr(S.String),
3496
+ /**
3497
+ * URL to the provider's terms of service
3498
+ */
3499
+ "terms_of_service_url": /*#__PURE__*/S.optionalWith(S.String, {
3500
+ nullable: true
3501
+ }),
3502
+ /**
3503
+ * URL to the provider's status page
3504
+ */
3505
+ "status_page_url": /*#__PURE__*/S.optionalWith(S.String, {
3506
+ nullable: true
3507
+ })
3508
+ }))
3509
+ }) {}
3510
+ exports.ListProviders200 = ListProviders200;
3511
+ class ListParams extends /*#__PURE__*/S.Struct({
2072
3512
  /**
2073
- * Generation data
3513
+ * Whether to include disabled API keys in the response
2074
3514
  */
2075
- "data": /*#__PURE__*/S.Struct({
3515
+ "include_disabled": /*#__PURE__*/S.optionalWith(S.String, {
3516
+ nullable: true
3517
+ }),
3518
+ /**
3519
+ * Number of API keys to skip for pagination
3520
+ */
3521
+ "offset": /*#__PURE__*/S.optionalWith(S.String, {
3522
+ nullable: true
3523
+ })
3524
+ }) {}
3525
+ exports.ListParams = ListParams;
3526
+ class List200 extends /*#__PURE__*/S.Struct({
3527
+ /**
3528
+ * List of API keys
3529
+ */
3530
+ "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2076
3531
  /**
2077
- * Unique identifier for the generation
3532
+ * Unique hash identifier for the API key
2078
3533
  */
2079
- "id": S.String,
3534
+ "hash": S.String,
2080
3535
  /**
2081
- * Upstream provider's identifier for this generation
3536
+ * Name of the API key
2082
3537
  */
2083
- "upstream_id": /*#__PURE__*/S.NullOr(S.String),
3538
+ "name": S.String,
2084
3539
  /**
2085
- * Total cost of the generation in USD
3540
+ * Human-readable label for the API key
2086
3541
  */
2087
- "total_cost": S.Number,
3542
+ "label": S.String,
2088
3543
  /**
2089
- * Discount applied due to caching
3544
+ * Whether the API key is disabled
2090
3545
  */
2091
- "cache_discount": /*#__PURE__*/S.NullOr(S.Number),
3546
+ "disabled": S.Boolean,
2092
3547
  /**
2093
- * Cost charged by the upstream provider
3548
+ * Spending limit for the API key in USD
2094
3549
  */
2095
- "upstream_inference_cost": /*#__PURE__*/S.NullOr(S.Number),
3550
+ "limit": /*#__PURE__*/S.NullOr(S.Number),
2096
3551
  /**
2097
- * ISO 8601 timestamp of when the generation was created
3552
+ * Remaining spending limit in USD
2098
3553
  */
2099
- "created_at": S.String,
3554
+ "limit_remaining": /*#__PURE__*/S.NullOr(S.Number),
2100
3555
  /**
2101
- * Model used for the generation
3556
+ * Type of limit reset for the API key
2102
3557
  */
2103
- "model": S.String,
3558
+ "limit_reset": /*#__PURE__*/S.NullOr(S.String),
2104
3559
  /**
2105
- * ID of the app that made the request
3560
+ * Whether to include external BYOK usage in the credit limit
2106
3561
  */
2107
- "app_id": /*#__PURE__*/S.NullOr(S.Number),
3562
+ "include_byok_in_limit": S.Boolean,
3563
+ /**
3564
+ * Total OpenRouter credit usage (in USD) for the API key
3565
+ */
3566
+ "usage": S.Number,
3567
+ /**
3568
+ * OpenRouter credit usage (in USD) for the current UTC day
3569
+ */
3570
+ "usage_daily": S.Number,
3571
+ /**
3572
+ * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
3573
+ */
3574
+ "usage_weekly": S.Number,
2108
3575
  /**
2109
- * Whether the response was streamed
3576
+ * OpenRouter credit usage (in USD) for the current UTC month
2110
3577
  */
2111
- "streamed": /*#__PURE__*/S.NullOr(S.Boolean),
3578
+ "usage_monthly": S.Number,
2112
3579
  /**
2113
- * Whether the generation was cancelled
3580
+ * Total external BYOK usage (in USD) for the API key
2114
3581
  */
2115
- "cancelled": /*#__PURE__*/S.NullOr(S.Boolean),
3582
+ "byok_usage": S.Number,
2116
3583
  /**
2117
- * Name of the provider that served the request
3584
+ * External BYOK usage (in USD) for the current UTC day
2118
3585
  */
2119
- "provider_name": /*#__PURE__*/S.NullOr(S.String),
3586
+ "byok_usage_daily": S.Number,
2120
3587
  /**
2121
- * Total latency in milliseconds
3588
+ * External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
2122
3589
  */
2123
- "latency": /*#__PURE__*/S.NullOr(S.Number),
3590
+ "byok_usage_weekly": S.Number,
2124
3591
  /**
2125
- * Moderation latency in milliseconds
3592
+ * External BYOK usage (in USD) for current UTC month
2126
3593
  */
2127
- "moderation_latency": /*#__PURE__*/S.NullOr(S.Number),
3594
+ "byok_usage_monthly": S.Number,
2128
3595
  /**
2129
- * Time taken for generation in milliseconds
3596
+ * ISO 8601 timestamp of when the API key was created
2130
3597
  */
2131
- "generation_time": /*#__PURE__*/S.NullOr(S.Number),
3598
+ "created_at": S.String,
2132
3599
  /**
2133
- * Reason the generation finished
3600
+ * ISO 8601 timestamp of when the API key was last updated
2134
3601
  */
2135
- "finish_reason": /*#__PURE__*/S.NullOr(S.String),
3602
+ "updated_at": /*#__PURE__*/S.NullOr(S.String),
2136
3603
  /**
2137
- * Number of tokens in the prompt
3604
+ * ISO 8601 UTC timestamp when the API key expires, or null if no expiration
2138
3605
  */
2139
- "tokens_prompt": /*#__PURE__*/S.NullOr(S.Number),
3606
+ "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
3607
+ nullable: true
3608
+ })
3609
+ }))
3610
+ }) {}
3611
+ /**
3612
+ * Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
3613
+ */
3614
+ exports.List200 = List200;
3615
+ class CreateKeysRequestLimitReset extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
3616
+ exports.CreateKeysRequestLimitReset = CreateKeysRequestLimitReset;
3617
+ class CreateKeysRequest extends /*#__PURE__*/S.Class("CreateKeysRequest")({
3618
+ /**
3619
+ * Name for the new API key
3620
+ */
3621
+ "name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
3622
+ /**
3623
+ * Optional spending limit for the API key in USD
3624
+ */
3625
+ "limit": /*#__PURE__*/S.optionalWith(S.Number, {
3626
+ nullable: true
3627
+ }),
3628
+ /**
3629
+ * Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
3630
+ */
3631
+ "limit_reset": /*#__PURE__*/S.optionalWith(CreateKeysRequestLimitReset, {
3632
+ nullable: true
3633
+ }),
3634
+ /**
3635
+ * Whether to include BYOK usage in the limit
3636
+ */
3637
+ "include_byok_in_limit": /*#__PURE__*/S.optionalWith(S.Boolean, {
3638
+ nullable: true
3639
+ }),
3640
+ /**
3641
+ * Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected
3642
+ */
3643
+ "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
3644
+ nullable: true
3645
+ })
3646
+ }) {}
3647
+ exports.CreateKeysRequest = CreateKeysRequest;
3648
+ class CreateKeys201 extends /*#__PURE__*/S.Struct({
3649
+ /**
3650
+ * The created API key information
3651
+ */
3652
+ "data": /*#__PURE__*/S.Struct({
2140
3653
  /**
2141
- * Number of tokens in the completion
3654
+ * Unique hash identifier for the API key
2142
3655
  */
2143
- "tokens_completion": /*#__PURE__*/S.NullOr(S.Number),
3656
+ "hash": S.String,
2144
3657
  /**
2145
- * Native prompt tokens as reported by provider
3658
+ * Name of the API key
2146
3659
  */
2147
- "native_tokens_prompt": /*#__PURE__*/S.NullOr(S.Number),
3660
+ "name": S.String,
2148
3661
  /**
2149
- * Native completion tokens as reported by provider
3662
+ * Human-readable label for the API key
2150
3663
  */
2151
- "native_tokens_completion": /*#__PURE__*/S.NullOr(S.Number),
3664
+ "label": S.String,
2152
3665
  /**
2153
- * Native completion image tokens as reported by provider
3666
+ * Whether the API key is disabled
2154
3667
  */
2155
- "native_tokens_completion_images": /*#__PURE__*/S.NullOr(S.Number),
3668
+ "disabled": S.Boolean,
2156
3669
  /**
2157
- * Native reasoning tokens as reported by provider
3670
+ * Spending limit for the API key in USD
2158
3671
  */
2159
- "native_tokens_reasoning": /*#__PURE__*/S.NullOr(S.Number),
3672
+ "limit": /*#__PURE__*/S.NullOr(S.Number),
2160
3673
  /**
2161
- * Native cached tokens as reported by provider
3674
+ * Remaining spending limit in USD
2162
3675
  */
2163
- "native_tokens_cached": /*#__PURE__*/S.NullOr(S.Number),
3676
+ "limit_remaining": /*#__PURE__*/S.NullOr(S.Number),
2164
3677
  /**
2165
- * Number of media items in the prompt
3678
+ * Type of limit reset for the API key
2166
3679
  */
2167
- "num_media_prompt": /*#__PURE__*/S.NullOr(S.Number),
3680
+ "limit_reset": /*#__PURE__*/S.NullOr(S.String),
2168
3681
  /**
2169
- * Number of audio inputs in the prompt
3682
+ * Whether to include external BYOK usage in the credit limit
2170
3683
  */
2171
- "num_input_audio_prompt": /*#__PURE__*/S.NullOr(S.Number),
3684
+ "include_byok_in_limit": S.Boolean,
2172
3685
  /**
2173
- * Number of media items in the completion
3686
+ * Total OpenRouter credit usage (in USD) for the API key
2174
3687
  */
2175
- "num_media_completion": /*#__PURE__*/S.NullOr(S.Number),
3688
+ "usage": S.Number,
2176
3689
  /**
2177
- * Number of search results included
3690
+ * OpenRouter credit usage (in USD) for the current UTC day
2178
3691
  */
2179
- "num_search_results": /*#__PURE__*/S.NullOr(S.Number),
3692
+ "usage_daily": S.Number,
2180
3693
  /**
2181
- * Origin URL of the request
3694
+ * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
2182
3695
  */
2183
- "origin": S.String,
3696
+ "usage_weekly": S.Number,
2184
3697
  /**
2185
- * Usage amount in USD
3698
+ * OpenRouter credit usage (in USD) for the current UTC month
2186
3699
  */
2187
- "usage": S.Number,
3700
+ "usage_monthly": S.Number,
2188
3701
  /**
2189
- * Whether this used bring-your-own-key
3702
+ * Total external BYOK usage (in USD) for the API key
2190
3703
  */
2191
- "is_byok": S.Boolean,
3704
+ "byok_usage": S.Number,
2192
3705
  /**
2193
- * Native finish reason as reported by provider
3706
+ * External BYOK usage (in USD) for the current UTC day
2194
3707
  */
2195
- "native_finish_reason": /*#__PURE__*/S.NullOr(S.String),
3708
+ "byok_usage_daily": S.Number,
2196
3709
  /**
2197
- * External user identifier
3710
+ * External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
2198
3711
  */
2199
- "external_user": /*#__PURE__*/S.NullOr(S.String),
3712
+ "byok_usage_weekly": S.Number,
2200
3713
  /**
2201
- * Type of API used for the generation
3714
+ * External BYOK usage (in USD) for current UTC month
2202
3715
  */
2203
- "api_type": /*#__PURE__*/S.NullOr(GetGeneration200DataApiType)
2204
- })
2205
- }) {}
2206
- /**
2207
- * Model count data
2208
- */
2209
- exports.GetGeneration200 = GetGeneration200;
2210
- class ModelsCountResponse extends /*#__PURE__*/S.Class("ModelsCountResponse")({
2211
- /**
2212
- * Model count data
2213
- */
2214
- "data": /*#__PURE__*/S.Struct({
3716
+ "byok_usage_monthly": S.Number,
2215
3717
  /**
2216
- * Total number of available models
3718
+ * ISO 8601 timestamp of when the API key was created
2217
3719
  */
2218
- "count": S.Number
2219
- })
2220
- }) {}
2221
- exports.ModelsCountResponse = ModelsCountResponse;
2222
- class GetModelsParams extends /*#__PURE__*/S.Struct({
2223
- "category": /*#__PURE__*/S.optionalWith(S.String, {
2224
- nullable: true
2225
- }),
2226
- "supported_parameters": /*#__PURE__*/S.optionalWith(S.String, {
2227
- nullable: true
2228
- })
2229
- }) {}
2230
- /**
2231
- * Instruction format type
2232
- */
2233
- exports.GetModelsParams = GetModelsParams;
2234
- class ListEndpointsResponseArchitectureEnumInstructType extends /*#__PURE__*/S.Literal("none", "airoboros", "alpaca", "alpaca-modif", "chatml", "claude", "code-llama", "gemma", "llama2", "llama3", "mistral", "nemotron", "neural", "openchat", "phi3", "rwkv", "vicuna", "zephyr", "deepseek-r1", "deepseek-v3.1", "qwq", "qwen3") {}
2235
- /**
2236
- * Model architecture information
2237
- */
2238
- exports.ListEndpointsResponseArchitectureEnumInstructType = ListEndpointsResponseArchitectureEnumInstructType;
2239
- class ListEndpointsResponseArchitecture extends /*#__PURE__*/S.Struct({
2240
- "tokenizer": ModelGroup,
2241
- /**
2242
- * Instruction format type
2243
- */
2244
- "instruct_type": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Literal("none", "airoboros", "alpaca", "alpaca-modif", "chatml", "claude", "code-llama", "gemma", "llama2", "llama3", "mistral", "nemotron", "neural", "openchat", "phi3", "rwkv", "vicuna", "zephyr", "deepseek-r1", "deepseek-v3.1", "qwq", "qwen3")),
2245
- /**
2246
- * Primary modality of the model
2247
- */
2248
- "modality": /*#__PURE__*/S.NullOr(S.String),
2249
- /**
2250
- * Supported input modalities
2251
- */
2252
- "input_modalities": /*#__PURE__*/S.Array(InputModality),
2253
- /**
2254
- * Supported output modalities
2255
- */
2256
- "output_modalities": /*#__PURE__*/S.Array(OutputModality)
2257
- }) {}
2258
- exports.ListEndpointsResponseArchitecture = ListEndpointsResponseArchitecture;
2259
- class PublicEndpointQuantizationEnum extends /*#__PURE__*/S.Literal("int4", "int8", "fp4", "fp6", "fp8", "fp16", "bf16", "fp32", "unknown") {}
2260
- exports.PublicEndpointQuantizationEnum = PublicEndpointQuantizationEnum;
2261
- class PublicEndpointQuantization extends PublicEndpointQuantizationEnum {}
2262
- exports.PublicEndpointQuantization = PublicEndpointQuantization;
2263
- class EndpointStatus extends /*#__PURE__*/S.Literal(0, -1, -2, -3, -5, -10) {}
2264
- /**
2265
- * Information about a specific model endpoint
2266
- */
2267
- exports.EndpointStatus = EndpointStatus;
2268
- class PublicEndpoint extends /*#__PURE__*/S.Class("PublicEndpoint")({
2269
- "name": S.String,
2270
- "model_name": S.String,
2271
- "context_length": S.Number,
2272
- "pricing": /*#__PURE__*/S.Struct({
2273
- "prompt": BigNumberUnion,
2274
- "completion": BigNumberUnion,
2275
- "request": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2276
- nullable: true
2277
- }),
2278
- "image": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2279
- nullable: true
2280
- }),
2281
- "image_token": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2282
- nullable: true
2283
- }),
2284
- "image_output": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2285
- nullable: true
2286
- }),
2287
- "audio": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2288
- nullable: true
2289
- }),
2290
- "input_audio_cache": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2291
- nullable: true
2292
- }),
2293
- "web_search": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2294
- nullable: true
2295
- }),
2296
- "internal_reasoning": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2297
- nullable: true
2298
- }),
2299
- "input_cache_read": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2300
- nullable: true
2301
- }),
2302
- "input_cache_write": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2303
- nullable: true
2304
- }),
2305
- "discount": /*#__PURE__*/S.optionalWith(S.Number, {
2306
- nullable: true
2307
- })
2308
- }),
2309
- "provider_name": ProviderName,
2310
- "tag": S.String,
2311
- "quantization": PublicEndpointQuantization,
2312
- "max_completion_tokens": /*#__PURE__*/S.NullOr(S.Number),
2313
- "max_prompt_tokens": /*#__PURE__*/S.NullOr(S.Number),
2314
- "supported_parameters": /*#__PURE__*/S.Array(Parameter),
2315
- "status": /*#__PURE__*/S.optionalWith(EndpointStatus, {
2316
- nullable: true
3720
+ "created_at": S.String,
3721
+ /**
3722
+ * ISO 8601 timestamp of when the API key was last updated
3723
+ */
3724
+ "updated_at": /*#__PURE__*/S.NullOr(S.String),
3725
+ /**
3726
+ * ISO 8601 UTC timestamp when the API key expires, or null if no expiration
3727
+ */
3728
+ "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
3729
+ nullable: true
3730
+ })
2317
3731
  }),
2318
- "uptime_last_30m": /*#__PURE__*/S.NullOr(S.Number),
2319
- "supports_implicit_caching": S.Boolean
2320
- }) {}
2321
- /**
2322
- * List of available endpoints for a model
2323
- */
2324
- exports.PublicEndpoint = PublicEndpoint;
2325
- class ListEndpointsResponse extends /*#__PURE__*/S.Class("ListEndpointsResponse")({
2326
- /**
2327
- * Unique identifier for the model
2328
- */
2329
- "id": S.String,
2330
- /**
2331
- * Display name of the model
2332
- */
2333
- "name": S.String,
2334
- /**
2335
- * Unix timestamp of when the model was created
2336
- */
2337
- "created": S.Number,
2338
- /**
2339
- * Description of the model
2340
- */
2341
- "description": S.String,
2342
- "architecture": ListEndpointsResponseArchitecture,
2343
3732
  /**
2344
- * List of available endpoints for this model
3733
+ * The actual API key string (only shown once)
2345
3734
  */
2346
- "endpoints": /*#__PURE__*/S.Array(PublicEndpoint)
2347
- }) {}
2348
- exports.ListEndpointsResponse = ListEndpointsResponse;
2349
- class ListEndpoints200 extends /*#__PURE__*/S.Struct({
2350
- "data": ListEndpointsResponse
2351
- }) {}
2352
- exports.ListEndpoints200 = ListEndpoints200;
2353
- class ListEndpointsZdr200 extends /*#__PURE__*/S.Struct({
2354
- "data": /*#__PURE__*/S.Array(PublicEndpoint)
2355
- }) {}
2356
- exports.ListEndpointsZdr200 = ListEndpointsZdr200;
2357
- class GetParametersParams extends /*#__PURE__*/S.Struct({
2358
- "provider": /*#__PURE__*/S.optionalWith(ProviderName, {
2359
- nullable: true
2360
- })
3735
+ "key": S.String
2361
3736
  }) {}
2362
- exports.GetParametersParams = GetParametersParams;
2363
- class GetParameters200 extends /*#__PURE__*/S.Struct({
3737
+ exports.CreateKeys201 = CreateKeys201;
3738
+ class GetKey200 extends /*#__PURE__*/S.Struct({
2364
3739
  /**
2365
- * Parameter analytics data
3740
+ * The API key information
2366
3741
  */
2367
3742
  "data": /*#__PURE__*/S.Struct({
2368
3743
  /**
2369
- * Model identifier
3744
+ * Unique hash identifier for the API key
2370
3745
  */
2371
- "model": S.String,
3746
+ "hash": S.String,
2372
3747
  /**
2373
- * List of parameters supported by this model
3748
+ * Name of the API key
2374
3749
  */
2375
- "supported_parameters": /*#__PURE__*/S.Array(/*#__PURE__*/S.Literal("temperature", "top_p", "top_k", "min_p", "top_a", "frequency_penalty", "presence_penalty", "repetition_penalty", "max_tokens", "logit_bias", "logprobs", "top_logprobs", "seed", "response_format", "structured_outputs", "stop", "tools", "tool_choice", "parallel_tool_calls", "include_reasoning", "reasoning", "reasoning_effort", "web_search_options", "verbosity"))
2376
- })
2377
- }) {}
2378
- exports.GetParameters200 = GetParameters200;
2379
- class ListProviders200 extends /*#__PURE__*/S.Struct({
2380
- "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
3750
+ "name": S.String,
2381
3751
  /**
2382
- * Display name of the provider
3752
+ * Human-readable label for the API key
2383
3753
  */
2384
- "name": S.String,
3754
+ "label": S.String,
2385
3755
  /**
2386
- * URL-friendly identifier for the provider
3756
+ * Whether the API key is disabled
2387
3757
  */
2388
- "slug": S.String,
3758
+ "disabled": S.Boolean,
2389
3759
  /**
2390
- * URL to the provider's privacy policy
3760
+ * Spending limit for the API key in USD
2391
3761
  */
2392
- "privacy_policy_url": /*#__PURE__*/S.NullOr(S.String),
3762
+ "limit": /*#__PURE__*/S.NullOr(S.Number),
2393
3763
  /**
2394
- * URL to the provider's terms of service
3764
+ * Remaining spending limit in USD
2395
3765
  */
2396
- "terms_of_service_url": /*#__PURE__*/S.optionalWith(S.String, {
2397
- nullable: true
2398
- }),
3766
+ "limit_remaining": /*#__PURE__*/S.NullOr(S.Number),
2399
3767
  /**
2400
- * URL to the provider's status page
3768
+ * Type of limit reset for the API key
2401
3769
  */
2402
- "status_page_url": /*#__PURE__*/S.optionalWith(S.String, {
3770
+ "limit_reset": /*#__PURE__*/S.NullOr(S.String),
3771
+ /**
3772
+ * Whether to include external BYOK usage in the credit limit
3773
+ */
3774
+ "include_byok_in_limit": S.Boolean,
3775
+ /**
3776
+ * Total OpenRouter credit usage (in USD) for the API key
3777
+ */
3778
+ "usage": S.Number,
3779
+ /**
3780
+ * OpenRouter credit usage (in USD) for the current UTC day
3781
+ */
3782
+ "usage_daily": S.Number,
3783
+ /**
3784
+ * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
3785
+ */
3786
+ "usage_weekly": S.Number,
3787
+ /**
3788
+ * OpenRouter credit usage (in USD) for the current UTC month
3789
+ */
3790
+ "usage_monthly": S.Number,
3791
+ /**
3792
+ * Total external BYOK usage (in USD) for the API key
3793
+ */
3794
+ "byok_usage": S.Number,
3795
+ /**
3796
+ * External BYOK usage (in USD) for the current UTC day
3797
+ */
3798
+ "byok_usage_daily": S.Number,
3799
+ /**
3800
+ * External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
3801
+ */
3802
+ "byok_usage_weekly": S.Number,
3803
+ /**
3804
+ * External BYOK usage (in USD) for current UTC month
3805
+ */
3806
+ "byok_usage_monthly": S.Number,
3807
+ /**
3808
+ * ISO 8601 timestamp of when the API key was created
3809
+ */
3810
+ "created_at": S.String,
3811
+ /**
3812
+ * ISO 8601 timestamp of when the API key was last updated
3813
+ */
3814
+ "updated_at": /*#__PURE__*/S.NullOr(S.String),
3815
+ /**
3816
+ * ISO 8601 UTC timestamp when the API key expires, or null if no expiration
3817
+ */
3818
+ "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
2403
3819
  nullable: true
2404
3820
  })
2405
- }))
3821
+ })
2406
3822
  }) {}
2407
- exports.ListProviders200 = ListProviders200;
2408
- class ListParams extends /*#__PURE__*/S.Struct({
3823
+ exports.GetKey200 = GetKey200;
3824
+ class DeleteKeys200 extends /*#__PURE__*/S.Struct({
2409
3825
  /**
2410
- * Whether to include disabled API keys in the response
3826
+ * Confirmation that the API key was deleted
2411
3827
  */
2412
- "include_disabled": /*#__PURE__*/S.optionalWith(S.String, {
3828
+ "deleted": /*#__PURE__*/S.Literal(true)
3829
+ }) {}
3830
+ /**
3831
+ * New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
3832
+ */
3833
+ exports.DeleteKeys200 = DeleteKeys200;
3834
+ class UpdateKeysRequestLimitReset extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
3835
+ exports.UpdateKeysRequestLimitReset = UpdateKeysRequestLimitReset;
3836
+ class UpdateKeysRequest extends /*#__PURE__*/S.Class("UpdateKeysRequest")({
3837
+ /**
3838
+ * New name for the API key
3839
+ */
3840
+ "name": /*#__PURE__*/S.optionalWith(S.String, {
2413
3841
  nullable: true
2414
3842
  }),
2415
3843
  /**
2416
- * Number of API keys to skip for pagination
3844
+ * Whether to disable the API key
2417
3845
  */
2418
- "offset": /*#__PURE__*/S.optionalWith(S.String, {
3846
+ "disabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
3847
+ nullable: true
3848
+ }),
3849
+ /**
3850
+ * New spending limit for the API key in USD
3851
+ */
3852
+ "limit": /*#__PURE__*/S.optionalWith(S.Number, {
3853
+ nullable: true
3854
+ }),
3855
+ /**
3856
+ * New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
3857
+ */
3858
+ "limit_reset": /*#__PURE__*/S.optionalWith(UpdateKeysRequestLimitReset, {
3859
+ nullable: true
3860
+ }),
3861
+ /**
3862
+ * Whether to include BYOK usage in the limit
3863
+ */
3864
+ "include_byok_in_limit": /*#__PURE__*/S.optionalWith(S.Boolean, {
2419
3865
  nullable: true
2420
3866
  })
2421
3867
  }) {}
2422
- exports.ListParams = ListParams;
2423
- class List200 extends /*#__PURE__*/S.Struct({
3868
+ exports.UpdateKeysRequest = UpdateKeysRequest;
3869
+ class UpdateKeys200 extends /*#__PURE__*/S.Struct({
2424
3870
  /**
2425
- * List of API keys
3871
+ * The updated API key information
2426
3872
  */
2427
- "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
3873
+ "data": /*#__PURE__*/S.Struct({
2428
3874
  /**
2429
3875
  * Unique hash identifier for the API key
2430
3876
  */
@@ -2503,352 +3949,664 @@ class List200 extends /*#__PURE__*/S.Struct({
2503
3949
  "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
2504
3950
  nullable: true
2505
3951
  })
2506
- }))
3952
+ })
3953
+ }) {}
3954
+ exports.UpdateKeys200 = UpdateKeys200;
3955
+ class ListGuardrailsParams extends /*#__PURE__*/S.Struct({
3956
+ /**
3957
+ * Number of records to skip for pagination
3958
+ */
3959
+ "offset": /*#__PURE__*/S.optionalWith(S.String, {
3960
+ nullable: true
3961
+ }),
3962
+ /**
3963
+ * Maximum number of records to return (max 100)
3964
+ */
3965
+ "limit": /*#__PURE__*/S.optionalWith(S.String, {
3966
+ nullable: true
3967
+ })
3968
+ }) {}
3969
+ exports.ListGuardrailsParams = ListGuardrailsParams;
3970
+ class ListGuardrails200 extends /*#__PURE__*/S.Struct({
3971
+ /**
3972
+ * List of guardrails
3973
+ */
3974
+ "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
3975
+ /**
3976
+ * Unique identifier for the guardrail
3977
+ */
3978
+ "id": S.String,
3979
+ /**
3980
+ * Name of the guardrail
3981
+ */
3982
+ "name": S.String,
3983
+ /**
3984
+ * Description of the guardrail
3985
+ */
3986
+ "description": /*#__PURE__*/S.optionalWith(S.String, {
3987
+ nullable: true
3988
+ }),
3989
+ /**
3990
+ * Spending limit in USD
3991
+ */
3992
+ "limit_usd": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThan(0)), {
3993
+ nullable: true
3994
+ }),
3995
+ /**
3996
+ * Interval at which the limit resets (daily, weekly, monthly)
3997
+ */
3998
+ "reset_interval": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("daily", "weekly", "monthly"), {
3999
+ nullable: true
4000
+ }),
4001
+ /**
4002
+ * List of allowed provider IDs
4003
+ */
4004
+ "allowed_providers": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4005
+ nullable: true
4006
+ }),
4007
+ /**
4008
+ * Array of model canonical_slugs (immutable identifiers)
4009
+ */
4010
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4011
+ nullable: true
4012
+ }),
4013
+ /**
4014
+ * Whether to enforce zero data retention
4015
+ */
4016
+ "enforce_zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
4017
+ nullable: true
4018
+ }),
4019
+ /**
4020
+ * ISO 8601 timestamp of when the guardrail was created
4021
+ */
4022
+ "created_at": S.String,
4023
+ /**
4024
+ * ISO 8601 timestamp of when the guardrail was last updated
4025
+ */
4026
+ "updated_at": /*#__PURE__*/S.optionalWith(S.String, {
4027
+ nullable: true
4028
+ })
4029
+ })),
4030
+ /**
4031
+ * Total number of guardrails
4032
+ */
4033
+ "total_count": S.Number
2507
4034
  }) {}
2508
4035
  /**
2509
- * Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
4036
+ * Interval at which the limit resets (daily, weekly, monthly)
2510
4037
  */
2511
- exports.List200 = List200;
2512
- class CreateKeysRequestLimitReset extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
2513
- exports.CreateKeysRequestLimitReset = CreateKeysRequestLimitReset;
2514
- class CreateKeysRequest extends /*#__PURE__*/S.Class("CreateKeysRequest")({
4038
+ exports.ListGuardrails200 = ListGuardrails200;
4039
+ class CreateGuardrailRequestResetInterval extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
4040
+ exports.CreateGuardrailRequestResetInterval = CreateGuardrailRequestResetInterval;
4041
+ class CreateGuardrailRequest extends /*#__PURE__*/S.Class("CreateGuardrailRequest")({
2515
4042
  /**
2516
- * Name for the new API key
4043
+ * Name for the new guardrail
2517
4044
  */
2518
- "name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
4045
+ "name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(200)),
2519
4046
  /**
2520
- * Optional spending limit for the API key in USD
4047
+ * Description of the guardrail
4048
+ */
4049
+ "description": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(1000)), {
4050
+ nullable: true
4051
+ }),
4052
+ /**
4053
+ * Spending limit in USD
4054
+ */
4055
+ "limit_usd": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThan(0)), {
4056
+ nullable: true
4057
+ }),
4058
+ /**
4059
+ * Interval at which the limit resets (daily, weekly, monthly)
2521
4060
  */
2522
- "limit": /*#__PURE__*/S.optionalWith(S.Number, {
4061
+ "reset_interval": /*#__PURE__*/S.optionalWith(CreateGuardrailRequestResetInterval, {
2523
4062
  nullable: true
2524
4063
  }),
2525
4064
  /**
2526
- * Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
4065
+ * List of allowed provider IDs
2527
4066
  */
2528
- "limit_reset": /*#__PURE__*/S.optionalWith(CreateKeysRequestLimitReset, {
4067
+ "allowed_providers": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NonEmptyArray(S.String).pipe(/*#__PURE__*/S.minItems(1)), {
2529
4068
  nullable: true
2530
4069
  }),
2531
4070
  /**
2532
- * Whether to include BYOK usage in the limit
4071
+ * Array of model identifiers (slug or canonical_slug accepted)
2533
4072
  */
2534
- "include_byok_in_limit": /*#__PURE__*/S.optionalWith(S.Boolean, {
4073
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NonEmptyArray(S.String).pipe(/*#__PURE__*/S.minItems(1)), {
2535
4074
  nullable: true
2536
4075
  }),
2537
4076
  /**
2538
- * Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected
4077
+ * Whether to enforce zero data retention
2539
4078
  */
2540
- "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
4079
+ "enforce_zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
2541
4080
  nullable: true
2542
4081
  })
2543
4082
  }) {}
2544
- exports.CreateKeysRequest = CreateKeysRequest;
2545
- class CreateKeys201 extends /*#__PURE__*/S.Struct({
4083
+ /**
4084
+ * Interval at which the limit resets (daily, weekly, monthly)
4085
+ */
4086
+ exports.CreateGuardrailRequest = CreateGuardrailRequest;
4087
+ class CreateGuardrail201DataResetInterval extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
4088
+ exports.CreateGuardrail201DataResetInterval = CreateGuardrail201DataResetInterval;
4089
+ class CreateGuardrail201 extends /*#__PURE__*/S.Struct({
2546
4090
  /**
2547
- * The created API key information
4091
+ * The created guardrail
2548
4092
  */
2549
4093
  "data": /*#__PURE__*/S.Struct({
2550
4094
  /**
2551
- * Unique hash identifier for the API key
4095
+ * Unique identifier for the guardrail
2552
4096
  */
2553
- "hash": S.String,
4097
+ "id": S.String,
2554
4098
  /**
2555
- * Name of the API key
4099
+ * Name of the guardrail
2556
4100
  */
2557
4101
  "name": S.String,
2558
4102
  /**
2559
- * Human-readable label for the API key
4103
+ * Description of the guardrail
2560
4104
  */
2561
- "label": S.String,
4105
+ "description": /*#__PURE__*/S.optionalWith(S.String, {
4106
+ nullable: true
4107
+ }),
2562
4108
  /**
2563
- * Whether the API key is disabled
4109
+ * Spending limit in USD
2564
4110
  */
2565
- "disabled": S.Boolean,
4111
+ "limit_usd": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThan(0)), {
4112
+ nullable: true
4113
+ }),
2566
4114
  /**
2567
- * Spending limit for the API key in USD
4115
+ * Interval at which the limit resets (daily, weekly, monthly)
2568
4116
  */
2569
- "limit": /*#__PURE__*/S.NullOr(S.Number),
4117
+ "reset_interval": /*#__PURE__*/S.optionalWith(CreateGuardrail201DataResetInterval, {
4118
+ nullable: true
4119
+ }),
2570
4120
  /**
2571
- * Remaining spending limit in USD
4121
+ * List of allowed provider IDs
2572
4122
  */
2573
- "limit_remaining": /*#__PURE__*/S.NullOr(S.Number),
4123
+ "allowed_providers": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4124
+ nullable: true
4125
+ }),
2574
4126
  /**
2575
- * Type of limit reset for the API key
4127
+ * Array of model canonical_slugs (immutable identifiers)
2576
4128
  */
2577
- "limit_reset": /*#__PURE__*/S.NullOr(S.String),
4129
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4130
+ nullable: true
4131
+ }),
2578
4132
  /**
2579
- * Whether to include external BYOK usage in the credit limit
4133
+ * Whether to enforce zero data retention
2580
4134
  */
2581
- "include_byok_in_limit": S.Boolean,
4135
+ "enforce_zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
4136
+ nullable: true
4137
+ }),
2582
4138
  /**
2583
- * Total OpenRouter credit usage (in USD) for the API key
4139
+ * ISO 8601 timestamp of when the guardrail was created
2584
4140
  */
2585
- "usage": S.Number,
4141
+ "created_at": S.String,
2586
4142
  /**
2587
- * OpenRouter credit usage (in USD) for the current UTC day
4143
+ * ISO 8601 timestamp of when the guardrail was last updated
2588
4144
  */
2589
- "usage_daily": S.Number,
4145
+ "updated_at": /*#__PURE__*/S.optionalWith(S.String, {
4146
+ nullable: true
4147
+ })
4148
+ })
4149
+ }) {}
4150
+ /**
4151
+ * Interval at which the limit resets (daily, weekly, monthly)
4152
+ */
4153
+ exports.CreateGuardrail201 = CreateGuardrail201;
4154
+ class GetGuardrail200DataResetInterval extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
4155
+ exports.GetGuardrail200DataResetInterval = GetGuardrail200DataResetInterval;
4156
+ class GetGuardrail200 extends /*#__PURE__*/S.Struct({
4157
+ /**
4158
+ * The guardrail
4159
+ */
4160
+ "data": /*#__PURE__*/S.Struct({
2590
4161
  /**
2591
- * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
4162
+ * Unique identifier for the guardrail
2592
4163
  */
2593
- "usage_weekly": S.Number,
4164
+ "id": S.String,
2594
4165
  /**
2595
- * OpenRouter credit usage (in USD) for the current UTC month
4166
+ * Name of the guardrail
2596
4167
  */
2597
- "usage_monthly": S.Number,
4168
+ "name": S.String,
2598
4169
  /**
2599
- * Total external BYOK usage (in USD) for the API key
4170
+ * Description of the guardrail
2600
4171
  */
2601
- "byok_usage": S.Number,
4172
+ "description": /*#__PURE__*/S.optionalWith(S.String, {
4173
+ nullable: true
4174
+ }),
2602
4175
  /**
2603
- * External BYOK usage (in USD) for the current UTC day
4176
+ * Spending limit in USD
2604
4177
  */
2605
- "byok_usage_daily": S.Number,
4178
+ "limit_usd": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThan(0)), {
4179
+ nullable: true
4180
+ }),
2606
4181
  /**
2607
- * External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
4182
+ * Interval at which the limit resets (daily, weekly, monthly)
2608
4183
  */
2609
- "byok_usage_weekly": S.Number,
4184
+ "reset_interval": /*#__PURE__*/S.optionalWith(GetGuardrail200DataResetInterval, {
4185
+ nullable: true
4186
+ }),
2610
4187
  /**
2611
- * External BYOK usage (in USD) for current UTC month
4188
+ * List of allowed provider IDs
2612
4189
  */
2613
- "byok_usage_monthly": S.Number,
4190
+ "allowed_providers": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4191
+ nullable: true
4192
+ }),
2614
4193
  /**
2615
- * ISO 8601 timestamp of when the API key was created
4194
+ * Array of model canonical_slugs (immutable identifiers)
2616
4195
  */
2617
- "created_at": S.String,
4196
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4197
+ nullable: true
4198
+ }),
2618
4199
  /**
2619
- * ISO 8601 timestamp of when the API key was last updated
4200
+ * Whether to enforce zero data retention
2620
4201
  */
2621
- "updated_at": /*#__PURE__*/S.NullOr(S.String),
4202
+ "enforce_zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
4203
+ nullable: true
4204
+ }),
2622
4205
  /**
2623
- * ISO 8601 UTC timestamp when the API key expires, or null if no expiration
4206
+ * ISO 8601 timestamp of when the guardrail was created
2624
4207
  */
2625
- "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
4208
+ "created_at": S.String,
4209
+ /**
4210
+ * ISO 8601 timestamp of when the guardrail was last updated
4211
+ */
4212
+ "updated_at": /*#__PURE__*/S.optionalWith(S.String, {
2626
4213
  nullable: true
2627
4214
  })
4215
+ })
4216
+ }) {}
4217
+ exports.GetGuardrail200 = GetGuardrail200;
4218
+ class DeleteGuardrail200 extends /*#__PURE__*/S.Struct({
4219
+ /**
4220
+ * Confirmation that the guardrail was deleted
4221
+ */
4222
+ "deleted": /*#__PURE__*/S.Literal(true)
4223
+ }) {}
4224
+ /**
4225
+ * Interval at which the limit resets (daily, weekly, monthly)
4226
+ */
4227
+ exports.DeleteGuardrail200 = DeleteGuardrail200;
4228
+ class UpdateGuardrailRequestResetInterval extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
4229
+ exports.UpdateGuardrailRequestResetInterval = UpdateGuardrailRequestResetInterval;
4230
+ class UpdateGuardrailRequest extends /*#__PURE__*/S.Class("UpdateGuardrailRequest")({
4231
+ /**
4232
+ * New name for the guardrail
4233
+ */
4234
+ "name": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(200)), {
4235
+ nullable: true
2628
4236
  }),
2629
4237
  /**
2630
- * The actual API key string (only shown once)
4238
+ * New description for the guardrail
2631
4239
  */
2632
- "key": S.String
4240
+ "description": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(1000)), {
4241
+ nullable: true
4242
+ }),
4243
+ /**
4244
+ * New spending limit in USD
4245
+ */
4246
+ "limit_usd": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThan(0)), {
4247
+ nullable: true
4248
+ }),
4249
+ /**
4250
+ * Interval at which the limit resets (daily, weekly, monthly)
4251
+ */
4252
+ "reset_interval": /*#__PURE__*/S.optionalWith(UpdateGuardrailRequestResetInterval, {
4253
+ nullable: true
4254
+ }),
4255
+ /**
4256
+ * New list of allowed provider IDs
4257
+ */
4258
+ "allowed_providers": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NonEmptyArray(S.String).pipe(/*#__PURE__*/S.minItems(1)), {
4259
+ nullable: true
4260
+ }),
4261
+ /**
4262
+ * Array of model identifiers (slug or canonical_slug accepted)
4263
+ */
4264
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NonEmptyArray(S.String).pipe(/*#__PURE__*/S.minItems(1)), {
4265
+ nullable: true
4266
+ }),
4267
+ /**
4268
+ * Whether to enforce zero data retention
4269
+ */
4270
+ "enforce_zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
4271
+ nullable: true
4272
+ })
2633
4273
  }) {}
2634
- exports.CreateKeys201 = CreateKeys201;
2635
- class GetKey200 extends /*#__PURE__*/S.Struct({
4274
+ /**
4275
+ * Interval at which the limit resets (daily, weekly, monthly)
4276
+ */
4277
+ exports.UpdateGuardrailRequest = UpdateGuardrailRequest;
4278
+ class UpdateGuardrail200DataResetInterval extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
4279
+ exports.UpdateGuardrail200DataResetInterval = UpdateGuardrail200DataResetInterval;
4280
+ class UpdateGuardrail200 extends /*#__PURE__*/S.Struct({
2636
4281
  /**
2637
- * The API key information
4282
+ * The updated guardrail
2638
4283
  */
2639
4284
  "data": /*#__PURE__*/S.Struct({
2640
4285
  /**
2641
- * Unique hash identifier for the API key
4286
+ * Unique identifier for the guardrail
2642
4287
  */
2643
- "hash": S.String,
4288
+ "id": S.String,
2644
4289
  /**
2645
- * Name of the API key
4290
+ * Name of the guardrail
2646
4291
  */
2647
4292
  "name": S.String,
2648
4293
  /**
2649
- * Human-readable label for the API key
2650
- */
2651
- "label": S.String,
2652
- /**
2653
- * Whether the API key is disabled
2654
- */
2655
- "disabled": S.Boolean,
2656
- /**
2657
- * Spending limit for the API key in USD
4294
+ * Description of the guardrail
2658
4295
  */
2659
- "limit": /*#__PURE__*/S.NullOr(S.Number),
4296
+ "description": /*#__PURE__*/S.optionalWith(S.String, {
4297
+ nullable: true
4298
+ }),
2660
4299
  /**
2661
- * Remaining spending limit in USD
4300
+ * Spending limit in USD
2662
4301
  */
2663
- "limit_remaining": /*#__PURE__*/S.NullOr(S.Number),
4302
+ "limit_usd": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThan(0)), {
4303
+ nullable: true
4304
+ }),
2664
4305
  /**
2665
- * Type of limit reset for the API key
4306
+ * Interval at which the limit resets (daily, weekly, monthly)
2666
4307
  */
2667
- "limit_reset": /*#__PURE__*/S.NullOr(S.String),
4308
+ "reset_interval": /*#__PURE__*/S.optionalWith(UpdateGuardrail200DataResetInterval, {
4309
+ nullable: true
4310
+ }),
2668
4311
  /**
2669
- * Whether to include external BYOK usage in the credit limit
4312
+ * List of allowed provider IDs
2670
4313
  */
2671
- "include_byok_in_limit": S.Boolean,
4314
+ "allowed_providers": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4315
+ nullable: true
4316
+ }),
2672
4317
  /**
2673
- * Total OpenRouter credit usage (in USD) for the API key
4318
+ * Array of model canonical_slugs (immutable identifiers)
2674
4319
  */
2675
- "usage": S.Number,
4320
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4321
+ nullable: true
4322
+ }),
2676
4323
  /**
2677
- * OpenRouter credit usage (in USD) for the current UTC day
4324
+ * Whether to enforce zero data retention
2678
4325
  */
2679
- "usage_daily": S.Number,
4326
+ "enforce_zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
4327
+ nullable: true
4328
+ }),
2680
4329
  /**
2681
- * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
4330
+ * ISO 8601 timestamp of when the guardrail was created
2682
4331
  */
2683
- "usage_weekly": S.Number,
4332
+ "created_at": S.String,
2684
4333
  /**
2685
- * OpenRouter credit usage (in USD) for the current UTC month
4334
+ * ISO 8601 timestamp of when the guardrail was last updated
2686
4335
  */
2687
- "usage_monthly": S.Number,
4336
+ "updated_at": /*#__PURE__*/S.optionalWith(S.String, {
4337
+ nullable: true
4338
+ })
4339
+ })
4340
+ }) {}
4341
+ exports.UpdateGuardrail200 = UpdateGuardrail200;
4342
+ class ListKeyAssignmentsParams extends /*#__PURE__*/S.Struct({
4343
+ /**
4344
+ * Number of records to skip for pagination
4345
+ */
4346
+ "offset": /*#__PURE__*/S.optionalWith(S.String, {
4347
+ nullable: true
4348
+ }),
4349
+ /**
4350
+ * Maximum number of records to return (max 100)
4351
+ */
4352
+ "limit": /*#__PURE__*/S.optionalWith(S.String, {
4353
+ nullable: true
4354
+ })
4355
+ }) {}
4356
+ exports.ListKeyAssignmentsParams = ListKeyAssignmentsParams;
4357
+ class ListKeyAssignments200 extends /*#__PURE__*/S.Struct({
4358
+ /**
4359
+ * List of key assignments
4360
+ */
4361
+ "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2688
4362
  /**
2689
- * Total external BYOK usage (in USD) for the API key
4363
+ * Unique identifier for the assignment
2690
4364
  */
2691
- "byok_usage": S.Number,
4365
+ "id": S.String,
2692
4366
  /**
2693
- * External BYOK usage (in USD) for the current UTC day
4367
+ * Hash of the assigned API key
2694
4368
  */
2695
- "byok_usage_daily": S.Number,
4369
+ "key_hash": S.String,
2696
4370
  /**
2697
- * External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
4371
+ * ID of the guardrail
2698
4372
  */
2699
- "byok_usage_weekly": S.Number,
4373
+ "guardrail_id": S.String,
2700
4374
  /**
2701
- * External BYOK usage (in USD) for current UTC month
4375
+ * Name of the API key
2702
4376
  */
2703
- "byok_usage_monthly": S.Number,
4377
+ "key_name": S.String,
2704
4378
  /**
2705
- * ISO 8601 timestamp of when the API key was created
4379
+ * Label of the API key
2706
4380
  */
2707
- "created_at": S.String,
4381
+ "key_label": S.String,
2708
4382
  /**
2709
- * ISO 8601 timestamp of when the API key was last updated
4383
+ * User ID of who made the assignment
2710
4384
  */
2711
- "updated_at": /*#__PURE__*/S.NullOr(S.String),
4385
+ "assigned_by": /*#__PURE__*/S.NullOr(S.String),
2712
4386
  /**
2713
- * ISO 8601 UTC timestamp when the API key expires, or null if no expiration
4387
+ * ISO 8601 timestamp of when the assignment was created
2714
4388
  */
2715
- "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
2716
- nullable: true
2717
- })
2718
- })
2719
- }) {}
2720
- exports.GetKey200 = GetKey200;
2721
- class DeleteKeys200 extends /*#__PURE__*/S.Struct({
4389
+ "created_at": S.String
4390
+ })),
2722
4391
  /**
2723
- * Confirmation that the API key was deleted
4392
+ * Total number of key assignments for this guardrail
2724
4393
  */
2725
- "deleted": /*#__PURE__*/S.Literal(true)
4394
+ "total_count": S.Number
2726
4395
  }) {}
2727
- /**
2728
- * New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
2729
- */
2730
- exports.DeleteKeys200 = DeleteKeys200;
2731
- class UpdateKeysRequestLimitReset extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
2732
- exports.UpdateKeysRequestLimitReset = UpdateKeysRequestLimitReset;
2733
- class UpdateKeysRequest extends /*#__PURE__*/S.Class("UpdateKeysRequest")({
2734
- /**
2735
- * New name for the API key
2736
- */
2737
- "name": /*#__PURE__*/S.optionalWith(S.String, {
2738
- nullable: true
2739
- }),
2740
- /**
2741
- * Whether to disable the API key
2742
- */
2743
- "disabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
2744
- nullable: true
2745
- }),
2746
- /**
2747
- * New spending limit for the API key in USD
2748
- */
2749
- "limit": /*#__PURE__*/S.optionalWith(S.Number, {
2750
- nullable: true
2751
- }),
4396
+ exports.ListKeyAssignments200 = ListKeyAssignments200;
4397
+ class ListMemberAssignmentsParams extends /*#__PURE__*/S.Struct({
2752
4398
  /**
2753
- * New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
4399
+ * Number of records to skip for pagination
2754
4400
  */
2755
- "limit_reset": /*#__PURE__*/S.optionalWith(UpdateKeysRequestLimitReset, {
4401
+ "offset": /*#__PURE__*/S.optionalWith(S.String, {
2756
4402
  nullable: true
2757
4403
  }),
2758
4404
  /**
2759
- * Whether to include BYOK usage in the limit
4405
+ * Maximum number of records to return (max 100)
2760
4406
  */
2761
- "include_byok_in_limit": /*#__PURE__*/S.optionalWith(S.Boolean, {
4407
+ "limit": /*#__PURE__*/S.optionalWith(S.String, {
2762
4408
  nullable: true
2763
4409
  })
2764
4410
  }) {}
2765
- exports.UpdateKeysRequest = UpdateKeysRequest;
2766
- class UpdateKeys200 extends /*#__PURE__*/S.Struct({
4411
+ exports.ListMemberAssignmentsParams = ListMemberAssignmentsParams;
4412
+ class ListMemberAssignments200 extends /*#__PURE__*/S.Struct({
2767
4413
  /**
2768
- * The updated API key information
4414
+ * List of member assignments
2769
4415
  */
2770
- "data": /*#__PURE__*/S.Struct({
4416
+ "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2771
4417
  /**
2772
- * Unique hash identifier for the API key
4418
+ * Unique identifier for the assignment
2773
4419
  */
2774
- "hash": S.String,
4420
+ "id": S.String,
2775
4421
  /**
2776
- * Name of the API key
4422
+ * Clerk user ID of the assigned member
2777
4423
  */
2778
- "name": S.String,
4424
+ "user_id": S.String,
2779
4425
  /**
2780
- * Human-readable label for the API key
4426
+ * Organization ID
2781
4427
  */
2782
- "label": S.String,
4428
+ "organization_id": S.String,
2783
4429
  /**
2784
- * Whether the API key is disabled
4430
+ * ID of the guardrail
2785
4431
  */
2786
- "disabled": S.Boolean,
4432
+ "guardrail_id": S.String,
2787
4433
  /**
2788
- * Spending limit for the API key in USD
4434
+ * User ID of who made the assignment
2789
4435
  */
2790
- "limit": /*#__PURE__*/S.NullOr(S.Number),
4436
+ "assigned_by": /*#__PURE__*/S.NullOr(S.String),
2791
4437
  /**
2792
- * Remaining spending limit in USD
4438
+ * ISO 8601 timestamp of when the assignment was created
2793
4439
  */
2794
- "limit_remaining": /*#__PURE__*/S.NullOr(S.Number),
4440
+ "created_at": S.String
4441
+ })),
4442
+ /**
4443
+ * Total number of member assignments
4444
+ */
4445
+ "total_count": S.Number
4446
+ }) {}
4447
+ exports.ListMemberAssignments200 = ListMemberAssignments200;
4448
+ class ListGuardrailKeyAssignmentsParams extends /*#__PURE__*/S.Struct({
4449
+ /**
4450
+ * Number of records to skip for pagination
4451
+ */
4452
+ "offset": /*#__PURE__*/S.optionalWith(S.String, {
4453
+ nullable: true
4454
+ }),
4455
+ /**
4456
+ * Maximum number of records to return (max 100)
4457
+ */
4458
+ "limit": /*#__PURE__*/S.optionalWith(S.String, {
4459
+ nullable: true
4460
+ })
4461
+ }) {}
4462
+ exports.ListGuardrailKeyAssignmentsParams = ListGuardrailKeyAssignmentsParams;
4463
+ class ListGuardrailKeyAssignments200 extends /*#__PURE__*/S.Struct({
4464
+ /**
4465
+ * List of key assignments
4466
+ */
4467
+ "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2795
4468
  /**
2796
- * Type of limit reset for the API key
4469
+ * Unique identifier for the assignment
2797
4470
  */
2798
- "limit_reset": /*#__PURE__*/S.NullOr(S.String),
4471
+ "id": S.String,
2799
4472
  /**
2800
- * Whether to include external BYOK usage in the credit limit
4473
+ * Hash of the assigned API key
2801
4474
  */
2802
- "include_byok_in_limit": S.Boolean,
4475
+ "key_hash": S.String,
2803
4476
  /**
2804
- * Total OpenRouter credit usage (in USD) for the API key
4477
+ * ID of the guardrail
2805
4478
  */
2806
- "usage": S.Number,
4479
+ "guardrail_id": S.String,
2807
4480
  /**
2808
- * OpenRouter credit usage (in USD) for the current UTC day
4481
+ * Name of the API key
2809
4482
  */
2810
- "usage_daily": S.Number,
4483
+ "key_name": S.String,
2811
4484
  /**
2812
- * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
4485
+ * Label of the API key
2813
4486
  */
2814
- "usage_weekly": S.Number,
4487
+ "key_label": S.String,
2815
4488
  /**
2816
- * OpenRouter credit usage (in USD) for the current UTC month
4489
+ * User ID of who made the assignment
2817
4490
  */
2818
- "usage_monthly": S.Number,
4491
+ "assigned_by": /*#__PURE__*/S.NullOr(S.String),
2819
4492
  /**
2820
- * Total external BYOK usage (in USD) for the API key
4493
+ * ISO 8601 timestamp of when the assignment was created
2821
4494
  */
2822
- "byok_usage": S.Number,
4495
+ "created_at": S.String
4496
+ })),
4497
+ /**
4498
+ * Total number of key assignments for this guardrail
4499
+ */
4500
+ "total_count": S.Number
4501
+ }) {}
4502
+ exports.ListGuardrailKeyAssignments200 = ListGuardrailKeyAssignments200;
4503
+ class BulkAssignKeysToGuardrailRequest extends /*#__PURE__*/S.Class("BulkAssignKeysToGuardrailRequest")({
4504
+ /**
4505
+ * Array of API key hashes to assign to the guardrail
4506
+ */
4507
+ "key_hashes": /*#__PURE__*/S.NonEmptyArray(S.String.pipe(S.minLength(1))).pipe(/*#__PURE__*/S.minItems(1))
4508
+ }) {}
4509
+ exports.BulkAssignKeysToGuardrailRequest = BulkAssignKeysToGuardrailRequest;
4510
+ class BulkAssignKeysToGuardrail200 extends /*#__PURE__*/S.Struct({
4511
+ /**
4512
+ * Number of keys successfully assigned
4513
+ */
4514
+ "assigned_count": S.Number
4515
+ }) {}
4516
+ exports.BulkAssignKeysToGuardrail200 = BulkAssignKeysToGuardrail200;
4517
+ class ListGuardrailMemberAssignmentsParams extends /*#__PURE__*/S.Struct({
4518
+ /**
4519
+ * Number of records to skip for pagination
4520
+ */
4521
+ "offset": /*#__PURE__*/S.optionalWith(S.String, {
4522
+ nullable: true
4523
+ }),
4524
+ /**
4525
+ * Maximum number of records to return (max 100)
4526
+ */
4527
+ "limit": /*#__PURE__*/S.optionalWith(S.String, {
4528
+ nullable: true
4529
+ })
4530
+ }) {}
4531
+ exports.ListGuardrailMemberAssignmentsParams = ListGuardrailMemberAssignmentsParams;
4532
+ class ListGuardrailMemberAssignments200 extends /*#__PURE__*/S.Struct({
4533
+ /**
4534
+ * List of member assignments
4535
+ */
4536
+ "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2823
4537
  /**
2824
- * External BYOK usage (in USD) for the current UTC day
4538
+ * Unique identifier for the assignment
2825
4539
  */
2826
- "byok_usage_daily": S.Number,
4540
+ "id": S.String,
2827
4541
  /**
2828
- * External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
4542
+ * Clerk user ID of the assigned member
2829
4543
  */
2830
- "byok_usage_weekly": S.Number,
4544
+ "user_id": S.String,
2831
4545
  /**
2832
- * External BYOK usage (in USD) for current UTC month
4546
+ * Organization ID
2833
4547
  */
2834
- "byok_usage_monthly": S.Number,
4548
+ "organization_id": S.String,
2835
4549
  /**
2836
- * ISO 8601 timestamp of when the API key was created
4550
+ * ID of the guardrail
2837
4551
  */
2838
- "created_at": S.String,
4552
+ "guardrail_id": S.String,
2839
4553
  /**
2840
- * ISO 8601 timestamp of when the API key was last updated
4554
+ * User ID of who made the assignment
2841
4555
  */
2842
- "updated_at": /*#__PURE__*/S.NullOr(S.String),
4556
+ "assigned_by": /*#__PURE__*/S.NullOr(S.String),
2843
4557
  /**
2844
- * ISO 8601 UTC timestamp when the API key expires, or null if no expiration
4558
+ * ISO 8601 timestamp of when the assignment was created
2845
4559
  */
2846
- "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
2847
- nullable: true
2848
- })
2849
- })
4560
+ "created_at": S.String
4561
+ })),
4562
+ /**
4563
+ * Total number of member assignments
4564
+ */
4565
+ "total_count": S.Number
2850
4566
  }) {}
2851
- exports.UpdateKeys200 = UpdateKeys200;
4567
+ exports.ListGuardrailMemberAssignments200 = ListGuardrailMemberAssignments200;
4568
+ class BulkAssignMembersToGuardrailRequest extends /*#__PURE__*/S.Class("BulkAssignMembersToGuardrailRequest")({
4569
+ /**
4570
+ * Array of member user IDs to assign to the guardrail
4571
+ */
4572
+ "member_user_ids": /*#__PURE__*/S.NonEmptyArray(S.String.pipe(S.minLength(1))).pipe(/*#__PURE__*/S.minItems(1))
4573
+ }) {}
4574
+ exports.BulkAssignMembersToGuardrailRequest = BulkAssignMembersToGuardrailRequest;
4575
+ class BulkAssignMembersToGuardrail200 extends /*#__PURE__*/S.Struct({
4576
+ /**
4577
+ * Number of members successfully assigned
4578
+ */
4579
+ "assigned_count": S.Number
4580
+ }) {}
4581
+ exports.BulkAssignMembersToGuardrail200 = BulkAssignMembersToGuardrail200;
4582
+ class BulkUnassignKeysFromGuardrailRequest extends /*#__PURE__*/S.Class("BulkUnassignKeysFromGuardrailRequest")({
4583
+ /**
4584
+ * Array of API key hashes to unassign from the guardrail
4585
+ */
4586
+ "key_hashes": /*#__PURE__*/S.NonEmptyArray(S.String.pipe(S.minLength(1))).pipe(/*#__PURE__*/S.minItems(1))
4587
+ }) {}
4588
+ exports.BulkUnassignKeysFromGuardrailRequest = BulkUnassignKeysFromGuardrailRequest;
4589
+ class BulkUnassignKeysFromGuardrail200 extends /*#__PURE__*/S.Struct({
4590
+ /**
4591
+ * Number of keys successfully unassigned
4592
+ */
4593
+ "unassigned_count": S.Number
4594
+ }) {}
4595
+ exports.BulkUnassignKeysFromGuardrail200 = BulkUnassignKeysFromGuardrail200;
4596
+ class BulkUnassignMembersFromGuardrailRequest extends /*#__PURE__*/S.Class("BulkUnassignMembersFromGuardrailRequest")({
4597
+ /**
4598
+ * Array of member user IDs to unassign from the guardrail
4599
+ */
4600
+ "member_user_ids": /*#__PURE__*/S.NonEmptyArray(S.String.pipe(S.minLength(1))).pipe(/*#__PURE__*/S.minItems(1))
4601
+ }) {}
4602
+ exports.BulkUnassignMembersFromGuardrailRequest = BulkUnassignMembersFromGuardrailRequest;
4603
+ class BulkUnassignMembersFromGuardrail200 extends /*#__PURE__*/S.Struct({
4604
+ /**
4605
+ * Number of members successfully unassigned
4606
+ */
4607
+ "unassigned_count": S.Number
4608
+ }) {}
4609
+ exports.BulkUnassignMembersFromGuardrail200 = BulkUnassignMembersFromGuardrail200;
2852
4610
  class GetCurrentKey200 extends /*#__PURE__*/S.Struct({
2853
4611
  /**
2854
4612
  * Current API key information
@@ -3033,7 +4791,7 @@ class CreateAuthKeysCode200 extends /*#__PURE__*/S.Struct({
3033
4791
  exports.CreateAuthKeysCode200 = CreateAuthKeysCode200;
3034
4792
  class ChatGenerationParamsProviderEnumDataCollectionEnum extends /*#__PURE__*/S.Literal("deny", "allow") {}
3035
4793
  exports.ChatGenerationParamsProviderEnumDataCollectionEnum = ChatGenerationParamsProviderEnumDataCollectionEnum;
3036
- class Schema0 extends /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Literal("AI21", "AionLabs", "Alibaba", "Amazon Bedrock", "Amazon Nova", "Anthropic", "Arcee AI", "AtlasCloud", "Avian", "Azure", "BaseTen", "BytePlus", "Black Forest Labs", "Cerebras", "Chutes", "Cirrascale", "Clarifai", "Cloudflare", "Cohere", "Crusoe", "DeepInfra", "DeepSeek", "Featherless", "Fireworks", "Friendli", "GMICloud", "GoPomelo", "Google", "Google AI Studio", "Groq", "Hyperbolic", "Inception", "InferenceNet", "Infermatic", "Inflection", "Liquid", "Mara", "Mancer 2", "Minimax", "ModelRun", "Mistral", "Modular", "Moonshot AI", "Morph", "NCompass", "Nebius", "NextBit", "Novita", "Nvidia", "OpenAI", "OpenInference", "Parasail", "Perplexity", "Phala", "Relace", "SambaNova", "SiliconFlow", "Sourceful", "Stealth", "StreamLake", "Switchpoint", "Targon", "Together", "Venice", "WandB", "Xiaomi", "xAI", "Z.AI", "FakeProvider"), S.String)) {}
4794
+ class Schema0 extends /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Literal("AI21", "AionLabs", "Alibaba", "Amazon Bedrock", "Amazon Nova", "Anthropic", "Arcee AI", "AtlasCloud", "Avian", "Azure", "BaseTen", "BytePlus", "Black Forest Labs", "Cerebras", "Chutes", "Cirrascale", "Clarifai", "Cloudflare", "Cohere", "Crusoe", "DeepInfra", "DeepSeek", "Featherless", "Fireworks", "Friendli", "GMICloud", "Google", "Google AI Studio", "Groq", "Hyperbolic", "Inception", "Inceptron", "InferenceNet", "Infermatic", "Inflection", "Liquid", "Mara", "Mancer 2", "Minimax", "ModelRun", "Mistral", "Modular", "Moonshot AI", "Morph", "NCompass", "Nebius", "NextBit", "Novita", "Nvidia", "OpenAI", "OpenInference", "Parasail", "Perplexity", "Phala", "Relace", "SambaNova", "Seed", "SiliconFlow", "Sourceful", "Stealth", "StreamLake", "Switchpoint", "Together", "Upstage", "Venice", "WandB", "Xiaomi", "xAI", "Z.AI", "FakeProvider"), S.String)) {}
3037
4795
  exports.Schema0 = Schema0;
3038
4796
  class ProviderSortUnion extends /*#__PURE__*/S.Union(ProviderSort, ProviderSortConfig) {}
3039
4797
  exports.ProviderSortUnion = ProviderSortUnion;
@@ -3113,6 +4871,19 @@ class ChatMessageToolCall extends /*#__PURE__*/S.Class("ChatMessageToolCall")({
3113
4871
  })
3114
4872
  }) {}
3115
4873
  exports.ChatMessageToolCall = ChatMessageToolCall;
4874
+ class Schema3 extends /*#__PURE__*/S.Union(S.String, S.Null) {}
4875
+ exports.Schema3 = Schema3;
4876
+ class Schema4Enum extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "azure-openai-responses-v1", "xai-responses-v1", "anthropic-claude-v1", "google-gemini-v1") {}
4877
+ exports.Schema4Enum = Schema4Enum;
4878
+ class Schema4 extends /*#__PURE__*/S.Union(Schema4Enum, S.Null) {}
4879
+ exports.Schema4 = Schema4;
4880
+ class Schema5 extends S.Number {}
4881
+ exports.Schema5 = Schema5;
4882
+ class Schema2 extends /*#__PURE__*/S.Record({
4883
+ key: S.String,
4884
+ value: S.Unknown
4885
+ }) {}
4886
+ exports.Schema2 = Schema2;
3116
4887
  class AssistantMessage extends /*#__PURE__*/S.Class("AssistantMessage")({
3117
4888
  "role": /*#__PURE__*/S.Literal("assistant"),
3118
4889
  "content": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(ChatMessageContentItem)), {
@@ -3133,7 +4904,11 @@ class AssistantMessage extends /*#__PURE__*/S.Class("AssistantMessage")({
3133
4904
  "reasoning_details": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(ReasoningDetail), {
3134
4905
  nullable: true
3135
4906
  }),
3136
- "images": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(ChatMessageContentItemImage), {
4907
+ "images": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
4908
+ "image_url": /*#__PURE__*/S.Struct({
4909
+ "url": S.String
4910
+ })
4911
+ })), {
3137
4912
  nullable: true
3138
4913
  }),
3139
4914
  "annotations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(AnnotationDetail), {
@@ -3302,16 +5077,42 @@ class ChatGenerationParams extends /*#__PURE__*/S.Class("ChatGenerationParams")(
3302
5077
  }), {
3303
5078
  nullable: true
3304
5079
  }),
3305
- "preferred_min_throughput": /*#__PURE__*/S.optionalWith(S.Number, {
3306
- nullable: true
3307
- }),
3308
- "preferred_max_latency": /*#__PURE__*/S.optionalWith(S.Number, {
3309
- nullable: true
3310
- }),
3311
- "min_throughput": /*#__PURE__*/S.optionalWith(S.Number, {
5080
+ /**
5081
+ * Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
5082
+ */
5083
+ "preferred_min_throughput": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.Number, /*#__PURE__*/S.Struct({
5084
+ "p50": /*#__PURE__*/S.optionalWith(S.Number, {
5085
+ nullable: true
5086
+ }),
5087
+ "p75": /*#__PURE__*/S.optionalWith(S.Number, {
5088
+ nullable: true
5089
+ }),
5090
+ "p90": /*#__PURE__*/S.optionalWith(S.Number, {
5091
+ nullable: true
5092
+ }),
5093
+ "p99": /*#__PURE__*/S.optionalWith(S.Number, {
5094
+ nullable: true
5095
+ })
5096
+ })), {
3312
5097
  nullable: true
3313
5098
  }),
3314
- "max_latency": /*#__PURE__*/S.optionalWith(S.Number, {
5099
+ /**
5100
+ * Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
5101
+ */
5102
+ "preferred_max_latency": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.Number, /*#__PURE__*/S.Struct({
5103
+ "p50": /*#__PURE__*/S.optionalWith(S.Number, {
5104
+ nullable: true
5105
+ }),
5106
+ "p75": /*#__PURE__*/S.optionalWith(S.Number, {
5107
+ nullable: true
5108
+ }),
5109
+ "p90": /*#__PURE__*/S.optionalWith(S.Number, {
5110
+ nullable: true
5111
+ }),
5112
+ "p99": /*#__PURE__*/S.optionalWith(S.Number, {
5113
+ nullable: true
5114
+ })
5115
+ })), {
3315
5116
  nullable: true
3316
5117
  })
3317
5118
  }), {
@@ -3424,26 +5225,22 @@ class ChatGenerationParams extends /*#__PURE__*/S.Class("ChatGenerationParams")(
3424
5225
  })
3425
5226
  }), {
3426
5227
  nullable: true
5228
+ }),
5229
+ "image_config": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Record({
5230
+ key: S.String,
5231
+ value: S.Unknown
5232
+ }), {
5233
+ nullable: true
5234
+ }),
5235
+ "modalities": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Literal("text", "image")), {
5236
+ nullable: true
3427
5237
  })
3428
5238
  }) {}
3429
5239
  exports.ChatGenerationParams = ChatGenerationParams;
3430
5240
  class ChatCompletionFinishReason extends /*#__PURE__*/S.Literal("tool_calls", "stop", "length", "content_filter", "error") {}
3431
5241
  exports.ChatCompletionFinishReason = ChatCompletionFinishReason;
3432
- class Schema2 extends /*#__PURE__*/S.Union(ChatCompletionFinishReason, S.Null) {}
3433
- exports.Schema2 = Schema2;
3434
- class Schema4 extends /*#__PURE__*/S.Union(S.String, S.Null) {}
3435
- exports.Schema4 = Schema4;
3436
- class Schema5Enum extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "xai-responses-v1", "anthropic-claude-v1", "google-gemini-v1") {}
3437
- exports.Schema5Enum = Schema5Enum;
3438
- class Schema5 extends /*#__PURE__*/S.Union(Schema5Enum, S.Null) {}
3439
- exports.Schema5 = Schema5;
3440
- class Schema6 extends S.Number {}
5242
+ class Schema6 extends /*#__PURE__*/S.Union(ChatCompletionFinishReason, S.Null) {}
3441
5243
  exports.Schema6 = Schema6;
3442
- class Schema3 extends /*#__PURE__*/S.Record({
3443
- key: S.String,
3444
- value: S.Unknown
3445
- }) {}
3446
- exports.Schema3 = Schema3;
3447
5244
  class ChatMessageTokenLogprob extends /*#__PURE__*/S.Class("ChatMessageTokenLogprob")({
3448
5245
  "token": S.String,
3449
5246
  "logprob": S.Number,
@@ -3468,9 +5265,6 @@ class ChatResponseChoice extends /*#__PURE__*/S.Class("ChatResponseChoice")({
3468
5265
  "finish_reason": /*#__PURE__*/S.NullOr(ChatCompletionFinishReason),
3469
5266
  "index": S.Number,
3470
5267
  "message": AssistantMessage,
3471
- "reasoning_details": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(Schema3), {
3472
- nullable: true
3473
- }),
3474
5268
  "logprobs": /*#__PURE__*/S.optionalWith(ChatMessageTokenLogprobs, {
3475
5269
  nullable: true
3476
5270
  })
@@ -3480,16 +5274,6 @@ class ChatGenerationTokenUsage extends /*#__PURE__*/S.Class("ChatGenerationToken
3480
5274
  "completion_tokens": S.Number,
3481
5275
  "prompt_tokens": S.Number,
3482
5276
  "total_tokens": S.Number,
3483
- "cost": /*#__PURE__*/S.optionalWith(S.Number, {
3484
- nullable: true
3485
- }),
3486
- "cost_details": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
3487
- upstream_inference_cost: /*#__PURE__*/S.optionalWith(S.Number, {
3488
- nullable: true
3489
- })
3490
- }), {
3491
- nullable: true
3492
- }),
3493
5277
  "completion_tokens_details": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
3494
5278
  "reasoning_tokens": /*#__PURE__*/S.optionalWith(S.Number, {
3495
5279
  nullable: true
@@ -3510,6 +5294,9 @@ class ChatGenerationTokenUsage extends /*#__PURE__*/S.Class("ChatGenerationToken
3510
5294
  "cached_tokens": /*#__PURE__*/S.optionalWith(S.Number, {
3511
5295
  nullable: true
3512
5296
  }),
5297
+ "cache_write_tokens": /*#__PURE__*/S.optionalWith(S.Number, {
5298
+ nullable: true
5299
+ }),
3513
5300
  "audio_tokens": /*#__PURE__*/S.optionalWith(S.Number, {
3514
5301
  nullable: true
3515
5302
  }),
@@ -3518,6 +5305,16 @@ class ChatGenerationTokenUsage extends /*#__PURE__*/S.Class("ChatGenerationToken
3518
5305
  })
3519
5306
  }), {
3520
5307
  nullable: true
5308
+ }),
5309
+ "cost": /*#__PURE__*/S.optionalWith(S.Number, {
5310
+ nullable: true
5311
+ }),
5312
+ "cost_details": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
5313
+ upstream_inference_cost: /*#__PURE__*/S.optionalWith(S.Number, {
5314
+ nullable: true
5315
+ })
5316
+ }), {
5317
+ nullable: true
3521
5318
  })
3522
5319
  }) {}
3523
5320
  exports.ChatGenerationTokenUsage = ChatGenerationTokenUsage;
@@ -3708,6 +5505,18 @@ const make = (httpClient, options = {}) => {
3708
5505
  "529": decodeError("ProviderOverloadedResponse", ProviderOverloadedResponse),
3709
5506
  orElse: unexpectedStatus
3710
5507
  }))),
5508
+ "createMessages": options => HttpClientRequest.post(`/messages`).pipe(HttpClientRequest.bodyUnsafeJson(options), withResponse(HttpClientResponse.matchStatus({
5509
+ "2xx": decodeSuccess(AnthropicMessagesResponse),
5510
+ "400": decodeError("CreateMessages400", CreateMessages400),
5511
+ "401": decodeError("CreateMessages401", CreateMessages401),
5512
+ "403": decodeError("CreateMessages403", CreateMessages403),
5513
+ "404": decodeError("CreateMessages404", CreateMessages404),
5514
+ "429": decodeError("CreateMessages429", CreateMessages429),
5515
+ "500": decodeError("CreateMessages500", CreateMessages500),
5516
+ "503": decodeError("CreateMessages503", CreateMessages503),
5517
+ "529": decodeError("CreateMessages529", CreateMessages529),
5518
+ orElse: unexpectedStatus
5519
+ }))),
3711
5520
  "getUserActivity": options => HttpClientRequest.get(`/activity`).pipe(HttpClientRequest.setUrlParams({
3712
5521
  "date": options?.["date"]
3713
5522
  }), withResponse(HttpClientResponse.matchStatus({
@@ -3798,15 +5607,6 @@ const make = (httpClient, options = {}) => {
3798
5607
  "500": decodeError("InternalServerResponse", InternalServerResponse),
3799
5608
  orElse: unexpectedStatus
3800
5609
  }))),
3801
- "getParameters": (author, slug, options) => HttpClientRequest.get(`/parameters/${author}/${slug}`).pipe(HttpClientRequest.setUrlParams({
3802
- "provider": options?.["provider"]
3803
- }), withResponse(HttpClientResponse.matchStatus({
3804
- "2xx": decodeSuccess(GetParameters200),
3805
- "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
3806
- "404": decodeError("NotFoundResponse", NotFoundResponse),
3807
- "500": decodeError("InternalServerResponse", InternalServerResponse),
3808
- orElse: unexpectedStatus
3809
- }))),
3810
5610
  "listProviders": () => HttpClientRequest.get(`/providers`).pipe(withResponse(HttpClientResponse.matchStatus({
3811
5611
  "2xx": decodeSuccess(ListProviders200),
3812
5612
  "500": decodeError("InternalServerResponse", InternalServerResponse),
@@ -3855,6 +5655,114 @@ const make = (httpClient, options = {}) => {
3855
5655
  "500": decodeError("InternalServerResponse", InternalServerResponse),
3856
5656
  orElse: unexpectedStatus
3857
5657
  }))),
5658
+ "listGuardrails": options => HttpClientRequest.get(`/guardrails`).pipe(HttpClientRequest.setUrlParams({
5659
+ "offset": options?.["offset"],
5660
+ "limit": options?.["limit"]
5661
+ }), withResponse(HttpClientResponse.matchStatus({
5662
+ "2xx": decodeSuccess(ListGuardrails200),
5663
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5664
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5665
+ orElse: unexpectedStatus
5666
+ }))),
5667
+ "createGuardrail": options => HttpClientRequest.post(`/guardrails`).pipe(HttpClientRequest.bodyUnsafeJson(options), withResponse(HttpClientResponse.matchStatus({
5668
+ "2xx": decodeSuccess(CreateGuardrail201),
5669
+ "400": decodeError("BadRequestResponse", BadRequestResponse),
5670
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5671
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5672
+ orElse: unexpectedStatus
5673
+ }))),
5674
+ "getGuardrail": id => HttpClientRequest.get(`/guardrails/${id}`).pipe(withResponse(HttpClientResponse.matchStatus({
5675
+ "2xx": decodeSuccess(GetGuardrail200),
5676
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5677
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5678
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5679
+ orElse: unexpectedStatus
5680
+ }))),
5681
+ "deleteGuardrail": id => HttpClientRequest.del(`/guardrails/${id}`).pipe(withResponse(HttpClientResponse.matchStatus({
5682
+ "2xx": decodeSuccess(DeleteGuardrail200),
5683
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5684
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5685
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5686
+ orElse: unexpectedStatus
5687
+ }))),
5688
+ "updateGuardrail": (id, options) => HttpClientRequest.patch(`/guardrails/${id}`).pipe(HttpClientRequest.bodyUnsafeJson(options), withResponse(HttpClientResponse.matchStatus({
5689
+ "2xx": decodeSuccess(UpdateGuardrail200),
5690
+ "400": decodeError("BadRequestResponse", BadRequestResponse),
5691
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5692
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5693
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5694
+ orElse: unexpectedStatus
5695
+ }))),
5696
+ "listKeyAssignments": options => HttpClientRequest.get(`/guardrails/assignments/keys`).pipe(HttpClientRequest.setUrlParams({
5697
+ "offset": options?.["offset"],
5698
+ "limit": options?.["limit"]
5699
+ }), withResponse(HttpClientResponse.matchStatus({
5700
+ "2xx": decodeSuccess(ListKeyAssignments200),
5701
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5702
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5703
+ orElse: unexpectedStatus
5704
+ }))),
5705
+ "listMemberAssignments": options => HttpClientRequest.get(`/guardrails/assignments/members`).pipe(HttpClientRequest.setUrlParams({
5706
+ "offset": options?.["offset"],
5707
+ "limit": options?.["limit"]
5708
+ }), withResponse(HttpClientResponse.matchStatus({
5709
+ "2xx": decodeSuccess(ListMemberAssignments200),
5710
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5711
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5712
+ orElse: unexpectedStatus
5713
+ }))),
5714
+ "listGuardrailKeyAssignments": (id, options) => HttpClientRequest.get(`/guardrails/${id}/assignments/keys`).pipe(HttpClientRequest.setUrlParams({
5715
+ "offset": options?.["offset"],
5716
+ "limit": options?.["limit"]
5717
+ }), withResponse(HttpClientResponse.matchStatus({
5718
+ "2xx": decodeSuccess(ListGuardrailKeyAssignments200),
5719
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5720
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5721
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5722
+ orElse: unexpectedStatus
5723
+ }))),
5724
+ "bulkAssignKeysToGuardrail": (id, options) => HttpClientRequest.post(`/guardrails/${id}/assignments/keys`).pipe(HttpClientRequest.bodyUnsafeJson(options), withResponse(HttpClientResponse.matchStatus({
5725
+ "2xx": decodeSuccess(BulkAssignKeysToGuardrail200),
5726
+ "400": decodeError("BadRequestResponse", BadRequestResponse),
5727
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5728
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5729
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5730
+ orElse: unexpectedStatus
5731
+ }))),
5732
+ "listGuardrailMemberAssignments": (id, options) => HttpClientRequest.get(`/guardrails/${id}/assignments/members`).pipe(HttpClientRequest.setUrlParams({
5733
+ "offset": options?.["offset"],
5734
+ "limit": options?.["limit"]
5735
+ }), withResponse(HttpClientResponse.matchStatus({
5736
+ "2xx": decodeSuccess(ListGuardrailMemberAssignments200),
5737
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5738
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5739
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5740
+ orElse: unexpectedStatus
5741
+ }))),
5742
+ "bulkAssignMembersToGuardrail": (id, options) => HttpClientRequest.post(`/guardrails/${id}/assignments/members`).pipe(HttpClientRequest.bodyUnsafeJson(options), withResponse(HttpClientResponse.matchStatus({
5743
+ "2xx": decodeSuccess(BulkAssignMembersToGuardrail200),
5744
+ "400": decodeError("BadRequestResponse", BadRequestResponse),
5745
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5746
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5747
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5748
+ orElse: unexpectedStatus
5749
+ }))),
5750
+ "bulkUnassignKeysFromGuardrail": (id, options) => HttpClientRequest.post(`/guardrails/${id}/assignments/keys/remove`).pipe(HttpClientRequest.bodyUnsafeJson(options), withResponse(HttpClientResponse.matchStatus({
5751
+ "2xx": decodeSuccess(BulkUnassignKeysFromGuardrail200),
5752
+ "400": decodeError("BadRequestResponse", BadRequestResponse),
5753
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5754
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5755
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5756
+ orElse: unexpectedStatus
5757
+ }))),
5758
+ "bulkUnassignMembersFromGuardrail": (id, options) => HttpClientRequest.post(`/guardrails/${id}/assignments/members/remove`).pipe(HttpClientRequest.bodyUnsafeJson(options), withResponse(HttpClientResponse.matchStatus({
5759
+ "2xx": decodeSuccess(BulkUnassignMembersFromGuardrail200),
5760
+ "400": decodeError("BadRequestResponse", BadRequestResponse),
5761
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5762
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5763
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5764
+ orElse: unexpectedStatus
5765
+ }))),
3858
5766
  "getCurrentKey": () => HttpClientRequest.get(`/key`).pipe(withResponse(HttpClientResponse.matchStatus({
3859
5767
  "2xx": decodeSuccess(GetCurrentKey200),
3860
5768
  "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),