@deeprelay/sdk 0.2.0 → 0.3.0
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.
- package/.openapi-generator/FILES +66 -0
- package/README.md +47 -11
- package/dist/apis/AlertsApi.d.ts +50 -0
- package/dist/apis/AlertsApi.js +127 -0
- package/dist/apis/ApiKeysApi.d.ts +107 -0
- package/dist/apis/ApiKeysApi.js +284 -0
- package/dist/apis/BillingApi.d.ts +25 -7
- package/dist/apis/BillingApi.js +57 -7
- package/dist/apis/InferenceApi.d.ts +12 -1
- package/dist/apis/InferenceApi.js +22 -1
- package/dist/apis/MetaApi.d.ts +1 -1
- package/dist/apis/MetaApi.js +1 -1
- package/dist/apis/RequestsApi.d.ts +130 -0
- package/dist/apis/RequestsApi.js +269 -0
- package/dist/apis/UsageApi.d.ts +15 -1
- package/dist/apis/UsageApi.js +19 -2
- package/dist/apis/WebhooksApi.d.ts +1 -1
- package/dist/apis/WebhooksApi.js +1 -1
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/AlertsApi.d.ts +50 -0
- package/dist/esm/apis/AlertsApi.js +123 -0
- package/dist/esm/apis/ApiKeysApi.d.ts +107 -0
- package/dist/esm/apis/ApiKeysApi.js +280 -0
- package/dist/esm/apis/BillingApi.d.ts +25 -7
- package/dist/esm/apis/BillingApi.js +57 -7
- package/dist/esm/apis/InferenceApi.d.ts +12 -1
- package/dist/esm/apis/InferenceApi.js +22 -1
- package/dist/esm/apis/MetaApi.d.ts +1 -1
- package/dist/esm/apis/MetaApi.js +1 -1
- package/dist/esm/apis/RequestsApi.d.ts +130 -0
- package/dist/esm/apis/RequestsApi.js +265 -0
- package/dist/esm/apis/UsageApi.d.ts +15 -1
- package/dist/esm/apis/UsageApi.js +18 -1
- package/dist/esm/apis/WebhooksApi.d.ts +1 -1
- package/dist/esm/apis/WebhooksApi.js +1 -1
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/AlertEmailToggles.d.ts +50 -0
- package/dist/esm/models/AlertEmailToggles.js +55 -0
- package/dist/esm/models/AlertSettings.d.ts +51 -0
- package/dist/esm/models/AlertSettings.js +56 -0
- package/dist/esm/models/AlertSettingsUpdate.d.ts +39 -0
- package/dist/esm/models/AlertSettingsUpdate.js +48 -0
- package/dist/esm/models/ApiKey.d.ts +123 -0
- package/dist/esm/models/ApiKey.js +96 -0
- package/dist/esm/models/ApiKeyCreate.d.ts +70 -0
- package/dist/esm/models/ApiKeyCreate.js +57 -0
- package/dist/esm/models/ApiKeyCreated.d.ts +129 -0
- package/dist/esm/models/ApiKeyCreated.js +100 -0
- package/dist/esm/models/ApiKeyList.d.ts +33 -0
- package/dist/esm/models/ApiKeyList.js +44 -0
- package/dist/esm/models/ApiKeyScopes.d.ts +65 -0
- package/dist/esm/models/ApiKeyScopes.js +66 -0
- package/dist/esm/models/ApiKeyUpdate.d.ts +62 -0
- package/dist/esm/models/ApiKeyUpdate.js +51 -0
- package/dist/esm/models/Balance.d.ts +1 -1
- package/dist/esm/models/Balance.js +1 -1
- package/dist/esm/models/ChatChoice.d.ts +11 -1
- package/dist/esm/models/ChatChoice.js +3 -1
- package/dist/esm/models/ChatCompletionRequest.d.ts +78 -2
- package/dist/esm/models/ChatCompletionRequest.js +26 -1
- package/dist/esm/models/ChatCompletionRequestResponseFormat.d.ts +31 -0
- package/dist/esm/models/ChatCompletionRequestResponseFormat.js +52 -0
- package/dist/esm/models/ChatCompletionRequestToolChoice.d.ts +23 -0
- package/dist/esm/models/ChatCompletionRequestToolChoice.js +50 -0
- package/dist/esm/models/ChatCompletionResponse.d.ts +1 -1
- package/dist/esm/models/ChatCompletionResponse.js +1 -1
- package/dist/esm/models/ChatMessage.d.ts +22 -2
- package/dist/esm/models/ChatMessage.js +10 -5
- package/dist/esm/models/CostDetails.d.ts +59 -0
- package/dist/esm/models/CostDetails.js +59 -0
- package/dist/esm/models/CreateCryptoDepositRequest.d.ts +4 -1
- package/dist/esm/models/CreateCryptoDepositRequest.js +4 -2
- package/dist/esm/models/CreateWebhookEndpointRequest.d.ts +5 -1
- package/dist/esm/models/CreateWebhookEndpointRequest.js +6 -2
- package/dist/esm/models/CryptoDeposit.d.ts +3 -1
- package/dist/esm/models/CryptoDeposit.js +4 -2
- package/dist/esm/models/Embedding.d.ts +1 -1
- package/dist/esm/models/Embedding.js +1 -1
- package/dist/esm/models/EmbeddingsRequest.d.ts +1 -1
- package/dist/esm/models/EmbeddingsRequest.js +1 -1
- package/dist/esm/models/EmbeddingsRequestInput.d.ts +1 -1
- package/dist/esm/models/EmbeddingsRequestInput.js +1 -1
- package/dist/esm/models/EmbeddingsResponse.d.ts +1 -1
- package/dist/esm/models/EmbeddingsResponse.js +1 -1
- package/dist/esm/models/EmbeddingsUsage.d.ts +1 -1
- package/dist/esm/models/EmbeddingsUsage.js +1 -1
- package/dist/esm/models/GetHealth200Response.d.ts +1 -1
- package/dist/esm/models/GetHealth200Response.js +1 -1
- package/dist/esm/models/ImagesGenerationsRequest.d.ts +2 -2
- package/dist/esm/models/ImagesGenerationsRequest.js +1 -1
- package/dist/esm/models/ImagesResponse.d.ts +1 -1
- package/dist/esm/models/ImagesResponse.js +1 -1
- package/dist/esm/models/ImagesResponseDataInner.d.ts +1 -1
- package/dist/esm/models/ImagesResponseDataInner.js +1 -1
- package/dist/esm/models/ImagesResponseUsage.d.ts +1 -1
- package/dist/esm/models/ImagesResponseUsage.js +1 -1
- package/dist/esm/models/InferencePreflight.d.ts +5 -2
- package/dist/esm/models/InferencePreflight.js +4 -1
- package/dist/esm/models/JSONSchemaFormat.d.ts +54 -0
- package/dist/esm/models/JSONSchemaFormat.js +49 -0
- package/dist/esm/models/ListDeposits200Response.d.ts +1 -1
- package/dist/esm/models/ListDeposits200Response.js +1 -1
- package/dist/esm/models/Model.d.ts +54 -5
- package/dist/esm/models/Model.js +21 -2
- package/dist/esm/models/ModelList.d.ts +1 -1
- package/dist/esm/models/ModelList.js +1 -1
- package/dist/esm/models/ModelMetrics.d.ts +101 -0
- package/dist/esm/models/ModelMetrics.js +85 -0
- package/dist/esm/models/ModelParametersInner.d.ts +1 -1
- package/dist/esm/models/ModelParametersInner.js +1 -1
- package/dist/esm/models/ModelPricing.d.ts +1 -1
- package/dist/esm/models/ModelPricing.js +1 -1
- package/dist/esm/models/ModelRate.d.ts +1 -1
- package/dist/esm/models/ModelRate.js +1 -1
- package/dist/esm/models/OpenAIErrorEnvelope.d.ts +1 -1
- package/dist/esm/models/OpenAIErrorEnvelope.js +1 -1
- package/dist/esm/models/OpenAIErrorEnvelopeError.d.ts +8 -2
- package/dist/esm/models/OpenAIErrorEnvelopeError.js +3 -1
- package/dist/esm/models/PeakWindow.d.ts +1 -1
- package/dist/esm/models/PeakWindow.js +1 -1
- package/dist/esm/models/Problem.d.ts +22 -1
- package/dist/esm/models/Problem.js +14 -1
- package/dist/esm/models/RefereeStatus.d.ts +1 -1
- package/dist/esm/models/RefereeStatus.js +1 -1
- package/dist/esm/models/Referral.d.ts +14 -2
- package/dist/esm/models/Referral.js +9 -1
- package/dist/esm/models/RequestLogEntry.d.ts +210 -0
- package/dist/esm/models/RequestLogEntry.js +129 -0
- package/dist/esm/models/RequestLogPage.d.ts +45 -0
- package/dist/esm/models/RequestLogPage.js +52 -0
- package/dist/esm/models/ResponseFormatJSONObject.d.ts +39 -0
- package/dist/esm/models/ResponseFormatJSONObject.js +51 -0
- package/dist/esm/models/ResponseFormatJSONSchema.d.ts +46 -0
- package/dist/esm/models/ResponseFormatJSONSchema.js +56 -0
- package/dist/esm/models/ResponseFormatText.d.ts +39 -0
- package/dist/esm/models/ResponseFormatText.js +51 -0
- package/dist/esm/models/SpendingLimit.d.ts +1 -1
- package/dist/esm/models/SpendingLimit.js +1 -1
- package/dist/esm/models/StreamOptions.d.ts +1 -1
- package/dist/esm/models/StreamOptions.js +1 -1
- package/dist/esm/models/Subscription.d.ts +9 -2
- package/dist/esm/models/Subscription.js +6 -1
- package/dist/esm/models/SubscriptionCheckoutRequest.d.ts +18 -4
- package/dist/esm/models/SubscriptionCheckoutRequest.js +10 -1
- package/dist/esm/models/SubscriptionCheckoutSession.d.ts +21 -1
- package/dist/esm/models/SubscriptionCheckoutSession.js +12 -1
- package/dist/esm/models/SubscriptionModelUsage.d.ts +68 -0
- package/dist/esm/models/SubscriptionModelUsage.js +67 -0
- package/dist/esm/models/SubscriptionPlan.d.ts +4 -4
- package/dist/esm/models/SubscriptionPlan.js +1 -1
- package/dist/esm/models/SubscriptionPortalRequest.d.ts +1 -1
- package/dist/esm/models/SubscriptionPortalRequest.js +1 -1
- package/dist/esm/models/SubscriptionPortalSession.d.ts +1 -1
- package/dist/esm/models/SubscriptionPortalSession.js +1 -1
- package/dist/esm/models/SubscriptionPrice.d.ts +1 -1
- package/dist/esm/models/SubscriptionPrice.js +1 -1
- package/dist/esm/models/SubscriptionQuota.d.ts +10 -4
- package/dist/esm/models/SubscriptionQuota.js +8 -4
- package/dist/esm/models/SubscriptionTier.d.ts +53 -0
- package/dist/esm/models/SubscriptionTier.js +55 -0
- package/dist/esm/models/SubscriptionUpgradeRequest.d.ts +32 -0
- package/dist/esm/models/SubscriptionUpgradeRequest.js +43 -0
- package/dist/esm/models/SubscriptionUsage.d.ts +28 -3
- package/dist/esm/models/SubscriptionUsage.js +15 -4
- package/dist/esm/models/Tool.d.ts +46 -0
- package/dist/esm/models/Tool.js +56 -0
- package/dist/esm/models/ToolCall.d.ts +60 -0
- package/dist/esm/models/ToolCall.js +56 -0
- package/dist/esm/models/ToolCallFunction.d.ts +39 -0
- package/dist/esm/models/ToolCallFunction.js +47 -0
- package/dist/esm/models/ToolChoiceFunction.d.ts +46 -0
- package/dist/esm/models/ToolChoiceFunction.js +56 -0
- package/dist/esm/models/ToolChoiceFunctionFunction.d.ts +32 -0
- package/dist/esm/models/ToolChoiceFunctionFunction.js +43 -0
- package/dist/esm/models/ToolFunction.d.ts +47 -0
- package/dist/esm/models/ToolFunction.js +47 -0
- package/dist/esm/models/UpdateSpendingLimitRequest.d.ts +1 -1
- package/dist/esm/models/UpdateSpendingLimitRequest.js +1 -1
- package/dist/esm/models/Usage.d.ts +29 -1
- package/dist/esm/models/Usage.js +12 -1
- package/dist/esm/models/UsageBucket.d.ts +39 -6
- package/dist/esm/models/UsageBucket.js +11 -1
- package/dist/esm/models/UsageCompletionTokensDetails.d.ts +32 -0
- package/dist/esm/models/UsageCompletionTokensDetails.js +41 -0
- package/dist/esm/models/UsagePage.d.ts +2 -1
- package/dist/esm/models/UsagePage.js +1 -1
- package/dist/esm/models/UsagePromptTokensDetails.d.ts +33 -0
- package/dist/esm/models/UsagePromptTokensDetails.js +41 -0
- package/dist/esm/models/VideoCreateRequest.d.ts +1 -1
- package/dist/esm/models/VideoCreateRequest.js +1 -1
- package/dist/esm/models/VideoJob.d.ts +1 -1
- package/dist/esm/models/VideoJob.js +1 -1
- package/dist/esm/models/VideoList.d.ts +1 -1
- package/dist/esm/models/VideoList.js +1 -1
- package/dist/esm/models/WebhookEndpoint.d.ts +5 -1
- package/dist/esm/models/WebhookEndpoint.js +6 -2
- package/dist/esm/models/WebhookEndpointPage.d.ts +1 -1
- package/dist/esm/models/WebhookEndpointPage.js +1 -1
- package/dist/esm/models/index.d.ts +30 -0
- package/dist/esm/models/index.js +30 -0
- package/dist/esm/runtime.d.ts +1 -1
- package/dist/esm/runtime.js +2 -2
- package/dist/models/AlertEmailToggles.d.ts +50 -0
- package/dist/models/AlertEmailToggles.js +62 -0
- package/dist/models/AlertSettings.d.ts +51 -0
- package/dist/models/AlertSettings.js +63 -0
- package/dist/models/AlertSettingsUpdate.d.ts +39 -0
- package/dist/models/AlertSettingsUpdate.js +55 -0
- package/dist/models/ApiKey.d.ts +123 -0
- package/dist/models/ApiKey.js +103 -0
- package/dist/models/ApiKeyCreate.d.ts +70 -0
- package/dist/models/ApiKeyCreate.js +64 -0
- package/dist/models/ApiKeyCreated.d.ts +129 -0
- package/dist/models/ApiKeyCreated.js +107 -0
- package/dist/models/ApiKeyList.d.ts +33 -0
- package/dist/models/ApiKeyList.js +51 -0
- package/dist/models/ApiKeyScopes.d.ts +65 -0
- package/dist/models/ApiKeyScopes.js +74 -0
- package/dist/models/ApiKeyUpdate.d.ts +62 -0
- package/dist/models/ApiKeyUpdate.js +58 -0
- package/dist/models/Balance.d.ts +1 -1
- package/dist/models/Balance.js +1 -1
- package/dist/models/ChatChoice.d.ts +11 -1
- package/dist/models/ChatChoice.js +3 -1
- package/dist/models/ChatCompletionRequest.d.ts +78 -2
- package/dist/models/ChatCompletionRequest.js +26 -1
- package/dist/models/ChatCompletionRequestResponseFormat.d.ts +31 -0
- package/dist/models/ChatCompletionRequestResponseFormat.js +58 -0
- package/dist/models/ChatCompletionRequestToolChoice.d.ts +23 -0
- package/dist/models/ChatCompletionRequestToolChoice.js +56 -0
- package/dist/models/ChatCompletionResponse.d.ts +1 -1
- package/dist/models/ChatCompletionResponse.js +1 -1
- package/dist/models/ChatMessage.d.ts +22 -2
- package/dist/models/ChatMessage.js +10 -5
- package/dist/models/CostDetails.d.ts +59 -0
- package/dist/models/CostDetails.js +66 -0
- package/dist/models/CreateCryptoDepositRequest.d.ts +4 -1
- package/dist/models/CreateCryptoDepositRequest.js +4 -2
- package/dist/models/CreateWebhookEndpointRequest.d.ts +5 -1
- package/dist/models/CreateWebhookEndpointRequest.js +6 -2
- package/dist/models/CryptoDeposit.d.ts +3 -1
- package/dist/models/CryptoDeposit.js +4 -2
- package/dist/models/Embedding.d.ts +1 -1
- package/dist/models/Embedding.js +1 -1
- package/dist/models/EmbeddingsRequest.d.ts +1 -1
- package/dist/models/EmbeddingsRequest.js +1 -1
- package/dist/models/EmbeddingsRequestInput.d.ts +1 -1
- package/dist/models/EmbeddingsRequestInput.js +1 -1
- package/dist/models/EmbeddingsResponse.d.ts +1 -1
- package/dist/models/EmbeddingsResponse.js +1 -1
- package/dist/models/EmbeddingsUsage.d.ts +1 -1
- package/dist/models/EmbeddingsUsage.js +1 -1
- package/dist/models/GetHealth200Response.d.ts +1 -1
- package/dist/models/GetHealth200Response.js +1 -1
- package/dist/models/ImagesGenerationsRequest.d.ts +2 -2
- package/dist/models/ImagesGenerationsRequest.js +1 -1
- package/dist/models/ImagesResponse.d.ts +1 -1
- package/dist/models/ImagesResponse.js +1 -1
- package/dist/models/ImagesResponseDataInner.d.ts +1 -1
- package/dist/models/ImagesResponseDataInner.js +1 -1
- package/dist/models/ImagesResponseUsage.d.ts +1 -1
- package/dist/models/ImagesResponseUsage.js +1 -1
- package/dist/models/InferencePreflight.d.ts +5 -2
- package/dist/models/InferencePreflight.js +4 -1
- package/dist/models/JSONSchemaFormat.d.ts +54 -0
- package/dist/models/JSONSchemaFormat.js +56 -0
- package/dist/models/ListDeposits200Response.d.ts +1 -1
- package/dist/models/ListDeposits200Response.js +1 -1
- package/dist/models/Model.d.ts +54 -5
- package/dist/models/Model.js +21 -2
- package/dist/models/ModelList.d.ts +1 -1
- package/dist/models/ModelList.js +1 -1
- package/dist/models/ModelMetrics.d.ts +101 -0
- package/dist/models/ModelMetrics.js +93 -0
- package/dist/models/ModelParametersInner.d.ts +1 -1
- package/dist/models/ModelParametersInner.js +1 -1
- package/dist/models/ModelPricing.d.ts +1 -1
- package/dist/models/ModelPricing.js +1 -1
- package/dist/models/ModelRate.d.ts +1 -1
- package/dist/models/ModelRate.js +1 -1
- package/dist/models/OpenAIErrorEnvelope.d.ts +1 -1
- package/dist/models/OpenAIErrorEnvelope.js +1 -1
- package/dist/models/OpenAIErrorEnvelopeError.d.ts +8 -2
- package/dist/models/OpenAIErrorEnvelopeError.js +3 -1
- package/dist/models/PeakWindow.d.ts +1 -1
- package/dist/models/PeakWindow.js +1 -1
- package/dist/models/Problem.d.ts +22 -1
- package/dist/models/Problem.js +14 -1
- package/dist/models/RefereeStatus.d.ts +1 -1
- package/dist/models/RefereeStatus.js +1 -1
- package/dist/models/Referral.d.ts +14 -2
- package/dist/models/Referral.js +9 -1
- package/dist/models/RequestLogEntry.d.ts +210 -0
- package/dist/models/RequestLogEntry.js +137 -0
- package/dist/models/RequestLogPage.d.ts +45 -0
- package/dist/models/RequestLogPage.js +59 -0
- package/dist/models/ResponseFormatJSONObject.d.ts +39 -0
- package/dist/models/ResponseFormatJSONObject.js +59 -0
- package/dist/models/ResponseFormatJSONSchema.d.ts +46 -0
- package/dist/models/ResponseFormatJSONSchema.js +64 -0
- package/dist/models/ResponseFormatText.d.ts +39 -0
- package/dist/models/ResponseFormatText.js +59 -0
- package/dist/models/SpendingLimit.d.ts +1 -1
- package/dist/models/SpendingLimit.js +1 -1
- package/dist/models/StreamOptions.d.ts +1 -1
- package/dist/models/StreamOptions.js +1 -1
- package/dist/models/Subscription.d.ts +9 -2
- package/dist/models/Subscription.js +6 -1
- package/dist/models/SubscriptionCheckoutRequest.d.ts +18 -4
- package/dist/models/SubscriptionCheckoutRequest.js +11 -1
- package/dist/models/SubscriptionCheckoutSession.d.ts +21 -1
- package/dist/models/SubscriptionCheckoutSession.js +13 -1
- package/dist/models/SubscriptionModelUsage.d.ts +68 -0
- package/dist/models/SubscriptionModelUsage.js +74 -0
- package/dist/models/SubscriptionPlan.d.ts +4 -4
- package/dist/models/SubscriptionPlan.js +1 -1
- package/dist/models/SubscriptionPortalRequest.d.ts +1 -1
- package/dist/models/SubscriptionPortalRequest.js +1 -1
- package/dist/models/SubscriptionPortalSession.d.ts +1 -1
- package/dist/models/SubscriptionPortalSession.js +1 -1
- package/dist/models/SubscriptionPrice.d.ts +1 -1
- package/dist/models/SubscriptionPrice.js +1 -1
- package/dist/models/SubscriptionQuota.d.ts +10 -4
- package/dist/models/SubscriptionQuota.js +8 -4
- package/dist/models/SubscriptionTier.d.ts +53 -0
- package/dist/models/SubscriptionTier.js +62 -0
- package/dist/models/SubscriptionUpgradeRequest.d.ts +32 -0
- package/dist/models/SubscriptionUpgradeRequest.js +50 -0
- package/dist/models/SubscriptionUsage.d.ts +28 -3
- package/dist/models/SubscriptionUsage.js +15 -4
- package/dist/models/Tool.d.ts +46 -0
- package/dist/models/Tool.js +64 -0
- package/dist/models/ToolCall.d.ts +60 -0
- package/dist/models/ToolCall.js +64 -0
- package/dist/models/ToolCallFunction.d.ts +39 -0
- package/dist/models/ToolCallFunction.js +54 -0
- package/dist/models/ToolChoiceFunction.d.ts +46 -0
- package/dist/models/ToolChoiceFunction.js +64 -0
- package/dist/models/ToolChoiceFunctionFunction.d.ts +32 -0
- package/dist/models/ToolChoiceFunctionFunction.js +50 -0
- package/dist/models/ToolFunction.d.ts +47 -0
- package/dist/models/ToolFunction.js +54 -0
- package/dist/models/UpdateSpendingLimitRequest.d.ts +1 -1
- package/dist/models/UpdateSpendingLimitRequest.js +1 -1
- package/dist/models/Usage.d.ts +29 -1
- package/dist/models/Usage.js +12 -1
- package/dist/models/UsageBucket.d.ts +39 -6
- package/dist/models/UsageBucket.js +11 -1
- package/dist/models/UsageCompletionTokensDetails.d.ts +32 -0
- package/dist/models/UsageCompletionTokensDetails.js +48 -0
- package/dist/models/UsagePage.d.ts +2 -1
- package/dist/models/UsagePage.js +1 -1
- package/dist/models/UsagePromptTokensDetails.d.ts +33 -0
- package/dist/models/UsagePromptTokensDetails.js +48 -0
- package/dist/models/VideoCreateRequest.d.ts +1 -1
- package/dist/models/VideoCreateRequest.js +1 -1
- package/dist/models/VideoJob.d.ts +1 -1
- package/dist/models/VideoJob.js +1 -1
- package/dist/models/VideoList.d.ts +1 -1
- package/dist/models/VideoList.js +1 -1
- package/dist/models/WebhookEndpoint.d.ts +5 -1
- package/dist/models/WebhookEndpoint.js +6 -2
- package/dist/models/WebhookEndpointPage.d.ts +1 -1
- package/dist/models/WebhookEndpointPage.js +1 -1
- package/dist/models/index.d.ts +30 -0
- package/dist/models/index.js +30 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +2 -2
- package/docs/AlertEmailToggles.md +40 -0
- package/docs/AlertSettings.md +40 -0
- package/docs/AlertSettingsUpdate.md +36 -0
- package/docs/AlertsApi.md +151 -0
- package/docs/ApiKey.md +65 -0
- package/docs/ApiKeyCreate.md +46 -0
- package/docs/ApiKeyCreated.md +67 -0
- package/docs/ApiKeyList.md +34 -0
- package/docs/ApiKeyScopes.md +38 -0
- package/docs/ApiKeyUpdate.md +45 -0
- package/docs/ApiKeysApi.md +389 -0
- package/docs/BillingApi.md +83 -3
- package/docs/ChatChoice.md +2 -0
- package/docs/ChatCompletionRequest.md +22 -0
- package/docs/ChatCompletionRequestResponseFormat.md +37 -0
- package/docs/ChatCompletionRequestToolChoice.md +37 -0
- package/docs/ChatMessage.md +4 -0
- package/docs/CostDetails.md +43 -0
- package/docs/InferenceApi.md +94 -71
- package/docs/JSONSchemaFormat.md +41 -0
- package/docs/Model.md +16 -0
- package/docs/ModelMetrics.md +55 -0
- package/docs/OpenAIErrorEnvelopeError.md +2 -0
- package/docs/Problem.md +4 -0
- package/docs/Referral.md +6 -2
- package/docs/RequestLogEntry.md +87 -0
- package/docs/RequestLogPage.md +38 -0
- package/docs/RequestsApi.md +282 -0
- package/docs/ResponseFormatJSONObject.md +35 -0
- package/docs/ResponseFormatJSONSchema.md +36 -0
- package/docs/ResponseFormatText.md +34 -0
- package/docs/Subscription.md +3 -1
- package/docs/SubscriptionCheckoutRequest.md +2 -0
- package/docs/SubscriptionCheckoutSession.md +4 -0
- package/docs/SubscriptionModelUsage.md +47 -0
- package/docs/SubscriptionPlan.md +1 -1
- package/docs/SubscriptionQuota.md +5 -3
- package/docs/SubscriptionTier.md +41 -0
- package/docs/SubscriptionUpgradeRequest.md +34 -0
- package/docs/SubscriptionUsage.md +10 -2
- package/docs/Tool.md +36 -0
- package/docs/ToolCall.md +41 -0
- package/docs/ToolCallFunction.md +36 -0
- package/docs/ToolChoiceFunction.md +36 -0
- package/docs/ToolChoiceFunctionFunction.md +34 -0
- package/docs/ToolFunction.md +38 -0
- package/docs/Usage.md +8 -0
- package/docs/UsageApi.md +17 -9
- package/docs/UsageBucket.md +11 -0
- package/docs/UsageCompletionTokensDetails.md +34 -0
- package/docs/UsagePromptTokensDetails.md +35 -0
- package/package.json +1 -1
- package/src/apis/AlertsApi.ts +145 -0
- package/src/apis/ApiKeysApi.ts +357 -0
- package/src/apis/BillingApi.ts +73 -7
- package/src/apis/InferenceApi.ts +32 -1
- package/src/apis/MetaApi.ts +1 -1
- package/src/apis/RequestsApi.ts +335 -0
- package/src/apis/UsageApi.ts +23 -1
- package/src/apis/WebhooksApi.ts +1 -1
- package/src/apis/index.ts +3 -0
- package/src/models/AlertEmailToggles.ts +93 -0
- package/src/models/AlertSettings.ts +101 -0
- package/src/models/AlertSettingsUpdate.ts +83 -0
- package/src/models/ApiKey.ts +205 -0
- package/src/models/ApiKeyCreate.ts +115 -0
- package/src/models/ApiKeyCreated.ts +214 -0
- package/src/models/ApiKeyList.ts +74 -0
- package/src/models/ApiKeyScopes.ts +106 -0
- package/src/models/ApiKeyUpdate.ts +105 -0
- package/src/models/Balance.ts +1 -1
- package/src/models/ChatChoice.ts +11 -1
- package/src/models/ChatCompletionRequest.ts +118 -2
- package/src/models/ChatCompletionRequestResponseFormat.ts +84 -0
- package/src/models/ChatCompletionRequestToolChoice.ts +70 -0
- package/src/models/ChatCompletionResponse.ts +1 -1
- package/src/models/ChatMessage.ts +35 -5
- package/src/models/CostDetails.ts +105 -0
- package/src/models/CreateCryptoDepositRequest.ts +5 -2
- package/src/models/CreateWebhookEndpointRequest.ts +6 -2
- package/src/models/CryptoDeposit.ts +4 -2
- package/src/models/Embedding.ts +1 -1
- package/src/models/EmbeddingsRequest.ts +1 -1
- package/src/models/EmbeddingsRequestInput.ts +1 -1
- package/src/models/EmbeddingsResponse.ts +1 -1
- package/src/models/EmbeddingsUsage.ts +1 -1
- package/src/models/GetHealth200Response.ts +1 -1
- package/src/models/ImagesGenerationsRequest.ts +2 -2
- package/src/models/ImagesResponse.ts +1 -1
- package/src/models/ImagesResponseDataInner.ts +1 -1
- package/src/models/ImagesResponseUsage.ts +1 -1
- package/src/models/InferencePreflight.ts +5 -2
- package/src/models/JSONSchemaFormat.ts +92 -0
- package/src/models/ListDeposits200Response.ts +1 -1
- package/src/models/Model.ts +78 -6
- package/src/models/ModelList.ts +1 -1
- package/src/models/ModelMetrics.ts +165 -0
- package/src/models/ModelParametersInner.ts +1 -1
- package/src/models/ModelPricing.ts +1 -1
- package/src/models/ModelRate.ts +1 -1
- package/src/models/OpenAIErrorEnvelope.ts +1 -1
- package/src/models/OpenAIErrorEnvelopeError.ts +10 -2
- package/src/models/PeakWindow.ts +1 -1
- package/src/models/Problem.ts +26 -1
- package/src/models/RefereeStatus.ts +1 -1
- package/src/models/Referral.ts +20 -2
- package/src/models/RequestLogEntry.ts +307 -0
- package/src/models/RequestLogPage.ts +92 -0
- package/src/models/ResponseFormatJSONObject.ts +78 -0
- package/src/models/ResponseFormatJSONSchema.ts +95 -0
- package/src/models/ResponseFormatText.ts +78 -0
- package/src/models/SpendingLimit.ts +1 -1
- package/src/models/StreamOptions.ts +1 -1
- package/src/models/Subscription.ts +18 -2
- package/src/models/SubscriptionCheckoutRequest.ts +23 -4
- package/src/models/SubscriptionCheckoutSession.ts +28 -1
- package/src/models/SubscriptionModelUsage.ts +120 -0
- package/src/models/SubscriptionPlan.ts +4 -4
- package/src/models/SubscriptionPortalRequest.ts +1 -1
- package/src/models/SubscriptionPortalSession.ts +1 -1
- package/src/models/SubscriptionPrice.ts +1 -1
- package/src/models/SubscriptionQuota.ts +16 -7
- package/src/models/SubscriptionTier.ts +108 -0
- package/src/models/SubscriptionUpgradeRequest.ts +66 -0
- package/src/models/SubscriptionUsage.ts +47 -6
- package/src/models/Tool.ts +95 -0
- package/src/models/ToolCall.ts +110 -0
- package/src/models/ToolCallFunction.ts +76 -0
- package/src/models/ToolChoiceFunction.ts +95 -0
- package/src/models/ToolChoiceFunctionFunction.ts +66 -0
- package/src/models/ToolFunction.ts +83 -0
- package/src/models/UpdateSpendingLimitRequest.ts +1 -1
- package/src/models/Usage.ts +56 -1
- package/src/models/UsageBucket.ts +49 -6
- package/src/models/UsageCompletionTokensDetails.ts +65 -0
- package/src/models/UsagePage.ts +2 -1
- package/src/models/UsagePromptTokensDetails.ts +66 -0
- package/src/models/VideoCreateRequest.ts +1 -1
- package/src/models/VideoJob.ts +1 -1
- package/src/models/VideoList.ts +1 -1
- package/src/models/WebhookEndpoint.ts +6 -2
- package/src/models/WebhookEndpointPage.ts +1 -1
- package/src/models/index.ts +30 -0
- package/src/runtime.ts +2 -2
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* deeprelay Public Developer API
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@deeprelay.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type Problem,
|
|
18
|
+
ProblemFromJSON,
|
|
19
|
+
ProblemToJSON,
|
|
20
|
+
} from '../models/Problem';
|
|
21
|
+
import {
|
|
22
|
+
type RequestLogEntry,
|
|
23
|
+
RequestLogEntryFromJSON,
|
|
24
|
+
RequestLogEntryToJSON,
|
|
25
|
+
} from '../models/RequestLogEntry';
|
|
26
|
+
import {
|
|
27
|
+
type RequestLogPage,
|
|
28
|
+
RequestLogPageFromJSON,
|
|
29
|
+
RequestLogPageToJSON,
|
|
30
|
+
} from '../models/RequestLogPage';
|
|
31
|
+
|
|
32
|
+
export interface ExportRequestsRequest {
|
|
33
|
+
key?: string;
|
|
34
|
+
model?: string;
|
|
35
|
+
surface?: ExportRequestsSurfaceEnum;
|
|
36
|
+
status?: ExportRequestsStatusEnum;
|
|
37
|
+
errorCode?: string;
|
|
38
|
+
clientRequestId?: string;
|
|
39
|
+
from?: Date;
|
|
40
|
+
to?: Date;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface GetRequestRequest {
|
|
44
|
+
id: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface ListRequestsRequest {
|
|
48
|
+
key?: string;
|
|
49
|
+
model?: string;
|
|
50
|
+
surface?: ListRequestsSurfaceEnum;
|
|
51
|
+
status?: ListRequestsStatusEnum;
|
|
52
|
+
errorCode?: string;
|
|
53
|
+
clientRequestId?: string;
|
|
54
|
+
from?: Date;
|
|
55
|
+
to?: Date;
|
|
56
|
+
cursor?: string;
|
|
57
|
+
limit?: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
export class RequestsApi extends runtime.BaseAPI {
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Creates request options for exportRequests without sending the request
|
|
67
|
+
*/
|
|
68
|
+
async exportRequestsRequestOpts(requestParameters: ExportRequestsRequest): Promise<runtime.RequestOpts> {
|
|
69
|
+
const queryParameters: any = {};
|
|
70
|
+
|
|
71
|
+
if (requestParameters['key'] != null) {
|
|
72
|
+
queryParameters['key'] = requestParameters['key'];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (requestParameters['model'] != null) {
|
|
76
|
+
queryParameters['model'] = requestParameters['model'];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (requestParameters['surface'] != null) {
|
|
80
|
+
queryParameters['surface'] = requestParameters['surface'];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (requestParameters['status'] != null) {
|
|
84
|
+
queryParameters['status'] = requestParameters['status'];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (requestParameters['errorCode'] != null) {
|
|
88
|
+
queryParameters['error_code'] = requestParameters['errorCode'];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (requestParameters['clientRequestId'] != null) {
|
|
92
|
+
queryParameters['client_request_id'] = requestParameters['clientRequestId'];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (requestParameters['from'] != null) {
|
|
96
|
+
queryParameters['from'] = (requestParameters['from'] as any).toISOString();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (requestParameters['to'] != null) {
|
|
100
|
+
queryParameters['to'] = (requestParameters['to'] as any).toISOString();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
104
|
+
|
|
105
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
106
|
+
const token = this.configuration.accessToken;
|
|
107
|
+
const tokenString = await token("bearerAuth", []);
|
|
108
|
+
|
|
109
|
+
if (tokenString) {
|
|
110
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
let urlPath = `/requests/export`;
|
|
115
|
+
|
|
116
|
+
return {
|
|
117
|
+
path: urlPath,
|
|
118
|
+
method: 'GET',
|
|
119
|
+
headers: headerParameters,
|
|
120
|
+
query: queryParameters,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Streams every request-log row matching the filters as a CSV attachment, oldest columns first: `request_id, client_request_id, occurred_at, surface, model, key_id, key_name, key_prefix, status, http_status, error_code, finish_reason, prompt_tokens, completion_tokens, cached_tokens, reasoning_tokens, quota_units, cost, plan_covered, ttft_ms, duration_ms, ignored_params`. Takes the same filters and visibility rules as `GET /requests`, without the cursor and limit. The export is counted before anything is written. When the filters match more rows than the export cap, the answer is 422 `export_too_large` and the problem body carries `max_rows`; narrow the time range or add a filter, then export again. Requires the `serverless:read` scope. Exports have their own, tighter per-key rate limit.
|
|
126
|
+
* Export the request log as CSV
|
|
127
|
+
*/
|
|
128
|
+
async exportRequestsRaw(requestParameters: ExportRequestsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
|
129
|
+
const requestOptions = await this.exportRequestsRequestOpts(requestParameters);
|
|
130
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
131
|
+
|
|
132
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
133
|
+
return new runtime.JSONApiResponse<string>(response);
|
|
134
|
+
} else {
|
|
135
|
+
return new runtime.TextApiResponse(response) as any;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Streams every request-log row matching the filters as a CSV attachment, oldest columns first: `request_id, client_request_id, occurred_at, surface, model, key_id, key_name, key_prefix, status, http_status, error_code, finish_reason, prompt_tokens, completion_tokens, cached_tokens, reasoning_tokens, quota_units, cost, plan_covered, ttft_ms, duration_ms, ignored_params`. Takes the same filters and visibility rules as `GET /requests`, without the cursor and limit. The export is counted before anything is written. When the filters match more rows than the export cap, the answer is 422 `export_too_large` and the problem body carries `max_rows`; narrow the time range or add a filter, then export again. Requires the `serverless:read` scope. Exports have their own, tighter per-key rate limit.
|
|
141
|
+
* Export the request log as CSV
|
|
142
|
+
*/
|
|
143
|
+
async exportRequests(requestParameters: ExportRequestsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
|
|
144
|
+
const response = await this.exportRequestsRaw(requestParameters, initOverrides);
|
|
145
|
+
return await response.value();
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Creates request options for getRequest without sending the request
|
|
150
|
+
*/
|
|
151
|
+
async getRequestRequestOpts(requestParameters: GetRequestRequest): Promise<runtime.RequestOpts> {
|
|
152
|
+
if (requestParameters['id'] == null) {
|
|
153
|
+
throw new runtime.RequiredError(
|
|
154
|
+
'id',
|
|
155
|
+
'Required parameter "id" was null or undefined when calling getRequest().'
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const queryParameters: any = {};
|
|
160
|
+
|
|
161
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
162
|
+
|
|
163
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
164
|
+
const token = this.configuration.accessToken;
|
|
165
|
+
const tokenString = await token("bearerAuth", []);
|
|
166
|
+
|
|
167
|
+
if (tokenString) {
|
|
168
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
let urlPath = `/requests/{id}`;
|
|
173
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
174
|
+
|
|
175
|
+
return {
|
|
176
|
+
path: urlPath,
|
|
177
|
+
method: 'GET',
|
|
178
|
+
headers: headerParameters,
|
|
179
|
+
query: queryParameters,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Returns one request-log row. An unknown id, an id older than 90 days and an id the caller cannot see all answer the same 404. Requires the `serverless:read` scope.
|
|
185
|
+
* Get one request
|
|
186
|
+
*/
|
|
187
|
+
async getRequestRaw(requestParameters: GetRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RequestLogEntry>> {
|
|
188
|
+
const requestOptions = await this.getRequestRequestOpts(requestParameters);
|
|
189
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
190
|
+
|
|
191
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RequestLogEntryFromJSON(jsonValue));
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Returns one request-log row. An unknown id, an id older than 90 days and an id the caller cannot see all answer the same 404. Requires the `serverless:read` scope.
|
|
196
|
+
* Get one request
|
|
197
|
+
*/
|
|
198
|
+
async getRequest(requestParameters: GetRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RequestLogEntry> {
|
|
199
|
+
const response = await this.getRequestRaw(requestParameters, initOverrides);
|
|
200
|
+
return await response.value();
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Creates request options for listRequests without sending the request
|
|
205
|
+
*/
|
|
206
|
+
async listRequestsRequestOpts(requestParameters: ListRequestsRequest): Promise<runtime.RequestOpts> {
|
|
207
|
+
const queryParameters: any = {};
|
|
208
|
+
|
|
209
|
+
if (requestParameters['key'] != null) {
|
|
210
|
+
queryParameters['key'] = requestParameters['key'];
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if (requestParameters['model'] != null) {
|
|
214
|
+
queryParameters['model'] = requestParameters['model'];
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if (requestParameters['surface'] != null) {
|
|
218
|
+
queryParameters['surface'] = requestParameters['surface'];
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (requestParameters['status'] != null) {
|
|
222
|
+
queryParameters['status'] = requestParameters['status'];
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
if (requestParameters['errorCode'] != null) {
|
|
226
|
+
queryParameters['error_code'] = requestParameters['errorCode'];
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
if (requestParameters['clientRequestId'] != null) {
|
|
230
|
+
queryParameters['client_request_id'] = requestParameters['clientRequestId'];
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (requestParameters['from'] != null) {
|
|
234
|
+
queryParameters['from'] = (requestParameters['from'] as any).toISOString();
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
if (requestParameters['to'] != null) {
|
|
238
|
+
queryParameters['to'] = (requestParameters['to'] as any).toISOString();
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if (requestParameters['cursor'] != null) {
|
|
242
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
if (requestParameters['limit'] != null) {
|
|
246
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
250
|
+
|
|
251
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
252
|
+
const token = this.configuration.accessToken;
|
|
253
|
+
const tokenString = await token("bearerAuth", []);
|
|
254
|
+
|
|
255
|
+
if (tokenString) {
|
|
256
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
let urlPath = `/requests`;
|
|
261
|
+
|
|
262
|
+
return {
|
|
263
|
+
path: urlPath,
|
|
264
|
+
method: 'GET',
|
|
265
|
+
headers: headerParameters,
|
|
266
|
+
query: queryParameters,
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Returns one newest-first page of the organization\'s inference request log: one row per call to chat completions, messages, responses, embeddings, image generation or video creation, including calls that were refused before they reached a model (`status: rejected`). Rows are kept for 90 days; `window_days` says how far back the log reaches, and a `from` older than that is clamped rather than rejected. Visibility follows the caller. An org admin\'s key and a `full_access` key see the whole organization; any other key sees only its own rows. A `key` filter naming a key the caller cannot see returns an empty page. A row never carries prompt or completion content. `client_request_id` is the value the caller sent in `X-Client-Request-Id` (or `metadata.client_request_id` on `/responses`), kept for correlation. Requires the `serverless:read` scope. Reads are rate-limited per key (429 `rate_limited` with Retry-After).
|
|
272
|
+
* List requests (the request log)
|
|
273
|
+
*/
|
|
274
|
+
async listRequestsRaw(requestParameters: ListRequestsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RequestLogPage>> {
|
|
275
|
+
const requestOptions = await this.listRequestsRequestOpts(requestParameters);
|
|
276
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
277
|
+
|
|
278
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RequestLogPageFromJSON(jsonValue));
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Returns one newest-first page of the organization\'s inference request log: one row per call to chat completions, messages, responses, embeddings, image generation or video creation, including calls that were refused before they reached a model (`status: rejected`). Rows are kept for 90 days; `window_days` says how far back the log reaches, and a `from` older than that is clamped rather than rejected. Visibility follows the caller. An org admin\'s key and a `full_access` key see the whole organization; any other key sees only its own rows. A `key` filter naming a key the caller cannot see returns an empty page. A row never carries prompt or completion content. `client_request_id` is the value the caller sent in `X-Client-Request-Id` (or `metadata.client_request_id` on `/responses`), kept for correlation. Requires the `serverless:read` scope. Reads are rate-limited per key (429 `rate_limited` with Retry-After).
|
|
283
|
+
* List requests (the request log)
|
|
284
|
+
*/
|
|
285
|
+
async listRequests(requestParameters: ListRequestsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RequestLogPage> {
|
|
286
|
+
const response = await this.listRequestsRaw(requestParameters, initOverrides);
|
|
287
|
+
return await response.value();
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* @export
|
|
294
|
+
*/
|
|
295
|
+
export const ExportRequestsSurfaceEnum = {
|
|
296
|
+
Chat: 'chat',
|
|
297
|
+
Messages: 'messages',
|
|
298
|
+
Responses: 'responses',
|
|
299
|
+
Embeddings: 'embeddings',
|
|
300
|
+
Image: 'image',
|
|
301
|
+
Video: 'video'
|
|
302
|
+
} as const;
|
|
303
|
+
export type ExportRequestsSurfaceEnum = typeof ExportRequestsSurfaceEnum[keyof typeof ExportRequestsSurfaceEnum];
|
|
304
|
+
/**
|
|
305
|
+
* @export
|
|
306
|
+
*/
|
|
307
|
+
export const ExportRequestsStatusEnum = {
|
|
308
|
+
Ok: 'ok',
|
|
309
|
+
Error: 'error',
|
|
310
|
+
Cancelled: 'cancelled',
|
|
311
|
+
Rejected: 'rejected'
|
|
312
|
+
} as const;
|
|
313
|
+
export type ExportRequestsStatusEnum = typeof ExportRequestsStatusEnum[keyof typeof ExportRequestsStatusEnum];
|
|
314
|
+
/**
|
|
315
|
+
* @export
|
|
316
|
+
*/
|
|
317
|
+
export const ListRequestsSurfaceEnum = {
|
|
318
|
+
Chat: 'chat',
|
|
319
|
+
Messages: 'messages',
|
|
320
|
+
Responses: 'responses',
|
|
321
|
+
Embeddings: 'embeddings',
|
|
322
|
+
Image: 'image',
|
|
323
|
+
Video: 'video'
|
|
324
|
+
} as const;
|
|
325
|
+
export type ListRequestsSurfaceEnum = typeof ListRequestsSurfaceEnum[keyof typeof ListRequestsSurfaceEnum];
|
|
326
|
+
/**
|
|
327
|
+
* @export
|
|
328
|
+
*/
|
|
329
|
+
export const ListRequestsStatusEnum = {
|
|
330
|
+
Ok: 'ok',
|
|
331
|
+
Error: 'error',
|
|
332
|
+
Cancelled: 'cancelled',
|
|
333
|
+
Rejected: 'rejected'
|
|
334
|
+
} as const;
|
|
335
|
+
export type ListRequestsStatusEnum = typeof ListRequestsStatusEnum[keyof typeof ListRequestsStatusEnum];
|
package/src/apis/UsageApi.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* deeprelay Public Developer API
|
|
5
|
-
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0.0
|
|
8
8
|
* Contact: support@deeprelay.ai
|
|
@@ -31,6 +31,8 @@ export interface ListUsageRequest {
|
|
|
31
31
|
end?: Date;
|
|
32
32
|
cursor?: string;
|
|
33
33
|
limit?: number;
|
|
34
|
+
modality?: ListUsageModalityEnum;
|
|
35
|
+
model?: string;
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
/**
|
|
@@ -68,6 +70,14 @@ export class UsageApi extends runtime.BaseAPI {
|
|
|
68
70
|
queryParameters['limit'] = requestParameters['limit'];
|
|
69
71
|
}
|
|
70
72
|
|
|
73
|
+
if (requestParameters['modality'] != null) {
|
|
74
|
+
queryParameters['modality'] = requestParameters['modality'];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (requestParameters['model'] != null) {
|
|
78
|
+
queryParameters['model'] = requestParameters['model'];
|
|
79
|
+
}
|
|
80
|
+
|
|
71
81
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
72
82
|
|
|
73
83
|
if (this.configuration && this.configuration.accessToken) {
|
|
@@ -90,6 +100,7 @@ export class UsageApi extends runtime.BaseAPI {
|
|
|
90
100
|
}
|
|
91
101
|
|
|
92
102
|
/**
|
|
103
|
+
* Returns spend aggregated into time buckets over `[start, end)` (default: the last 30 days, `bucket=day`), newest bucket first. The response has one of two row shapes, selected by the query: - **Inference usage** — set `modality` and/or `model`. Rows aggregate serverless inference calls, one row per (bucket, modality, model), and carry `modality`, `model`, `prompt_tokens`, `completion_tokens` and `image_count`. This is the usage a serverless-inference customer is billed for. - **Instance usage** — neither `modality` nor `model` set. Rows aggregate GPU instance billing sessions, optionally split by `group_by`. With no instance usage this returns an empty `data` array, so to read inference spend always pass `modality` or `model`. Requires the `billing:read` scope.
|
|
93
104
|
* Time-bucketed usage
|
|
94
105
|
*/
|
|
95
106
|
async listUsageRaw(requestParameters: ListUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UsagePage>> {
|
|
@@ -100,6 +111,7 @@ export class UsageApi extends runtime.BaseAPI {
|
|
|
100
111
|
}
|
|
101
112
|
|
|
102
113
|
/**
|
|
114
|
+
* Returns spend aggregated into time buckets over `[start, end)` (default: the last 30 days, `bucket=day`), newest bucket first. The response has one of two row shapes, selected by the query: - **Inference usage** — set `modality` and/or `model`. Rows aggregate serverless inference calls, one row per (bucket, modality, model), and carry `modality`, `model`, `prompt_tokens`, `completion_tokens` and `image_count`. This is the usage a serverless-inference customer is billed for. - **Instance usage** — neither `modality` nor `model` set. Rows aggregate GPU instance billing sessions, optionally split by `group_by`. With no instance usage this returns an empty `data` array, so to read inference spend always pass `modality` or `model`. Requires the `billing:read` scope.
|
|
103
115
|
* Time-bucketed usage
|
|
104
116
|
*/
|
|
105
117
|
async listUsage(requestParameters: ListUsageRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsagePage> {
|
|
@@ -127,3 +139,13 @@ export const ListUsageGroupByEnum = {
|
|
|
127
139
|
GpuType: 'gpu_type'
|
|
128
140
|
} as const;
|
|
129
141
|
export type ListUsageGroupByEnum = typeof ListUsageGroupByEnum[keyof typeof ListUsageGroupByEnum];
|
|
142
|
+
/**
|
|
143
|
+
* @export
|
|
144
|
+
*/
|
|
145
|
+
export const ListUsageModalityEnum = {
|
|
146
|
+
Chat: 'chat',
|
|
147
|
+
Image: 'image',
|
|
148
|
+
Video: 'video',
|
|
149
|
+
Embedding: 'embedding'
|
|
150
|
+
} as const;
|
|
151
|
+
export type ListUsageModalityEnum = typeof ListUsageModalityEnum[keyof typeof ListUsageModalityEnum];
|
package/src/apis/WebhooksApi.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* deeprelay Public Developer API
|
|
5
|
-
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0.0
|
|
8
8
|
* Contact: support@deeprelay.ai
|
package/src/apis/index.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export * from './AlertsApi';
|
|
4
|
+
export * from './ApiKeysApi';
|
|
3
5
|
export * from './BillingApi';
|
|
4
6
|
export * from './InferenceApi';
|
|
5
7
|
export * from './MetaApi';
|
|
8
|
+
export * from './RequestsApi';
|
|
6
9
|
export * from './UsageApi';
|
|
7
10
|
export * from './WebhooksApi';
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* deeprelay Public Developer API
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@deeprelay.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AlertEmailToggles
|
|
20
|
+
*/
|
|
21
|
+
export interface AlertEmailToggles {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof AlertEmailToggles
|
|
26
|
+
*/
|
|
27
|
+
balanceLow: boolean;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
* @memberof AlertEmailToggles
|
|
32
|
+
*/
|
|
33
|
+
subscriptionQuota: boolean;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
* @memberof AlertEmailToggles
|
|
38
|
+
*/
|
|
39
|
+
apiKeyBudget: boolean;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof AlertEmailToggles
|
|
44
|
+
*/
|
|
45
|
+
memberSpend: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the AlertEmailToggles interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfAlertEmailToggles(value: object): value is AlertEmailToggles {
|
|
52
|
+
if ((!('balanceLow' in (value as Record<string, any>)) && !('balance_low' in (value as Record<string, any>))) || ((value as Record<string, any>)['balanceLow'] === undefined && (value as Record<string, any>)['balance_low'] === undefined)) return false;
|
|
53
|
+
if ((!('subscriptionQuota' in (value as Record<string, any>)) && !('subscription_quota' in (value as Record<string, any>))) || ((value as Record<string, any>)['subscriptionQuota'] === undefined && (value as Record<string, any>)['subscription_quota'] === undefined)) return false;
|
|
54
|
+
if ((!('apiKeyBudget' in (value as Record<string, any>)) && !('api_key_budget' in (value as Record<string, any>))) || ((value as Record<string, any>)['apiKeyBudget'] === undefined && (value as Record<string, any>)['api_key_budget'] === undefined)) return false;
|
|
55
|
+
if ((!('memberSpend' in (value as Record<string, any>)) && !('member_spend' in (value as Record<string, any>))) || ((value as Record<string, any>)['memberSpend'] === undefined && (value as Record<string, any>)['member_spend'] === undefined)) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function AlertEmailTogglesFromJSON(json: any): AlertEmailToggles {
|
|
60
|
+
return AlertEmailTogglesFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function AlertEmailTogglesFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlertEmailToggles {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'balanceLow': json['balance_low'],
|
|
70
|
+
'subscriptionQuota': json['subscription_quota'],
|
|
71
|
+
'apiKeyBudget': json['api_key_budget'],
|
|
72
|
+
'memberSpend': json['member_spend'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function AlertEmailTogglesToJSON(json: any): AlertEmailToggles {
|
|
77
|
+
return AlertEmailTogglesToJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function AlertEmailTogglesToJSONTyped(value?: AlertEmailToggles | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
+
if (value == null) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'balance_low': value['balanceLow'],
|
|
88
|
+
'subscription_quota': value['subscriptionQuota'],
|
|
89
|
+
'api_key_budget': value['apiKeyBudget'],
|
|
90
|
+
'member_spend': value['memberSpend'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* deeprelay Public Developer API
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@deeprelay.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { AlertEmailToggles } from './AlertEmailToggles';
|
|
17
|
+
import {
|
|
18
|
+
AlertEmailTogglesFromJSON,
|
|
19
|
+
AlertEmailTogglesFromJSONTyped,
|
|
20
|
+
AlertEmailTogglesToJSON,
|
|
21
|
+
AlertEmailTogglesToJSONTyped,
|
|
22
|
+
} from './AlertEmailToggles';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface AlertSettings
|
|
28
|
+
*/
|
|
29
|
+
export interface AlertSettings {
|
|
30
|
+
/**
|
|
31
|
+
* The wallet balance, in cents, below which a low-balance alert fires.
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof AlertSettings
|
|
34
|
+
*/
|
|
35
|
+
balanceThresholdCents: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {AlertEmailToggles}
|
|
39
|
+
* @memberof AlertSettings
|
|
40
|
+
*/
|
|
41
|
+
email: AlertEmailToggles;
|
|
42
|
+
/**
|
|
43
|
+
* Null until the organization saves its settings once.
|
|
44
|
+
* @type {Date}
|
|
45
|
+
* @memberof AlertSettings
|
|
46
|
+
*/
|
|
47
|
+
updatedAt: Date | null;
|
|
48
|
+
/**
|
|
49
|
+
* A fixed note that the member always receives their own limit emails.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof AlertSettings
|
|
52
|
+
*/
|
|
53
|
+
note: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the AlertSettings interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfAlertSettings(value: object): value is AlertSettings {
|
|
60
|
+
if ((!('balanceThresholdCents' in (value as Record<string, any>)) && !('balance_threshold_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['balanceThresholdCents'] === undefined && (value as Record<string, any>)['balance_threshold_cents'] === undefined)) return false;
|
|
61
|
+
if (!('email' in value) || value['email'] === undefined) return false;
|
|
62
|
+
if ((!('updatedAt' in (value as Record<string, any>)) && !('updated_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['updatedAt'] === undefined && (value as Record<string, any>)['updated_at'] === undefined)) return false;
|
|
63
|
+
if (!('note' in value) || value['note'] === undefined) return false;
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function AlertSettingsFromJSON(json: any): AlertSettings {
|
|
68
|
+
return AlertSettingsFromJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function AlertSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlertSettings {
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'balanceThresholdCents': json['balance_threshold_cents'],
|
|
78
|
+
'email': AlertEmailTogglesFromJSON(json['email']),
|
|
79
|
+
'updatedAt': (json['updated_at'] == null ? null : new Date(json['updated_at'])),
|
|
80
|
+
'note': json['note'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function AlertSettingsToJSON(json: any): AlertSettings {
|
|
85
|
+
return AlertSettingsToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function AlertSettingsToJSONTyped(value?: AlertSettings | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'balance_threshold_cents': value['balanceThresholdCents'],
|
|
96
|
+
'email': AlertEmailTogglesToJSON(value['email']),
|
|
97
|
+
'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
98
|
+
'note': value['note'],
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|