@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
package/docs/Model.md
CHANGED
|
@@ -13,15 +13,23 @@ Name | Type
|
|
|
13
13
|
`author` | string
|
|
14
14
|
`modality` | string
|
|
15
15
|
`category` | string
|
|
16
|
+
`tier` | string
|
|
16
17
|
`contextLength` | number
|
|
18
|
+
`maxCompletionTokens` | number
|
|
17
19
|
`supportedParameters` | Array<string>
|
|
20
|
+
`reasoningEfforts` | Array<string>
|
|
18
21
|
`parameters` | [Array<ModelParametersInner>](ModelParametersInner.md)
|
|
19
22
|
`pricing` | [ModelPricing](ModelPricing.md)
|
|
20
23
|
`aliases` | Array<string>
|
|
21
24
|
`fineTunable` | boolean
|
|
22
25
|
`fineTuneBaseModel` | string
|
|
26
|
+
`hfRepo` | string
|
|
27
|
+
`usageFactorMilli` | number
|
|
23
28
|
`planCovered` | boolean
|
|
29
|
+
`recommendedFor` | Array<string>
|
|
30
|
+
`codingAgentRank` | number
|
|
24
31
|
`status` | string
|
|
32
|
+
`metrics` | [ModelMetrics](ModelMetrics.md)
|
|
25
33
|
|
|
26
34
|
## Example
|
|
27
35
|
|
|
@@ -37,15 +45,23 @@ const example = {
|
|
|
37
45
|
"author": null,
|
|
38
46
|
"modality": null,
|
|
39
47
|
"category": null,
|
|
48
|
+
"tier": null,
|
|
40
49
|
"contextLength": null,
|
|
50
|
+
"maxCompletionTokens": null,
|
|
41
51
|
"supportedParameters": null,
|
|
52
|
+
"reasoningEfforts": null,
|
|
42
53
|
"parameters": null,
|
|
43
54
|
"pricing": null,
|
|
44
55
|
"aliases": null,
|
|
45
56
|
"fineTunable": null,
|
|
46
57
|
"fineTuneBaseModel": null,
|
|
58
|
+
"hfRepo": null,
|
|
59
|
+
"usageFactorMilli": null,
|
|
47
60
|
"planCovered": null,
|
|
61
|
+
"recommendedFor": null,
|
|
62
|
+
"codingAgentRank": null,
|
|
48
63
|
"status": null,
|
|
64
|
+
"metrics": null,
|
|
49
65
|
} satisfies Model
|
|
50
66
|
|
|
51
67
|
console.log(example)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
# ModelMetrics
|
|
3
|
+
|
|
4
|
+
Measured performance over a rolling window, from deeprelay\'s own customer traffic only. A figure is omitted (never zero) when it has too few samples behind it; the counts and minimums are always present so a reader can tell why.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`windowDays` | number
|
|
11
|
+
`asOf` | Date
|
|
12
|
+
`sampleCount` | number
|
|
13
|
+
`streamSampleCount` | number
|
|
14
|
+
`minSamples` | number
|
|
15
|
+
`minStreamSamples` | number
|
|
16
|
+
`ttftP50Ms` | number
|
|
17
|
+
`tokensPerSecondP50` | number
|
|
18
|
+
`successRate` | number
|
|
19
|
+
`insufficientData` | boolean
|
|
20
|
+
`precision` | string
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import type { ModelMetrics } from '@deeprelay/sdk'
|
|
26
|
+
|
|
27
|
+
// TODO: Update the object below with actual values
|
|
28
|
+
const example = {
|
|
29
|
+
"windowDays": null,
|
|
30
|
+
"asOf": null,
|
|
31
|
+
"sampleCount": null,
|
|
32
|
+
"streamSampleCount": null,
|
|
33
|
+
"minSamples": null,
|
|
34
|
+
"minStreamSamples": null,
|
|
35
|
+
"ttftP50Ms": null,
|
|
36
|
+
"tokensPerSecondP50": null,
|
|
37
|
+
"successRate": null,
|
|
38
|
+
"insufficientData": null,
|
|
39
|
+
"precision": null,
|
|
40
|
+
} satisfies ModelMetrics
|
|
41
|
+
|
|
42
|
+
console.log(example)
|
|
43
|
+
|
|
44
|
+
// Convert the instance to a JSON string
|
|
45
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
46
|
+
console.log(exampleJSON)
|
|
47
|
+
|
|
48
|
+
// Parse the JSON string back to an object
|
|
49
|
+
const exampleParsed = JSON.parse(exampleJSON) as ModelMetrics
|
|
50
|
+
console.log(exampleParsed)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
54
|
+
|
|
55
|
+
|
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`type` | string
|
|
11
11
|
`param` | string
|
|
12
12
|
`code` | string
|
|
13
|
+
`quotaFreesAt` | Date
|
|
13
14
|
|
|
14
15
|
## Example
|
|
15
16
|
|
|
@@ -22,6 +23,7 @@ const example = {
|
|
|
22
23
|
"type": null,
|
|
23
24
|
"param": null,
|
|
24
25
|
"code": null,
|
|
26
|
+
"quotaFreesAt": null,
|
|
25
27
|
} satisfies OpenAIErrorEnvelopeError
|
|
26
28
|
|
|
27
29
|
console.log(example)
|
package/docs/Problem.md
CHANGED
|
@@ -12,6 +12,8 @@ Name | Type
|
|
|
12
12
|
`detail` | string
|
|
13
13
|
`code` | string
|
|
14
14
|
`requestId` | string
|
|
15
|
+
`field` | string
|
|
16
|
+
`maxRows` | number
|
|
15
17
|
|
|
16
18
|
## Example
|
|
17
19
|
|
|
@@ -26,6 +28,8 @@ const example = {
|
|
|
26
28
|
"detail": null,
|
|
27
29
|
"code": null,
|
|
28
30
|
"requestId": null,
|
|
31
|
+
"field": null,
|
|
32
|
+
"maxRows": null,
|
|
29
33
|
} satisfies Problem
|
|
30
34
|
|
|
31
35
|
console.log(example)
|
package/docs/Referral.md
CHANGED
|
@@ -13,10 +13,12 @@ Name | Type
|
|
|
13
13
|
`qualified` | number
|
|
14
14
|
`settled` | number
|
|
15
15
|
`earnedCents` | number
|
|
16
|
+
`commissionEarnedCents` | number
|
|
16
17
|
`rewardCents` | number
|
|
17
18
|
`refereeRewardCents` | number
|
|
18
19
|
`qualifySpendCents` | number
|
|
19
20
|
`holdDays` | number
|
|
21
|
+
`commissionPct` | number
|
|
20
22
|
`referred` | [RefereeStatus](RefereeStatus.md)
|
|
21
23
|
|
|
22
24
|
## Example
|
|
@@ -26,16 +28,18 @@ import type { Referral } from '@deeprelay/sdk'
|
|
|
26
28
|
|
|
27
29
|
// TODO: Update the object below with actual values
|
|
28
30
|
const example = {
|
|
29
|
-
"code":
|
|
30
|
-
"inviteUrl": https://deeprelay.ai/r/
|
|
31
|
+
"code": DR-7KQ2-M4XP,
|
|
32
|
+
"inviteUrl": https://deeprelay.ai/r/DR-7KQ2-M4XP,
|
|
31
33
|
"pending": null,
|
|
32
34
|
"qualified": null,
|
|
33
35
|
"settled": null,
|
|
34
36
|
"earnedCents": null,
|
|
37
|
+
"commissionEarnedCents": null,
|
|
35
38
|
"rewardCents": null,
|
|
36
39
|
"refereeRewardCents": null,
|
|
37
40
|
"qualifySpendCents": null,
|
|
38
41
|
"holdDays": null,
|
|
42
|
+
"commissionPct": null,
|
|
39
43
|
"referred": null,
|
|
40
44
|
} satisfies Referral
|
|
41
45
|
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
|
|
2
|
+
# RequestLogEntry
|
|
3
|
+
|
|
4
|
+
One inference call as the request log records it. Never carries prompt or completion content. Optional numeric fields are omitted when they do not apply (for example token counts on a rejected call).
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`requestId` | string
|
|
11
|
+
`clientRequestId` | string
|
|
12
|
+
`occurredAt` | Date
|
|
13
|
+
`surface` | string
|
|
14
|
+
`model` | string
|
|
15
|
+
`keyId` | string
|
|
16
|
+
`keyName` | string
|
|
17
|
+
`keyPrefix` | string
|
|
18
|
+
`status` | string
|
|
19
|
+
`httpStatus` | number
|
|
20
|
+
`errorCode` | string
|
|
21
|
+
`finishReason` | string
|
|
22
|
+
`promptTokens` | number
|
|
23
|
+
`completionTokens` | number
|
|
24
|
+
`cachedTokens` | number
|
|
25
|
+
`reasoningTokens` | number
|
|
26
|
+
`quotaUnits` | number
|
|
27
|
+
`cost` | string
|
|
28
|
+
`costMicroCents` | number
|
|
29
|
+
`planCovered` | boolean
|
|
30
|
+
`ttftMs` | number
|
|
31
|
+
`durationMs` | number
|
|
32
|
+
`ignoredParams` | Array<string>
|
|
33
|
+
`hadToolCalls` | boolean
|
|
34
|
+
`imageCount` | number
|
|
35
|
+
`videoSeconds` | number
|
|
36
|
+
`suppressedCount` | number
|
|
37
|
+
|
|
38
|
+
## Example
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import type { RequestLogEntry } from '@deeprelay/sdk'
|
|
42
|
+
|
|
43
|
+
// TODO: Update the object below with actual values
|
|
44
|
+
const example = {
|
|
45
|
+
"requestId": null,
|
|
46
|
+
"clientRequestId": null,
|
|
47
|
+
"occurredAt": null,
|
|
48
|
+
"surface": null,
|
|
49
|
+
"model": null,
|
|
50
|
+
"keyId": null,
|
|
51
|
+
"keyName": null,
|
|
52
|
+
"keyPrefix": null,
|
|
53
|
+
"status": null,
|
|
54
|
+
"httpStatus": null,
|
|
55
|
+
"errorCode": null,
|
|
56
|
+
"finishReason": null,
|
|
57
|
+
"promptTokens": null,
|
|
58
|
+
"completionTokens": null,
|
|
59
|
+
"cachedTokens": null,
|
|
60
|
+
"reasoningTokens": null,
|
|
61
|
+
"quotaUnits": null,
|
|
62
|
+
"cost": null,
|
|
63
|
+
"costMicroCents": null,
|
|
64
|
+
"planCovered": null,
|
|
65
|
+
"ttftMs": null,
|
|
66
|
+
"durationMs": null,
|
|
67
|
+
"ignoredParams": null,
|
|
68
|
+
"hadToolCalls": null,
|
|
69
|
+
"imageCount": null,
|
|
70
|
+
"videoSeconds": null,
|
|
71
|
+
"suppressedCount": null,
|
|
72
|
+
} satisfies RequestLogEntry
|
|
73
|
+
|
|
74
|
+
console.log(example)
|
|
75
|
+
|
|
76
|
+
// Convert the instance to a JSON string
|
|
77
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
78
|
+
console.log(exampleJSON)
|
|
79
|
+
|
|
80
|
+
// Parse the JSON string back to an object
|
|
81
|
+
const exampleParsed = JSON.parse(exampleJSON) as RequestLogEntry
|
|
82
|
+
console.log(exampleParsed)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# RequestLogPage
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<RequestLogEntry>](RequestLogEntry.md)
|
|
10
|
+
`nextCursor` | string
|
|
11
|
+
`windowDays` | number
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { RequestLogPage } from '@deeprelay/sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"data": null,
|
|
21
|
+
"nextCursor": null,
|
|
22
|
+
"windowDays": null,
|
|
23
|
+
} satisfies RequestLogPage
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as RequestLogPage
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
# RequestsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.deeprelay.ai/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**exportRequests**](RequestsApi.md#exportrequests) | **GET** /requests/export | Export the request log as CSV |
|
|
8
|
+
| [**getRequest**](RequestsApi.md#getrequest) | **GET** /requests/{id} | Get one request |
|
|
9
|
+
| [**listRequests**](RequestsApi.md#listrequests) | **GET** /requests | List requests (the request log) |
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## exportRequests
|
|
14
|
+
|
|
15
|
+
> string exportRequests(key, model, surface, status, errorCode, clientRequestId, from, to)
|
|
16
|
+
|
|
17
|
+
Export the request log as CSV
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
### Example
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import {
|
|
25
|
+
Configuration,
|
|
26
|
+
RequestsApi,
|
|
27
|
+
} from '@deeprelay/sdk';
|
|
28
|
+
import type { ExportRequestsRequest } from '@deeprelay/sdk';
|
|
29
|
+
|
|
30
|
+
async function example() {
|
|
31
|
+
console.log("🚀 Testing @deeprelay/sdk SDK...");
|
|
32
|
+
const config = new Configuration({
|
|
33
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
34
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
35
|
+
});
|
|
36
|
+
const api = new RequestsApi(config);
|
|
37
|
+
|
|
38
|
+
const body = {
|
|
39
|
+
// string | Only rows sent with this API key (its `api_key_id`). (optional)
|
|
40
|
+
key: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
41
|
+
// string | Only rows for this model id. (optional)
|
|
42
|
+
model: model_example,
|
|
43
|
+
// 'chat' | 'messages' | 'responses' | 'embeddings' | 'image' | 'video' | Only rows from this endpoint family. (optional)
|
|
44
|
+
surface: surface_example,
|
|
45
|
+
// 'ok' | 'error' | 'cancelled' | 'rejected' | Only rows with this outcome. `rejected` is a call refused before it reached a model (a budget, limit, allowlist or quota gate). (optional)
|
|
46
|
+
status: status_example,
|
|
47
|
+
// string | Only rows that ended with this `X-Deeprelay-Error-Code`. (optional)
|
|
48
|
+
errorCode: errorCode_example,
|
|
49
|
+
// string | Only rows whose `X-Client-Request-Id` equals this value. (optional)
|
|
50
|
+
clientRequestId: clientRequestId_example,
|
|
51
|
+
// Date | Inclusive RFC 3339 range start. Defaults to the start of the 90-day window; an older value is clamped to it. (optional)
|
|
52
|
+
from: 2013-10-20T19:20:30+01:00,
|
|
53
|
+
// Date | Exclusive RFC 3339 range end. Defaults to now; must be after `from`. (optional)
|
|
54
|
+
to: 2013-10-20T19:20:30+01:00,
|
|
55
|
+
} satisfies ExportRequestsRequest;
|
|
56
|
+
|
|
57
|
+
try {
|
|
58
|
+
const data = await api.exportRequests(body);
|
|
59
|
+
console.log(data);
|
|
60
|
+
} catch (error) {
|
|
61
|
+
console.error(error);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Run the test
|
|
66
|
+
example().catch(console.error);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Parameters
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
| Name | Type | Description | Notes |
|
|
73
|
+
|------------- | ------------- | ------------- | -------------|
|
|
74
|
+
| **key** | `string` | Only rows sent with this API key (its `api_key_id`). | [Optional] [Defaults to `undefined`] |
|
|
75
|
+
| **model** | `string` | Only rows for this model id. | [Optional] [Defaults to `undefined`] |
|
|
76
|
+
| **surface** | `chat`, `messages`, `responses`, `embeddings`, `image`, `video` | Only rows from this endpoint family. | [Optional] [Defaults to `undefined`] [Enum: chat, messages, responses, embeddings, image, video] |
|
|
77
|
+
| **status** | `ok`, `error`, `cancelled`, `rejected` | Only rows with this outcome. `rejected` is a call refused before it reached a model (a budget, limit, allowlist or quota gate). | [Optional] [Defaults to `undefined`] [Enum: ok, error, cancelled, rejected] |
|
|
78
|
+
| **errorCode** | `string` | Only rows that ended with this `X-Deeprelay-Error-Code`. | [Optional] [Defaults to `undefined`] |
|
|
79
|
+
| **clientRequestId** | `string` | Only rows whose `X-Client-Request-Id` equals this value. | [Optional] [Defaults to `undefined`] |
|
|
80
|
+
| **from** | `Date` | Inclusive RFC 3339 range start. Defaults to the start of the 90-day window; an older value is clamped to it. | [Optional] [Defaults to `undefined`] |
|
|
81
|
+
| **to** | `Date` | Exclusive RFC 3339 range end. Defaults to now; must be after `from`. | [Optional] [Defaults to `undefined`] |
|
|
82
|
+
|
|
83
|
+
### Return type
|
|
84
|
+
|
|
85
|
+
**string**
|
|
86
|
+
|
|
87
|
+
### Authorization
|
|
88
|
+
|
|
89
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
90
|
+
|
|
91
|
+
### HTTP request headers
|
|
92
|
+
|
|
93
|
+
- **Content-Type**: Not defined
|
|
94
|
+
- **Accept**: `text/csv`, `application/problem+json`
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### HTTP response details
|
|
98
|
+
| Status code | Description | Response headers |
|
|
99
|
+
|-------------|-------------|------------------|
|
|
100
|
+
| **200** | CSV attachment (`Content-Disposition` names the file). | - |
|
|
101
|
+
| **400** | Error response (RFC 7807) | - |
|
|
102
|
+
| **422** | `export_too_large`: the filters match more rows than the export cap. `max_rows` in the problem body is the cap. | - |
|
|
103
|
+
| **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
104
|
+
| **0** | Error response (RFC 7807) | - |
|
|
105
|
+
|
|
106
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
## getRequest
|
|
110
|
+
|
|
111
|
+
> RequestLogEntry getRequest(id)
|
|
112
|
+
|
|
113
|
+
Get one request
|
|
114
|
+
|
|
115
|
+
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.
|
|
116
|
+
|
|
117
|
+
### Example
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
import {
|
|
121
|
+
Configuration,
|
|
122
|
+
RequestsApi,
|
|
123
|
+
} from '@deeprelay/sdk';
|
|
124
|
+
import type { GetRequestRequest } from '@deeprelay/sdk';
|
|
125
|
+
|
|
126
|
+
async function example() {
|
|
127
|
+
console.log("🚀 Testing @deeprelay/sdk SDK...");
|
|
128
|
+
const config = new Configuration({
|
|
129
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
130
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
131
|
+
});
|
|
132
|
+
const api = new RequestsApi(config);
|
|
133
|
+
|
|
134
|
+
const body = {
|
|
135
|
+
// string | Any id the caller holds for the request: the `X-Request-Id` response header, a chat completion id (`chatcmpl-…`), a message id (`msg_…`), a response id (`resp_…`) or a video id.
|
|
136
|
+
id: id_example,
|
|
137
|
+
} satisfies GetRequestRequest;
|
|
138
|
+
|
|
139
|
+
try {
|
|
140
|
+
const data = await api.getRequest(body);
|
|
141
|
+
console.log(data);
|
|
142
|
+
} catch (error) {
|
|
143
|
+
console.error(error);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Run the test
|
|
148
|
+
example().catch(console.error);
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Parameters
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
| Name | Type | Description | Notes |
|
|
155
|
+
|------------- | ------------- | ------------- | -------------|
|
|
156
|
+
| **id** | `string` | Any id the caller holds for the request: the `X-Request-Id` response header, a chat completion id (`chatcmpl-…`), a message id (`msg_…`), a response id (`resp_…`) or a video id. | [Defaults to `undefined`] |
|
|
157
|
+
|
|
158
|
+
### Return type
|
|
159
|
+
|
|
160
|
+
[**RequestLogEntry**](RequestLogEntry.md)
|
|
161
|
+
|
|
162
|
+
### Authorization
|
|
163
|
+
|
|
164
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
165
|
+
|
|
166
|
+
### HTTP request headers
|
|
167
|
+
|
|
168
|
+
- **Content-Type**: Not defined
|
|
169
|
+
- **Accept**: `application/json`, `application/problem+json`
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
### HTTP response details
|
|
173
|
+
| Status code | Description | Response headers |
|
|
174
|
+
|-------------|-------------|------------------|
|
|
175
|
+
| **200** | OK | - |
|
|
176
|
+
| **404** | Error response (RFC 7807) | - |
|
|
177
|
+
| **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
178
|
+
| **0** | Error response (RFC 7807) | - |
|
|
179
|
+
|
|
180
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
## listRequests
|
|
184
|
+
|
|
185
|
+
> RequestLogPage listRequests(key, model, surface, status, errorCode, clientRequestId, from, to, cursor, limit)
|
|
186
|
+
|
|
187
|
+
List requests (the request log)
|
|
188
|
+
|
|
189
|
+
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).
|
|
190
|
+
|
|
191
|
+
### Example
|
|
192
|
+
|
|
193
|
+
```ts
|
|
194
|
+
import {
|
|
195
|
+
Configuration,
|
|
196
|
+
RequestsApi,
|
|
197
|
+
} from '@deeprelay/sdk';
|
|
198
|
+
import type { ListRequestsRequest } from '@deeprelay/sdk';
|
|
199
|
+
|
|
200
|
+
async function example() {
|
|
201
|
+
console.log("🚀 Testing @deeprelay/sdk SDK...");
|
|
202
|
+
const config = new Configuration({
|
|
203
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
204
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
205
|
+
});
|
|
206
|
+
const api = new RequestsApi(config);
|
|
207
|
+
|
|
208
|
+
const body = {
|
|
209
|
+
// string | Only rows sent with this API key (its `api_key_id`). (optional)
|
|
210
|
+
key: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
211
|
+
// string | Only rows for this model id. (optional)
|
|
212
|
+
model: model_example,
|
|
213
|
+
// 'chat' | 'messages' | 'responses' | 'embeddings' | 'image' | 'video' | Only rows from this endpoint family. (optional)
|
|
214
|
+
surface: surface_example,
|
|
215
|
+
// 'ok' | 'error' | 'cancelled' | 'rejected' | Only rows with this outcome. `rejected` is a call refused before it reached a model (a budget, limit, allowlist or quota gate). (optional)
|
|
216
|
+
status: status_example,
|
|
217
|
+
// string | Only rows that ended with this `X-Deeprelay-Error-Code`. (optional)
|
|
218
|
+
errorCode: errorCode_example,
|
|
219
|
+
// string | Only rows whose `X-Client-Request-Id` equals this value. (optional)
|
|
220
|
+
clientRequestId: clientRequestId_example,
|
|
221
|
+
// Date | Inclusive RFC 3339 range start. Defaults to the start of the 90-day window; an older value is clamped to it. (optional)
|
|
222
|
+
from: 2013-10-20T19:20:30+01:00,
|
|
223
|
+
// Date | Exclusive RFC 3339 range end. Defaults to now; must be after `from`. (optional)
|
|
224
|
+
to: 2013-10-20T19:20:30+01:00,
|
|
225
|
+
// string (optional)
|
|
226
|
+
cursor: cursor_example,
|
|
227
|
+
// number | Page size. Defaults to 50; values above 100 are clamped to 100. (optional)
|
|
228
|
+
limit: 56,
|
|
229
|
+
} satisfies ListRequestsRequest;
|
|
230
|
+
|
|
231
|
+
try {
|
|
232
|
+
const data = await api.listRequests(body);
|
|
233
|
+
console.log(data);
|
|
234
|
+
} catch (error) {
|
|
235
|
+
console.error(error);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Run the test
|
|
240
|
+
example().catch(console.error);
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Parameters
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
| Name | Type | Description | Notes |
|
|
247
|
+
|------------- | ------------- | ------------- | -------------|
|
|
248
|
+
| **key** | `string` | Only rows sent with this API key (its `api_key_id`). | [Optional] [Defaults to `undefined`] |
|
|
249
|
+
| **model** | `string` | Only rows for this model id. | [Optional] [Defaults to `undefined`] |
|
|
250
|
+
| **surface** | `chat`, `messages`, `responses`, `embeddings`, `image`, `video` | Only rows from this endpoint family. | [Optional] [Defaults to `undefined`] [Enum: chat, messages, responses, embeddings, image, video] |
|
|
251
|
+
| **status** | `ok`, `error`, `cancelled`, `rejected` | Only rows with this outcome. `rejected` is a call refused before it reached a model (a budget, limit, allowlist or quota gate). | [Optional] [Defaults to `undefined`] [Enum: ok, error, cancelled, rejected] |
|
|
252
|
+
| **errorCode** | `string` | Only rows that ended with this `X-Deeprelay-Error-Code`. | [Optional] [Defaults to `undefined`] |
|
|
253
|
+
| **clientRequestId** | `string` | Only rows whose `X-Client-Request-Id` equals this value. | [Optional] [Defaults to `undefined`] |
|
|
254
|
+
| **from** | `Date` | Inclusive RFC 3339 range start. Defaults to the start of the 90-day window; an older value is clamped to it. | [Optional] [Defaults to `undefined`] |
|
|
255
|
+
| **to** | `Date` | Exclusive RFC 3339 range end. Defaults to now; must be after `from`. | [Optional] [Defaults to `undefined`] |
|
|
256
|
+
| **cursor** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
257
|
+
| **limit** | `number` | Page size. Defaults to 50; values above 100 are clamped to 100. | [Optional] [Defaults to `50`] |
|
|
258
|
+
|
|
259
|
+
### Return type
|
|
260
|
+
|
|
261
|
+
[**RequestLogPage**](RequestLogPage.md)
|
|
262
|
+
|
|
263
|
+
### Authorization
|
|
264
|
+
|
|
265
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
266
|
+
|
|
267
|
+
### HTTP request headers
|
|
268
|
+
|
|
269
|
+
- **Content-Type**: Not defined
|
|
270
|
+
- **Accept**: `application/json`, `application/problem+json`
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
### HTTP response details
|
|
274
|
+
| Status code | Description | Response headers |
|
|
275
|
+
|-------------|-------------|------------------|
|
|
276
|
+
| **200** | OK | - |
|
|
277
|
+
| **400** | Error response (RFC 7807) | - |
|
|
278
|
+
| **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
279
|
+
| **0** | Error response (RFC 7807) | - |
|
|
280
|
+
|
|
281
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
282
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
# ResponseFormatJSONObject
|
|
3
|
+
|
|
4
|
+
The reply is a single valid JSON object.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`type` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { ResponseFormatJSONObject } from '@deeprelay/sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"type": null,
|
|
20
|
+
} satisfies ResponseFormatJSONObject
|
|
21
|
+
|
|
22
|
+
console.log(example)
|
|
23
|
+
|
|
24
|
+
// Convert the instance to a JSON string
|
|
25
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
26
|
+
console.log(exampleJSON)
|
|
27
|
+
|
|
28
|
+
// Parse the JSON string back to an object
|
|
29
|
+
const exampleParsed = JSON.parse(exampleJSON) as ResponseFormatJSONObject
|
|
30
|
+
console.log(exampleParsed)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
34
|
+
|
|
35
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# ResponseFormatJSONSchema
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`type` | string
|
|
10
|
+
`jsonSchema` | [JSONSchemaFormat](JSONSchemaFormat.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { ResponseFormatJSONSchema } from '@deeprelay/sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"type": null,
|
|
20
|
+
"jsonSchema": null,
|
|
21
|
+
} satisfies ResponseFormatJSONSchema
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as ResponseFormatJSONSchema
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# ResponseFormatText
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`type` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ResponseFormatText } from '@deeprelay/sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"type": null,
|
|
19
|
+
} satisfies ResponseFormatText
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as ResponseFormatText
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|