@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,83 @@
|
|
|
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 AlertSettingsUpdate
|
|
28
|
+
*/
|
|
29
|
+
export interface AlertSettingsUpdate {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof AlertSettingsUpdate
|
|
34
|
+
*/
|
|
35
|
+
balanceThresholdCents: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {AlertEmailToggles}
|
|
39
|
+
* @memberof AlertSettingsUpdate
|
|
40
|
+
*/
|
|
41
|
+
email: AlertEmailToggles;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the AlertSettingsUpdate interface.
|
|
46
|
+
*/
|
|
47
|
+
export function instanceOfAlertSettingsUpdate(value: object): value is AlertSettingsUpdate {
|
|
48
|
+
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;
|
|
49
|
+
if (!('email' in value) || value['email'] === undefined) return false;
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function AlertSettingsUpdateFromJSON(json: any): AlertSettingsUpdate {
|
|
54
|
+
return AlertSettingsUpdateFromJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function AlertSettingsUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlertSettingsUpdate {
|
|
58
|
+
if (json == null) {
|
|
59
|
+
return json;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'balanceThresholdCents': json['balance_threshold_cents'],
|
|
64
|
+
'email': AlertEmailTogglesFromJSON(json['email']),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function AlertSettingsUpdateToJSON(json: any): AlertSettingsUpdate {
|
|
69
|
+
return AlertSettingsUpdateToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function AlertSettingsUpdateToJSONTyped(value?: AlertSettingsUpdate | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'balance_threshold_cents': value['balanceThresholdCents'],
|
|
80
|
+
'email': AlertEmailTogglesToJSON(value['email']),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
@@ -0,0 +1,205 @@
|
|
|
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 { ApiKeyScopes } from './ApiKeyScopes';
|
|
17
|
+
import {
|
|
18
|
+
ApiKeyScopesFromJSON,
|
|
19
|
+
ApiKeyScopesFromJSONTyped,
|
|
20
|
+
ApiKeyScopesToJSON,
|
|
21
|
+
ApiKeyScopesToJSONTyped,
|
|
22
|
+
} from './ApiKeyScopes';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* An API key's metadata and limits. Never carries the secret.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ApiKey
|
|
28
|
+
*/
|
|
29
|
+
export interface ApiKey {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ApiKey
|
|
34
|
+
*/
|
|
35
|
+
apiKeyId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ApiKey
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof ApiKey
|
|
46
|
+
*/
|
|
47
|
+
keyPrefix: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof ApiKey
|
|
52
|
+
*/
|
|
53
|
+
last4: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {ApiKeyScopes}
|
|
57
|
+
* @memberof ApiKey
|
|
58
|
+
*/
|
|
59
|
+
scopes: ApiKeyScopes;
|
|
60
|
+
/**
|
|
61
|
+
* Monthly spend budget in cents, reset at the start of each UTC month. Null means no budget. A call that would take the key past it is refused with 402 `api_key_budget_exceeded`.
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof ApiKey
|
|
64
|
+
*/
|
|
65
|
+
budgetCents: number | null;
|
|
66
|
+
/**
|
|
67
|
+
* Spend so far this month, in micro-cents. Present when the key has a budget.
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @memberof ApiKey
|
|
70
|
+
*/
|
|
71
|
+
budgetUsedMicroCents?: number;
|
|
72
|
+
/**
|
|
73
|
+
* When the budget resets. Present when the key has a budget.
|
|
74
|
+
* @type {Date}
|
|
75
|
+
* @memberof ApiKey
|
|
76
|
+
*/
|
|
77
|
+
budgetResetsAt?: Date;
|
|
78
|
+
/**
|
|
79
|
+
* The models this key may call. Null means every model. A call for any other model is refused with 403 `model_not_allowed_for_key`, and `GET /models` lists only these.
|
|
80
|
+
* @type {Array<string>}
|
|
81
|
+
* @memberof ApiKey
|
|
82
|
+
*/
|
|
83
|
+
allowedModels: Array<string> | null;
|
|
84
|
+
/**
|
|
85
|
+
* Entries of `allowed_models` that are no longer in the catalog.
|
|
86
|
+
* @type {Array<string>}
|
|
87
|
+
* @memberof ApiKey
|
|
88
|
+
*/
|
|
89
|
+
staleModels?: Array<string>;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {number}
|
|
93
|
+
* @memberof ApiKey
|
|
94
|
+
*/
|
|
95
|
+
rateLimitRps: number;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {number}
|
|
99
|
+
* @memberof ApiKey
|
|
100
|
+
*/
|
|
101
|
+
rateLimitBurst: number;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {Date}
|
|
105
|
+
* @memberof ApiKey
|
|
106
|
+
*/
|
|
107
|
+
expiresAt: Date | null;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @type {Date}
|
|
111
|
+
* @memberof ApiKey
|
|
112
|
+
*/
|
|
113
|
+
createdAt: Date;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {Date}
|
|
117
|
+
* @memberof ApiKey
|
|
118
|
+
*/
|
|
119
|
+
lastUsedAt: Date | null;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @type {Date}
|
|
123
|
+
* @memberof ApiKey
|
|
124
|
+
*/
|
|
125
|
+
revokedAt?: Date;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Check if a given object implements the ApiKey interface.
|
|
130
|
+
*/
|
|
131
|
+
export function instanceOfApiKey(value: object): value is ApiKey {
|
|
132
|
+
if ((!('apiKeyId' in (value as Record<string, any>)) && !('api_key_id' in (value as Record<string, any>))) || ((value as Record<string, any>)['apiKeyId'] === undefined && (value as Record<string, any>)['api_key_id'] === undefined)) return false;
|
|
133
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
134
|
+
if ((!('keyPrefix' in (value as Record<string, any>)) && !('key_prefix' in (value as Record<string, any>))) || ((value as Record<string, any>)['keyPrefix'] === undefined && (value as Record<string, any>)['key_prefix'] === undefined)) return false;
|
|
135
|
+
if (!('last4' in value) || value['last4'] === undefined) return false;
|
|
136
|
+
if (!('scopes' in value) || value['scopes'] === undefined) return false;
|
|
137
|
+
if ((!('budgetCents' in (value as Record<string, any>)) && !('budget_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['budgetCents'] === undefined && (value as Record<string, any>)['budget_cents'] === undefined)) return false;
|
|
138
|
+
if ((!('allowedModels' in (value as Record<string, any>)) && !('allowed_models' in (value as Record<string, any>))) || ((value as Record<string, any>)['allowedModels'] === undefined && (value as Record<string, any>)['allowed_models'] === undefined)) return false;
|
|
139
|
+
if ((!('rateLimitRps' in (value as Record<string, any>)) && !('rate_limit_rps' in (value as Record<string, any>))) || ((value as Record<string, any>)['rateLimitRps'] === undefined && (value as Record<string, any>)['rate_limit_rps'] === undefined)) return false;
|
|
140
|
+
if ((!('rateLimitBurst' in (value as Record<string, any>)) && !('rate_limit_burst' in (value as Record<string, any>))) || ((value as Record<string, any>)['rateLimitBurst'] === undefined && (value as Record<string, any>)['rate_limit_burst'] === undefined)) return false;
|
|
141
|
+
if ((!('expiresAt' in (value as Record<string, any>)) && !('expires_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['expiresAt'] === undefined && (value as Record<string, any>)['expires_at'] === undefined)) return false;
|
|
142
|
+
if ((!('createdAt' in (value as Record<string, any>)) && !('created_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['createdAt'] === undefined && (value as Record<string, any>)['created_at'] === undefined)) return false;
|
|
143
|
+
if ((!('lastUsedAt' in (value as Record<string, any>)) && !('last_used_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['lastUsedAt'] === undefined && (value as Record<string, any>)['last_used_at'] === undefined)) return false;
|
|
144
|
+
return true;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function ApiKeyFromJSON(json: any): ApiKey {
|
|
148
|
+
return ApiKeyFromJSONTyped(json, false);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export function ApiKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKey {
|
|
152
|
+
if (json == null) {
|
|
153
|
+
return json;
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
|
|
157
|
+
'apiKeyId': json['api_key_id'],
|
|
158
|
+
'name': json['name'],
|
|
159
|
+
'keyPrefix': json['key_prefix'],
|
|
160
|
+
'last4': json['last4'],
|
|
161
|
+
'scopes': ApiKeyScopesFromJSON(json['scopes']),
|
|
162
|
+
'budgetCents': json['budget_cents'],
|
|
163
|
+
'budgetUsedMicroCents': json['budget_used_micro_cents'] == null ? undefined : json['budget_used_micro_cents'],
|
|
164
|
+
'budgetResetsAt': json['budget_resets_at'] == null ? undefined : (new Date(json['budget_resets_at'])),
|
|
165
|
+
'allowedModels': json['allowed_models'] == null ? null : json['allowed_models'],
|
|
166
|
+
'staleModels': json['stale_models'] == null ? undefined : json['stale_models'],
|
|
167
|
+
'rateLimitRps': json['rate_limit_rps'],
|
|
168
|
+
'rateLimitBurst': json['rate_limit_burst'],
|
|
169
|
+
'expiresAt': (json['expires_at'] == null ? null : new Date(json['expires_at'])),
|
|
170
|
+
'createdAt': (new Date(json['created_at'])),
|
|
171
|
+
'lastUsedAt': (json['last_used_at'] == null ? null : new Date(json['last_used_at'])),
|
|
172
|
+
'revokedAt': json['revoked_at'] == null ? undefined : (new Date(json['revoked_at'])),
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export function ApiKeyToJSON(json: any): ApiKey {
|
|
177
|
+
return ApiKeyToJSONTyped(json, false);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export function ApiKeyToJSONTyped(value?: ApiKey | null, ignoreDiscriminator: boolean = false): any {
|
|
181
|
+
if (value == null) {
|
|
182
|
+
return value;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return {
|
|
186
|
+
|
|
187
|
+
'api_key_id': value['apiKeyId'],
|
|
188
|
+
'name': value['name'],
|
|
189
|
+
'key_prefix': value['keyPrefix'],
|
|
190
|
+
'last4': value['last4'],
|
|
191
|
+
'scopes': ApiKeyScopesToJSON(value['scopes']),
|
|
192
|
+
'budget_cents': value['budgetCents'],
|
|
193
|
+
'budget_used_micro_cents': value['budgetUsedMicroCents'],
|
|
194
|
+
'budget_resets_at': value['budgetResetsAt'] == null ? value['budgetResetsAt'] : value['budgetResetsAt'].toISOString(),
|
|
195
|
+
'allowed_models': value['allowedModels'],
|
|
196
|
+
'stale_models': value['staleModels'],
|
|
197
|
+
'rate_limit_rps': value['rateLimitRps'],
|
|
198
|
+
'rate_limit_burst': value['rateLimitBurst'],
|
|
199
|
+
'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(),
|
|
200
|
+
'created_at': value['createdAt'].toISOString(),
|
|
201
|
+
'last_used_at': value['lastUsedAt'] == null ? value['lastUsedAt'] : value['lastUsedAt'].toISOString(),
|
|
202
|
+
'revoked_at': value['revokedAt'] == null ? value['revokedAt'] : value['revokedAt'].toISOString(),
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
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 ApiKeyCreate
|
|
20
|
+
*/
|
|
21
|
+
export interface ApiKeyCreate {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ApiKeyCreate
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* One of `{"full_access": true}`, `{"standard": true}`, `{"read_only": true}`, or a per-resource map such as `{"serverless": "read", "keys": "write"}`. A shortcut cannot be combined with per-resource entries.
|
|
30
|
+
* @type {{ [key: string]: any; }}
|
|
31
|
+
* @memberof ApiKeyCreate
|
|
32
|
+
*/
|
|
33
|
+
scopes: { [key: string]: any; };
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ApiKeyCreate
|
|
38
|
+
*/
|
|
39
|
+
budgetCents?: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {Array<string>}
|
|
43
|
+
* @memberof ApiKeyCreate
|
|
44
|
+
*/
|
|
45
|
+
allowedModels?: Array<string>;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof ApiKeyCreate
|
|
50
|
+
*/
|
|
51
|
+
rateLimitRps?: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof ApiKeyCreate
|
|
56
|
+
*/
|
|
57
|
+
rateLimitBurst?: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Date}
|
|
61
|
+
* @memberof ApiKeyCreate
|
|
62
|
+
*/
|
|
63
|
+
expiresAt?: Date;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the ApiKeyCreate interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfApiKeyCreate(value: object): value is ApiKeyCreate {
|
|
70
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
71
|
+
if (!('scopes' in value) || value['scopes'] === undefined) return false;
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function ApiKeyCreateFromJSON(json: any): ApiKeyCreate {
|
|
76
|
+
return ApiKeyCreateFromJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function ApiKeyCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKeyCreate {
|
|
80
|
+
if (json == null) {
|
|
81
|
+
return json;
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
|
|
85
|
+
'name': json['name'],
|
|
86
|
+
'scopes': json['scopes'],
|
|
87
|
+
'budgetCents': json['budget_cents'] == null ? undefined : json['budget_cents'],
|
|
88
|
+
'allowedModels': json['allowed_models'] == null ? undefined : json['allowed_models'],
|
|
89
|
+
'rateLimitRps': json['rate_limit_rps'] == null ? undefined : json['rate_limit_rps'],
|
|
90
|
+
'rateLimitBurst': json['rate_limit_burst'] == null ? undefined : json['rate_limit_burst'],
|
|
91
|
+
'expiresAt': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function ApiKeyCreateToJSON(json: any): ApiKeyCreate {
|
|
96
|
+
return ApiKeyCreateToJSONTyped(json, false);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function ApiKeyCreateToJSONTyped(value?: ApiKeyCreate | null, ignoreDiscriminator: boolean = false): any {
|
|
100
|
+
if (value == null) {
|
|
101
|
+
return value;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return {
|
|
105
|
+
|
|
106
|
+
'name': value['name'],
|
|
107
|
+
'scopes': value['scopes'],
|
|
108
|
+
'budget_cents': value['budgetCents'],
|
|
109
|
+
'allowed_models': value['allowedModels'],
|
|
110
|
+
'rate_limit_rps': value['rateLimitRps'],
|
|
111
|
+
'rate_limit_burst': value['rateLimitBurst'],
|
|
112
|
+
'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
@@ -0,0 +1,214 @@
|
|
|
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 { ApiKeyScopes } from './ApiKeyScopes';
|
|
17
|
+
import {
|
|
18
|
+
ApiKeyScopesFromJSON,
|
|
19
|
+
ApiKeyScopesFromJSONTyped,
|
|
20
|
+
ApiKeyScopesToJSON,
|
|
21
|
+
ApiKeyScopesToJSONTyped,
|
|
22
|
+
} from './ApiKeyScopes';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The new key's metadata plus its secret (`key`), returned exactly once. The same fields as `ApiKey`, plus `key`.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ApiKeyCreated
|
|
28
|
+
*/
|
|
29
|
+
export interface ApiKeyCreated {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ApiKeyCreated
|
|
34
|
+
*/
|
|
35
|
+
apiKeyId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ApiKeyCreated
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof ApiKeyCreated
|
|
46
|
+
*/
|
|
47
|
+
keyPrefix: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof ApiKeyCreated
|
|
52
|
+
*/
|
|
53
|
+
last4: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {ApiKeyScopes}
|
|
57
|
+
* @memberof ApiKeyCreated
|
|
58
|
+
*/
|
|
59
|
+
scopes: ApiKeyScopes;
|
|
60
|
+
/**
|
|
61
|
+
* Monthly spend budget in cents, reset at the start of each UTC month. Null means no budget. A call that would take the key past it is refused with 402 `api_key_budget_exceeded`.
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof ApiKeyCreated
|
|
64
|
+
*/
|
|
65
|
+
budgetCents: number | null;
|
|
66
|
+
/**
|
|
67
|
+
* Spend so far this month, in micro-cents. Present when the key has a budget.
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @memberof ApiKeyCreated
|
|
70
|
+
*/
|
|
71
|
+
budgetUsedMicroCents?: number;
|
|
72
|
+
/**
|
|
73
|
+
* When the budget resets. Present when the key has a budget.
|
|
74
|
+
* @type {Date}
|
|
75
|
+
* @memberof ApiKeyCreated
|
|
76
|
+
*/
|
|
77
|
+
budgetResetsAt?: Date;
|
|
78
|
+
/**
|
|
79
|
+
* The models this key may call. Null means every model. A call for any other model is refused with 403 `model_not_allowed_for_key`, and `GET /models` lists only these.
|
|
80
|
+
* @type {Array<string>}
|
|
81
|
+
* @memberof ApiKeyCreated
|
|
82
|
+
*/
|
|
83
|
+
allowedModels: Array<string> | null;
|
|
84
|
+
/**
|
|
85
|
+
* Entries of `allowed_models` that are no longer in the catalog.
|
|
86
|
+
* @type {Array<string>}
|
|
87
|
+
* @memberof ApiKeyCreated
|
|
88
|
+
*/
|
|
89
|
+
staleModels?: Array<string>;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {number}
|
|
93
|
+
* @memberof ApiKeyCreated
|
|
94
|
+
*/
|
|
95
|
+
rateLimitRps: number;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {number}
|
|
99
|
+
* @memberof ApiKeyCreated
|
|
100
|
+
*/
|
|
101
|
+
rateLimitBurst: number;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {Date}
|
|
105
|
+
* @memberof ApiKeyCreated
|
|
106
|
+
*/
|
|
107
|
+
expiresAt: Date | null;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @type {Date}
|
|
111
|
+
* @memberof ApiKeyCreated
|
|
112
|
+
*/
|
|
113
|
+
createdAt: Date;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {Date}
|
|
117
|
+
* @memberof ApiKeyCreated
|
|
118
|
+
*/
|
|
119
|
+
lastUsedAt: Date | null;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @type {Date}
|
|
123
|
+
* @memberof ApiKeyCreated
|
|
124
|
+
*/
|
|
125
|
+
revokedAt?: Date;
|
|
126
|
+
/**
|
|
127
|
+
* The secret. Shown once; it cannot be read again.
|
|
128
|
+
* @type {string}
|
|
129
|
+
* @memberof ApiKeyCreated
|
|
130
|
+
*/
|
|
131
|
+
key: string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Check if a given object implements the ApiKeyCreated interface.
|
|
136
|
+
*/
|
|
137
|
+
export function instanceOfApiKeyCreated(value: object): value is ApiKeyCreated {
|
|
138
|
+
if ((!('apiKeyId' in (value as Record<string, any>)) && !('api_key_id' in (value as Record<string, any>))) || ((value as Record<string, any>)['apiKeyId'] === undefined && (value as Record<string, any>)['api_key_id'] === undefined)) return false;
|
|
139
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
140
|
+
if ((!('keyPrefix' in (value as Record<string, any>)) && !('key_prefix' in (value as Record<string, any>))) || ((value as Record<string, any>)['keyPrefix'] === undefined && (value as Record<string, any>)['key_prefix'] === undefined)) return false;
|
|
141
|
+
if (!('last4' in value) || value['last4'] === undefined) return false;
|
|
142
|
+
if (!('scopes' in value) || value['scopes'] === undefined) return false;
|
|
143
|
+
if ((!('budgetCents' in (value as Record<string, any>)) && !('budget_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['budgetCents'] === undefined && (value as Record<string, any>)['budget_cents'] === undefined)) return false;
|
|
144
|
+
if ((!('allowedModels' in (value as Record<string, any>)) && !('allowed_models' in (value as Record<string, any>))) || ((value as Record<string, any>)['allowedModels'] === undefined && (value as Record<string, any>)['allowed_models'] === undefined)) return false;
|
|
145
|
+
if ((!('rateLimitRps' in (value as Record<string, any>)) && !('rate_limit_rps' in (value as Record<string, any>))) || ((value as Record<string, any>)['rateLimitRps'] === undefined && (value as Record<string, any>)['rate_limit_rps'] === undefined)) return false;
|
|
146
|
+
if ((!('rateLimitBurst' in (value as Record<string, any>)) && !('rate_limit_burst' in (value as Record<string, any>))) || ((value as Record<string, any>)['rateLimitBurst'] === undefined && (value as Record<string, any>)['rate_limit_burst'] === undefined)) return false;
|
|
147
|
+
if ((!('expiresAt' in (value as Record<string, any>)) && !('expires_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['expiresAt'] === undefined && (value as Record<string, any>)['expires_at'] === undefined)) return false;
|
|
148
|
+
if ((!('createdAt' in (value as Record<string, any>)) && !('created_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['createdAt'] === undefined && (value as Record<string, any>)['created_at'] === undefined)) return false;
|
|
149
|
+
if ((!('lastUsedAt' in (value as Record<string, any>)) && !('last_used_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['lastUsedAt'] === undefined && (value as Record<string, any>)['last_used_at'] === undefined)) return false;
|
|
150
|
+
if (!('key' in value) || value['key'] === undefined) return false;
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export function ApiKeyCreatedFromJSON(json: any): ApiKeyCreated {
|
|
155
|
+
return ApiKeyCreatedFromJSONTyped(json, false);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function ApiKeyCreatedFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKeyCreated {
|
|
159
|
+
if (json == null) {
|
|
160
|
+
return json;
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
|
|
164
|
+
'apiKeyId': json['api_key_id'],
|
|
165
|
+
'name': json['name'],
|
|
166
|
+
'keyPrefix': json['key_prefix'],
|
|
167
|
+
'last4': json['last4'],
|
|
168
|
+
'scopes': ApiKeyScopesFromJSON(json['scopes']),
|
|
169
|
+
'budgetCents': json['budget_cents'],
|
|
170
|
+
'budgetUsedMicroCents': json['budget_used_micro_cents'] == null ? undefined : json['budget_used_micro_cents'],
|
|
171
|
+
'budgetResetsAt': json['budget_resets_at'] == null ? undefined : (new Date(json['budget_resets_at'])),
|
|
172
|
+
'allowedModels': json['allowed_models'] == null ? null : json['allowed_models'],
|
|
173
|
+
'staleModels': json['stale_models'] == null ? undefined : json['stale_models'],
|
|
174
|
+
'rateLimitRps': json['rate_limit_rps'],
|
|
175
|
+
'rateLimitBurst': json['rate_limit_burst'],
|
|
176
|
+
'expiresAt': (json['expires_at'] == null ? null : new Date(json['expires_at'])),
|
|
177
|
+
'createdAt': (new Date(json['created_at'])),
|
|
178
|
+
'lastUsedAt': (json['last_used_at'] == null ? null : new Date(json['last_used_at'])),
|
|
179
|
+
'revokedAt': json['revoked_at'] == null ? undefined : (new Date(json['revoked_at'])),
|
|
180
|
+
'key': json['key'],
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export function ApiKeyCreatedToJSON(json: any): ApiKeyCreated {
|
|
185
|
+
return ApiKeyCreatedToJSONTyped(json, false);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export function ApiKeyCreatedToJSONTyped(value?: ApiKeyCreated | null, ignoreDiscriminator: boolean = false): any {
|
|
189
|
+
if (value == null) {
|
|
190
|
+
return value;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return {
|
|
194
|
+
|
|
195
|
+
'api_key_id': value['apiKeyId'],
|
|
196
|
+
'name': value['name'],
|
|
197
|
+
'key_prefix': value['keyPrefix'],
|
|
198
|
+
'last4': value['last4'],
|
|
199
|
+
'scopes': ApiKeyScopesToJSON(value['scopes']),
|
|
200
|
+
'budget_cents': value['budgetCents'],
|
|
201
|
+
'budget_used_micro_cents': value['budgetUsedMicroCents'],
|
|
202
|
+
'budget_resets_at': value['budgetResetsAt'] == null ? value['budgetResetsAt'] : value['budgetResetsAt'].toISOString(),
|
|
203
|
+
'allowed_models': value['allowedModels'],
|
|
204
|
+
'stale_models': value['staleModels'],
|
|
205
|
+
'rate_limit_rps': value['rateLimitRps'],
|
|
206
|
+
'rate_limit_burst': value['rateLimitBurst'],
|
|
207
|
+
'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(),
|
|
208
|
+
'created_at': value['createdAt'].toISOString(),
|
|
209
|
+
'last_used_at': value['lastUsedAt'] == null ? value['lastUsedAt'] : value['lastUsedAt'].toISOString(),
|
|
210
|
+
'revoked_at': value['revokedAt'] == null ? value['revokedAt'] : value['revokedAt'].toISOString(),
|
|
211
|
+
'key': value['key'],
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
|