@deeprelay/sdk 0.2.1 → 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 +1 -1
- package/dist/apis/UsageApi.js +1 -1
- 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 +1 -1
- package/dist/esm/apis/UsageApi.js +1 -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 +1 -1
- package/dist/esm/models/UsageBucket.js +1 -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 +1 -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 +1 -1
- package/dist/models/UsageBucket.js +1 -1
- package/dist/models/UsageCompletionTokensDetails.d.ts +32 -0
- package/dist/models/UsageCompletionTokensDetails.js +48 -0
- package/dist/models/UsagePage.d.ts +1 -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/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 +1 -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 +1 -1
- package/src/models/UsageCompletionTokensDetails.ts +65 -0
- package/src/models/UsagePage.ts +1 -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* deeprelay Public Developer API
|
|
3
|
-
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
3
|
+
* 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.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: 1.0.0
|
|
6
6
|
* Contact: support@deeprelay.ai
|
|
@@ -27,17 +27,21 @@ export interface CancelVideoRequest {
|
|
|
27
27
|
}
|
|
28
28
|
export interface CreateChatCompletionRequest {
|
|
29
29
|
chatCompletionRequest: ChatCompletionRequest;
|
|
30
|
+
xClientRequestId?: string;
|
|
30
31
|
}
|
|
31
32
|
export interface CreateEmbeddingsRequest {
|
|
32
33
|
embeddingsRequest: EmbeddingsRequest;
|
|
34
|
+
xClientRequestId?: string;
|
|
33
35
|
}
|
|
34
36
|
export interface CreateImageRequest {
|
|
35
37
|
imagesGenerationsRequest: ImagesGenerationsRequest;
|
|
36
38
|
idempotencyKey?: string;
|
|
39
|
+
xClientRequestId?: string;
|
|
37
40
|
}
|
|
38
41
|
export interface CreateVideoRequest {
|
|
39
42
|
videoCreateRequest: VideoCreateRequest;
|
|
40
43
|
idempotencyKey?: string;
|
|
44
|
+
xClientRequestId?: string;
|
|
41
45
|
}
|
|
42
46
|
export interface GetModelRequest {
|
|
43
47
|
id: string;
|
|
@@ -53,6 +57,7 @@ export interface InferencePreflightRequest {
|
|
|
53
57
|
}
|
|
54
58
|
export interface ListModelsRequest {
|
|
55
59
|
modality?: ListModelsModalityEnum;
|
|
60
|
+
ifNoneMatch?: string;
|
|
56
61
|
}
|
|
57
62
|
export interface ListVideosRequest {
|
|
58
63
|
after?: string;
|
|
@@ -79,10 +84,12 @@ export declare class InferenceApi extends runtime.BaseAPI {
|
|
|
79
84
|
*/
|
|
80
85
|
createChatCompletionRequestOpts(requestParameters: CreateChatCompletionRequest): Promise<runtime.RequestOpts>;
|
|
81
86
|
/**
|
|
87
|
+
* OpenAI-compatible chat completion. Parameters fall into three groups: - **Semantic parameters are gated per model.** `response_format`, `tools`/`tool_choice`, `logprobs`/`top_logprobs` and `image_url` content parts are sent only to a model whose `/v1/models` entry lists the capability in `supported_parameters` (`vision` for images). A model without it returns 400 `unsupported_parameter` whose message names the models that do support it. When the model supports the parameter but none of its currently routable upstreams does, the request fails with 503 `upstream_unavailable` rather than being silently degraded. - **Hints are forwarded or dropped, never rejected.** `reasoning_effort`, `presence_penalty`, `frequency_penalty`, `seed` and `parallel_tool_calls` are forwarded to an upstream that accepts them and otherwise dropped. Every drop is reported in the `x-deeprelay-ignored-params` response header. - **Rejected everywhere.** `logit_bias` and `function_call` return 400 `unsupported_parameter`; `input_audio` and `file` content parts return 400 `unsupported_content_part`. A non-strict `json_schema` sent to a model that can only guarantee JSON is served as `json_object` and reported as `response_format:downgraded`; a strict one is rejected. A `json_schema` over 64 KiB or nested deeper than 32 levels returns 400 `unsupported_parameter` (param `response_format`). An upstream rejection of a request the relay accepted returns 400 `upstream_rejected_request`. A non-chat model id returns 404 `model_not_found`. The request body is capped at 32 MiB (413 `request_too_large`). Every successful response carries `usage.cost` and `usage.cost_details` (on a stream, only in the final usage chunk). See https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
82
88
|
* Create a chat completion (OpenAI-compatible)
|
|
83
89
|
*/
|
|
84
90
|
createChatCompletionRaw(requestParameters: CreateChatCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChatCompletionResponse>>;
|
|
85
91
|
/**
|
|
92
|
+
* OpenAI-compatible chat completion. Parameters fall into three groups: - **Semantic parameters are gated per model.** `response_format`, `tools`/`tool_choice`, `logprobs`/`top_logprobs` and `image_url` content parts are sent only to a model whose `/v1/models` entry lists the capability in `supported_parameters` (`vision` for images). A model without it returns 400 `unsupported_parameter` whose message names the models that do support it. When the model supports the parameter but none of its currently routable upstreams does, the request fails with 503 `upstream_unavailable` rather than being silently degraded. - **Hints are forwarded or dropped, never rejected.** `reasoning_effort`, `presence_penalty`, `frequency_penalty`, `seed` and `parallel_tool_calls` are forwarded to an upstream that accepts them and otherwise dropped. Every drop is reported in the `x-deeprelay-ignored-params` response header. - **Rejected everywhere.** `logit_bias` and `function_call` return 400 `unsupported_parameter`; `input_audio` and `file` content parts return 400 `unsupported_content_part`. A non-strict `json_schema` sent to a model that can only guarantee JSON is served as `json_object` and reported as `response_format:downgraded`; a strict one is rejected. A `json_schema` over 64 KiB or nested deeper than 32 levels returns 400 `unsupported_parameter` (param `response_format`). An upstream rejection of a request the relay accepted returns 400 `upstream_rejected_request`. A non-chat model id returns 404 `model_not_found`. The request body is capped at 32 MiB (413 `request_too_large`). Every successful response carries `usage.cost` and `usage.cost_details` (on a stream, only in the final usage chunk). See https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
86
93
|
* Create a chat completion (OpenAI-compatible)
|
|
87
94
|
*/
|
|
88
95
|
createChatCompletion(requestParameters: CreateChatCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChatCompletionResponse>;
|
|
@@ -133,10 +140,12 @@ export declare class InferenceApi extends runtime.BaseAPI {
|
|
|
133
140
|
*/
|
|
134
141
|
getModelRequestOpts(requestParameters: GetModelRequest): Promise<runtime.RequestOpts>;
|
|
135
142
|
/**
|
|
143
|
+
* A key with a model allowlist gets 403 `model_not_allowed_for_key` for a model off its list, and the same 403 for an id that does not exist.
|
|
136
144
|
* Get a specific model (OpenAI-compatible)
|
|
137
145
|
*/
|
|
138
146
|
getModelRaw(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Model>>;
|
|
139
147
|
/**
|
|
148
|
+
* A key with a model allowlist gets 403 `model_not_allowed_for_key` for a model off its list, and the same 403 for an id that does not exist.
|
|
140
149
|
* Get a specific model (OpenAI-compatible)
|
|
141
150
|
*/
|
|
142
151
|
getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Model>;
|
|
@@ -185,10 +194,12 @@ export declare class InferenceApi extends runtime.BaseAPI {
|
|
|
185
194
|
*/
|
|
186
195
|
listModelsRequestOpts(requestParameters: ListModelsRequest): Promise<runtime.RequestOpts>;
|
|
187
196
|
/**
|
|
197
|
+
* Works with or without an API key, and returns the same body either way. Without a key the response is publicly cacheable (`Cache-Control: public, max-age=60`), carries a strong `ETag` (send `If-None-Match` to get a 304), and is rate-limited per client IP (429 `rate_limit_exceeded` with Retry-After). With a key it is `Cache-Control: private` and counts against the key\'s rate limit; an invalid key returns 401, it does not fall back to anonymous access. Error responses are `no-store`. Each entry\'s `supported_parameters` is backed by live capability probes of the model\'s upstreams: it is the list to check before sending a gated parameter (`response_format`, `structured_outputs`, `logprobs`, `tools`, `vision`, ...). One exception to \"the same body\": a key with a model allowlist (`allowed_models`) sees only the models on its list. Each entry may carry a `metrics` object (always the last key): measured time to first token, decode rate and success rate over a rolling window of deeprelay customer traffic. Below the sample minimum `insufficient_data` is true and the figure is omitted, never zero.
|
|
188
198
|
* List available models (OpenAI-compatible)
|
|
189
199
|
*/
|
|
190
200
|
listModelsRaw(requestParameters: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelList>>;
|
|
191
201
|
/**
|
|
202
|
+
* Works with or without an API key, and returns the same body either way. Without a key the response is publicly cacheable (`Cache-Control: public, max-age=60`), carries a strong `ETag` (send `If-None-Match` to get a 304), and is rate-limited per client IP (429 `rate_limit_exceeded` with Retry-After). With a key it is `Cache-Control: private` and counts against the key\'s rate limit; an invalid key returns 401, it does not fall back to anonymous access. Error responses are `no-store`. Each entry\'s `supported_parameters` is backed by live capability probes of the model\'s upstreams: it is the list to check before sending a gated parameter (`response_format`, `structured_outputs`, `logprobs`, `tools`, `vision`, ...). One exception to \"the same body\": a key with a model allowlist (`allowed_models`) sees only the models on its list. Each entry may carry a `metrics` object (always the last key): measured time to first token, decode rate and success rate over a rolling window of deeprelay customer traffic. Below the sample minimum `insufficient_data` is true and the figure is omitted, never zero.
|
|
192
203
|
* List available models (OpenAI-compatible)
|
|
193
204
|
*/
|
|
194
205
|
listModels(requestParameters?: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelList>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* deeprelay Public Developer API
|
|
6
|
-
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
6
|
+
* 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.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: 1.0.0
|
|
9
9
|
* Contact: support@deeprelay.ai
|
|
@@ -97,6 +97,9 @@ class InferenceApi extends runtime.BaseAPI {
|
|
|
97
97
|
const queryParameters = {};
|
|
98
98
|
const headerParameters = {};
|
|
99
99
|
headerParameters['Content-Type'] = 'application/json';
|
|
100
|
+
if (requestParameters['xClientRequestId'] != null) {
|
|
101
|
+
headerParameters['X-Client-Request-Id'] = String(requestParameters['xClientRequestId']);
|
|
102
|
+
}
|
|
100
103
|
if (this.configuration && this.configuration.accessToken) {
|
|
101
104
|
const token = this.configuration.accessToken;
|
|
102
105
|
const tokenString = yield token("bearerAuth", []);
|
|
@@ -115,6 +118,7 @@ class InferenceApi extends runtime.BaseAPI {
|
|
|
115
118
|
});
|
|
116
119
|
}
|
|
117
120
|
/**
|
|
121
|
+
* OpenAI-compatible chat completion. Parameters fall into three groups: - **Semantic parameters are gated per model.** `response_format`, `tools`/`tool_choice`, `logprobs`/`top_logprobs` and `image_url` content parts are sent only to a model whose `/v1/models` entry lists the capability in `supported_parameters` (`vision` for images). A model without it returns 400 `unsupported_parameter` whose message names the models that do support it. When the model supports the parameter but none of its currently routable upstreams does, the request fails with 503 `upstream_unavailable` rather than being silently degraded. - **Hints are forwarded or dropped, never rejected.** `reasoning_effort`, `presence_penalty`, `frequency_penalty`, `seed` and `parallel_tool_calls` are forwarded to an upstream that accepts them and otherwise dropped. Every drop is reported in the `x-deeprelay-ignored-params` response header. - **Rejected everywhere.** `logit_bias` and `function_call` return 400 `unsupported_parameter`; `input_audio` and `file` content parts return 400 `unsupported_content_part`. A non-strict `json_schema` sent to a model that can only guarantee JSON is served as `json_object` and reported as `response_format:downgraded`; a strict one is rejected. A `json_schema` over 64 KiB or nested deeper than 32 levels returns 400 `unsupported_parameter` (param `response_format`). An upstream rejection of a request the relay accepted returns 400 `upstream_rejected_request`. A non-chat model id returns 404 `model_not_found`. The request body is capped at 32 MiB (413 `request_too_large`). Every successful response carries `usage.cost` and `usage.cost_details` (on a stream, only in the final usage chunk). See https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
118
122
|
* Create a chat completion (OpenAI-compatible)
|
|
119
123
|
*/
|
|
120
124
|
createChatCompletionRaw(requestParameters, initOverrides) {
|
|
@@ -125,6 +129,7 @@ class InferenceApi extends runtime.BaseAPI {
|
|
|
125
129
|
});
|
|
126
130
|
}
|
|
127
131
|
/**
|
|
132
|
+
* OpenAI-compatible chat completion. Parameters fall into three groups: - **Semantic parameters are gated per model.** `response_format`, `tools`/`tool_choice`, `logprobs`/`top_logprobs` and `image_url` content parts are sent only to a model whose `/v1/models` entry lists the capability in `supported_parameters` (`vision` for images). A model without it returns 400 `unsupported_parameter` whose message names the models that do support it. When the model supports the parameter but none of its currently routable upstreams does, the request fails with 503 `upstream_unavailable` rather than being silently degraded. - **Hints are forwarded or dropped, never rejected.** `reasoning_effort`, `presence_penalty`, `frequency_penalty`, `seed` and `parallel_tool_calls` are forwarded to an upstream that accepts them and otherwise dropped. Every drop is reported in the `x-deeprelay-ignored-params` response header. - **Rejected everywhere.** `logit_bias` and `function_call` return 400 `unsupported_parameter`; `input_audio` and `file` content parts return 400 `unsupported_content_part`. A non-strict `json_schema` sent to a model that can only guarantee JSON is served as `json_object` and reported as `response_format:downgraded`; a strict one is rejected. A `json_schema` over 64 KiB or nested deeper than 32 levels returns 400 `unsupported_parameter` (param `response_format`). An upstream rejection of a request the relay accepted returns 400 `upstream_rejected_request`. A non-chat model id returns 404 `model_not_found`. The request body is capped at 32 MiB (413 `request_too_large`). Every successful response carries `usage.cost` and `usage.cost_details` (on a stream, only in the final usage chunk). See https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
128
133
|
* Create a chat completion (OpenAI-compatible)
|
|
129
134
|
*/
|
|
130
135
|
createChatCompletion(requestParameters, initOverrides) {
|
|
@@ -144,6 +149,9 @@ class InferenceApi extends runtime.BaseAPI {
|
|
|
144
149
|
const queryParameters = {};
|
|
145
150
|
const headerParameters = {};
|
|
146
151
|
headerParameters['Content-Type'] = 'application/json';
|
|
152
|
+
if (requestParameters['xClientRequestId'] != null) {
|
|
153
|
+
headerParameters['X-Client-Request-Id'] = String(requestParameters['xClientRequestId']);
|
|
154
|
+
}
|
|
147
155
|
if (this.configuration && this.configuration.accessToken) {
|
|
148
156
|
const token = this.configuration.accessToken;
|
|
149
157
|
const tokenString = yield token("bearerAuth", []);
|
|
@@ -196,6 +204,9 @@ class InferenceApi extends runtime.BaseAPI {
|
|
|
196
204
|
if (requestParameters['idempotencyKey'] != null) {
|
|
197
205
|
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
198
206
|
}
|
|
207
|
+
if (requestParameters['xClientRequestId'] != null) {
|
|
208
|
+
headerParameters['X-Client-Request-Id'] = String(requestParameters['xClientRequestId']);
|
|
209
|
+
}
|
|
199
210
|
if (this.configuration && this.configuration.accessToken) {
|
|
200
211
|
const token = this.configuration.accessToken;
|
|
201
212
|
const tokenString = yield token("bearerAuth", []);
|
|
@@ -248,6 +259,9 @@ class InferenceApi extends runtime.BaseAPI {
|
|
|
248
259
|
if (requestParameters['idempotencyKey'] != null) {
|
|
249
260
|
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
250
261
|
}
|
|
262
|
+
if (requestParameters['xClientRequestId'] != null) {
|
|
263
|
+
headerParameters['X-Client-Request-Id'] = String(requestParameters['xClientRequestId']);
|
|
264
|
+
}
|
|
251
265
|
if (this.configuration && this.configuration.accessToken) {
|
|
252
266
|
const token = this.configuration.accessToken;
|
|
253
267
|
const tokenString = yield token("bearerAuth", []);
|
|
@@ -314,6 +328,7 @@ class InferenceApi extends runtime.BaseAPI {
|
|
|
314
328
|
});
|
|
315
329
|
}
|
|
316
330
|
/**
|
|
331
|
+
* A key with a model allowlist gets 403 `model_not_allowed_for_key` for a model off its list, and the same 403 for an id that does not exist.
|
|
317
332
|
* Get a specific model (OpenAI-compatible)
|
|
318
333
|
*/
|
|
319
334
|
getModelRaw(requestParameters, initOverrides) {
|
|
@@ -324,6 +339,7 @@ class InferenceApi extends runtime.BaseAPI {
|
|
|
324
339
|
});
|
|
325
340
|
}
|
|
326
341
|
/**
|
|
342
|
+
* A key with a model allowlist gets 403 `model_not_allowed_for_key` for a model off its list, and the same 403 for an id that does not exist.
|
|
327
343
|
* Get a specific model (OpenAI-compatible)
|
|
328
344
|
*/
|
|
329
345
|
getModel(requestParameters, initOverrides) {
|
|
@@ -486,6 +502,9 @@ class InferenceApi extends runtime.BaseAPI {
|
|
|
486
502
|
queryParameters['modality'] = requestParameters['modality'];
|
|
487
503
|
}
|
|
488
504
|
const headerParameters = {};
|
|
505
|
+
if (requestParameters['ifNoneMatch'] != null) {
|
|
506
|
+
headerParameters['If-None-Match'] = String(requestParameters['ifNoneMatch']);
|
|
507
|
+
}
|
|
489
508
|
if (this.configuration && this.configuration.accessToken) {
|
|
490
509
|
const token = this.configuration.accessToken;
|
|
491
510
|
const tokenString = yield token("bearerAuth", []);
|
|
@@ -503,6 +522,7 @@ class InferenceApi extends runtime.BaseAPI {
|
|
|
503
522
|
});
|
|
504
523
|
}
|
|
505
524
|
/**
|
|
525
|
+
* Works with or without an API key, and returns the same body either way. Without a key the response is publicly cacheable (`Cache-Control: public, max-age=60`), carries a strong `ETag` (send `If-None-Match` to get a 304), and is rate-limited per client IP (429 `rate_limit_exceeded` with Retry-After). With a key it is `Cache-Control: private` and counts against the key\'s rate limit; an invalid key returns 401, it does not fall back to anonymous access. Error responses are `no-store`. Each entry\'s `supported_parameters` is backed by live capability probes of the model\'s upstreams: it is the list to check before sending a gated parameter (`response_format`, `structured_outputs`, `logprobs`, `tools`, `vision`, ...). One exception to \"the same body\": a key with a model allowlist (`allowed_models`) sees only the models on its list. Each entry may carry a `metrics` object (always the last key): measured time to first token, decode rate and success rate over a rolling window of deeprelay customer traffic. Below the sample minimum `insufficient_data` is true and the figure is omitted, never zero.
|
|
506
526
|
* List available models (OpenAI-compatible)
|
|
507
527
|
*/
|
|
508
528
|
listModelsRaw(requestParameters, initOverrides) {
|
|
@@ -513,6 +533,7 @@ class InferenceApi extends runtime.BaseAPI {
|
|
|
513
533
|
});
|
|
514
534
|
}
|
|
515
535
|
/**
|
|
536
|
+
* Works with or without an API key, and returns the same body either way. Without a key the response is publicly cacheable (`Cache-Control: public, max-age=60`), carries a strong `ETag` (send `If-None-Match` to get a 304), and is rate-limited per client IP (429 `rate_limit_exceeded` with Retry-After). With a key it is `Cache-Control: private` and counts against the key\'s rate limit; an invalid key returns 401, it does not fall back to anonymous access. Error responses are `no-store`. Each entry\'s `supported_parameters` is backed by live capability probes of the model\'s upstreams: it is the list to check before sending a gated parameter (`response_format`, `structured_outputs`, `logprobs`, `tools`, `vision`, ...). One exception to \"the same body\": a key with a model allowlist (`allowed_models`) sees only the models on its list. Each entry may carry a `metrics` object (always the last key): measured time to first token, decode rate and success rate over a rolling window of deeprelay customer traffic. Below the sample minimum `insufficient_data` is true and the figure is omitted, never zero.
|
|
516
537
|
* List available models (OpenAI-compatible)
|
|
517
538
|
*/
|
|
518
539
|
listModels() {
|
package/dist/apis/MetaApi.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* deeprelay Public Developer API
|
|
3
|
-
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
3
|
+
* 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.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: 1.0.0
|
|
6
6
|
* Contact: support@deeprelay.ai
|
package/dist/apis/MetaApi.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* deeprelay Public Developer API
|
|
6
|
-
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
6
|
+
* 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.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: 1.0.0
|
|
9
9
|
* Contact: support@deeprelay.ai
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* deeprelay Public Developer API
|
|
3
|
+
* 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.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@deeprelay.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import { type RequestLogEntry } from '../models/RequestLogEntry';
|
|
14
|
+
import { type RequestLogPage } from '../models/RequestLogPage';
|
|
15
|
+
export interface ExportRequestsRequest {
|
|
16
|
+
key?: string;
|
|
17
|
+
model?: string;
|
|
18
|
+
surface?: ExportRequestsSurfaceEnum;
|
|
19
|
+
status?: ExportRequestsStatusEnum;
|
|
20
|
+
errorCode?: string;
|
|
21
|
+
clientRequestId?: string;
|
|
22
|
+
from?: Date;
|
|
23
|
+
to?: Date;
|
|
24
|
+
}
|
|
25
|
+
export interface GetRequestRequest {
|
|
26
|
+
id: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ListRequestsRequest {
|
|
29
|
+
key?: string;
|
|
30
|
+
model?: string;
|
|
31
|
+
surface?: ListRequestsSurfaceEnum;
|
|
32
|
+
status?: ListRequestsStatusEnum;
|
|
33
|
+
errorCode?: string;
|
|
34
|
+
clientRequestId?: string;
|
|
35
|
+
from?: Date;
|
|
36
|
+
to?: Date;
|
|
37
|
+
cursor?: string;
|
|
38
|
+
limit?: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
export declare class RequestsApi extends runtime.BaseAPI {
|
|
44
|
+
/**
|
|
45
|
+
* Creates request options for exportRequests without sending the request
|
|
46
|
+
*/
|
|
47
|
+
exportRequestsRequestOpts(requestParameters: ExportRequestsRequest): Promise<runtime.RequestOpts>;
|
|
48
|
+
/**
|
|
49
|
+
* 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.
|
|
50
|
+
* Export the request log as CSV
|
|
51
|
+
*/
|
|
52
|
+
exportRequestsRaw(requestParameters: ExportRequestsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
53
|
+
/**
|
|
54
|
+
* 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.
|
|
55
|
+
* Export the request log as CSV
|
|
56
|
+
*/
|
|
57
|
+
exportRequests(requestParameters?: ExportRequestsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
58
|
+
/**
|
|
59
|
+
* Creates request options for getRequest without sending the request
|
|
60
|
+
*/
|
|
61
|
+
getRequestRequestOpts(requestParameters: GetRequestRequest): Promise<runtime.RequestOpts>;
|
|
62
|
+
/**
|
|
63
|
+
* 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.
|
|
64
|
+
* Get one request
|
|
65
|
+
*/
|
|
66
|
+
getRequestRaw(requestParameters: GetRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RequestLogEntry>>;
|
|
67
|
+
/**
|
|
68
|
+
* 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.
|
|
69
|
+
* Get one request
|
|
70
|
+
*/
|
|
71
|
+
getRequest(requestParameters: GetRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RequestLogEntry>;
|
|
72
|
+
/**
|
|
73
|
+
* Creates request options for listRequests without sending the request
|
|
74
|
+
*/
|
|
75
|
+
listRequestsRequestOpts(requestParameters: ListRequestsRequest): Promise<runtime.RequestOpts>;
|
|
76
|
+
/**
|
|
77
|
+
* 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).
|
|
78
|
+
* List requests (the request log)
|
|
79
|
+
*/
|
|
80
|
+
listRequestsRaw(requestParameters: ListRequestsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RequestLogPage>>;
|
|
81
|
+
/**
|
|
82
|
+
* 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).
|
|
83
|
+
* List requests (the request log)
|
|
84
|
+
*/
|
|
85
|
+
listRequests(requestParameters?: ListRequestsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RequestLogPage>;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* @export
|
|
89
|
+
*/
|
|
90
|
+
export declare const ExportRequestsSurfaceEnum: {
|
|
91
|
+
readonly Chat: "chat";
|
|
92
|
+
readonly Messages: "messages";
|
|
93
|
+
readonly Responses: "responses";
|
|
94
|
+
readonly Embeddings: "embeddings";
|
|
95
|
+
readonly Image: "image";
|
|
96
|
+
readonly Video: "video";
|
|
97
|
+
};
|
|
98
|
+
export type ExportRequestsSurfaceEnum = typeof ExportRequestsSurfaceEnum[keyof typeof ExportRequestsSurfaceEnum];
|
|
99
|
+
/**
|
|
100
|
+
* @export
|
|
101
|
+
*/
|
|
102
|
+
export declare const ExportRequestsStatusEnum: {
|
|
103
|
+
readonly Ok: "ok";
|
|
104
|
+
readonly Error: "error";
|
|
105
|
+
readonly Cancelled: "cancelled";
|
|
106
|
+
readonly Rejected: "rejected";
|
|
107
|
+
};
|
|
108
|
+
export type ExportRequestsStatusEnum = typeof ExportRequestsStatusEnum[keyof typeof ExportRequestsStatusEnum];
|
|
109
|
+
/**
|
|
110
|
+
* @export
|
|
111
|
+
*/
|
|
112
|
+
export declare const ListRequestsSurfaceEnum: {
|
|
113
|
+
readonly Chat: "chat";
|
|
114
|
+
readonly Messages: "messages";
|
|
115
|
+
readonly Responses: "responses";
|
|
116
|
+
readonly Embeddings: "embeddings";
|
|
117
|
+
readonly Image: "image";
|
|
118
|
+
readonly Video: "video";
|
|
119
|
+
};
|
|
120
|
+
export type ListRequestsSurfaceEnum = typeof ListRequestsSurfaceEnum[keyof typeof ListRequestsSurfaceEnum];
|
|
121
|
+
/**
|
|
122
|
+
* @export
|
|
123
|
+
*/
|
|
124
|
+
export declare const ListRequestsStatusEnum: {
|
|
125
|
+
readonly Ok: "ok";
|
|
126
|
+
readonly Error: "error";
|
|
127
|
+
readonly Cancelled: "cancelled";
|
|
128
|
+
readonly Rejected: "rejected";
|
|
129
|
+
};
|
|
130
|
+
export type ListRequestsStatusEnum = typeof ListRequestsStatusEnum[keyof typeof ListRequestsStatusEnum];
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* deeprelay Public Developer API
|
|
6
|
+
* 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.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@deeprelay.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ListRequestsStatusEnum = exports.ListRequestsSurfaceEnum = exports.ExportRequestsStatusEnum = exports.ExportRequestsSurfaceEnum = exports.RequestsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const RequestLogEntry_1 = require("../models/RequestLogEntry");
|
|
28
|
+
const RequestLogPage_1 = require("../models/RequestLogPage");
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
class RequestsApi extends runtime.BaseAPI {
|
|
33
|
+
/**
|
|
34
|
+
* Creates request options for exportRequests without sending the request
|
|
35
|
+
*/
|
|
36
|
+
exportRequestsRequestOpts(requestParameters) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
const queryParameters = {};
|
|
39
|
+
if (requestParameters['key'] != null) {
|
|
40
|
+
queryParameters['key'] = requestParameters['key'];
|
|
41
|
+
}
|
|
42
|
+
if (requestParameters['model'] != null) {
|
|
43
|
+
queryParameters['model'] = requestParameters['model'];
|
|
44
|
+
}
|
|
45
|
+
if (requestParameters['surface'] != null) {
|
|
46
|
+
queryParameters['surface'] = requestParameters['surface'];
|
|
47
|
+
}
|
|
48
|
+
if (requestParameters['status'] != null) {
|
|
49
|
+
queryParameters['status'] = requestParameters['status'];
|
|
50
|
+
}
|
|
51
|
+
if (requestParameters['errorCode'] != null) {
|
|
52
|
+
queryParameters['error_code'] = requestParameters['errorCode'];
|
|
53
|
+
}
|
|
54
|
+
if (requestParameters['clientRequestId'] != null) {
|
|
55
|
+
queryParameters['client_request_id'] = requestParameters['clientRequestId'];
|
|
56
|
+
}
|
|
57
|
+
if (requestParameters['from'] != null) {
|
|
58
|
+
queryParameters['from'] = requestParameters['from'].toISOString();
|
|
59
|
+
}
|
|
60
|
+
if (requestParameters['to'] != null) {
|
|
61
|
+
queryParameters['to'] = requestParameters['to'].toISOString();
|
|
62
|
+
}
|
|
63
|
+
const headerParameters = {};
|
|
64
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
65
|
+
const token = this.configuration.accessToken;
|
|
66
|
+
const tokenString = yield token("bearerAuth", []);
|
|
67
|
+
if (tokenString) {
|
|
68
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
let urlPath = `/requests/export`;
|
|
72
|
+
return {
|
|
73
|
+
path: urlPath,
|
|
74
|
+
method: 'GET',
|
|
75
|
+
headers: headerParameters,
|
|
76
|
+
query: queryParameters,
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* 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.
|
|
82
|
+
* Export the request log as CSV
|
|
83
|
+
*/
|
|
84
|
+
exportRequestsRaw(requestParameters, initOverrides) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
const requestOptions = yield this.exportRequestsRequestOpts(requestParameters);
|
|
87
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
88
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
89
|
+
return new runtime.JSONApiResponse(response);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
return new runtime.TextApiResponse(response);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* 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.
|
|
98
|
+
* Export the request log as CSV
|
|
99
|
+
*/
|
|
100
|
+
exportRequests() {
|
|
101
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
102
|
+
const response = yield this.exportRequestsRaw(requestParameters, initOverrides);
|
|
103
|
+
return yield response.value();
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Creates request options for getRequest without sending the request
|
|
108
|
+
*/
|
|
109
|
+
getRequestRequestOpts(requestParameters) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
if (requestParameters['id'] == null) {
|
|
112
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getRequest().');
|
|
113
|
+
}
|
|
114
|
+
const queryParameters = {};
|
|
115
|
+
const headerParameters = {};
|
|
116
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
117
|
+
const token = this.configuration.accessToken;
|
|
118
|
+
const tokenString = yield token("bearerAuth", []);
|
|
119
|
+
if (tokenString) {
|
|
120
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
let urlPath = `/requests/{id}`;
|
|
124
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
125
|
+
return {
|
|
126
|
+
path: urlPath,
|
|
127
|
+
method: 'GET',
|
|
128
|
+
headers: headerParameters,
|
|
129
|
+
query: queryParameters,
|
|
130
|
+
};
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* 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.
|
|
135
|
+
* Get one request
|
|
136
|
+
*/
|
|
137
|
+
getRequestRaw(requestParameters, initOverrides) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
const requestOptions = yield this.getRequestRequestOpts(requestParameters);
|
|
140
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
141
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, RequestLogEntry_1.RequestLogEntryFromJSON)(jsonValue));
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* 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.
|
|
146
|
+
* Get one request
|
|
147
|
+
*/
|
|
148
|
+
getRequest(requestParameters, initOverrides) {
|
|
149
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
const response = yield this.getRequestRaw(requestParameters, initOverrides);
|
|
151
|
+
return yield response.value();
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Creates request options for listRequests without sending the request
|
|
156
|
+
*/
|
|
157
|
+
listRequestsRequestOpts(requestParameters) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
const queryParameters = {};
|
|
160
|
+
if (requestParameters['key'] != null) {
|
|
161
|
+
queryParameters['key'] = requestParameters['key'];
|
|
162
|
+
}
|
|
163
|
+
if (requestParameters['model'] != null) {
|
|
164
|
+
queryParameters['model'] = requestParameters['model'];
|
|
165
|
+
}
|
|
166
|
+
if (requestParameters['surface'] != null) {
|
|
167
|
+
queryParameters['surface'] = requestParameters['surface'];
|
|
168
|
+
}
|
|
169
|
+
if (requestParameters['status'] != null) {
|
|
170
|
+
queryParameters['status'] = requestParameters['status'];
|
|
171
|
+
}
|
|
172
|
+
if (requestParameters['errorCode'] != null) {
|
|
173
|
+
queryParameters['error_code'] = requestParameters['errorCode'];
|
|
174
|
+
}
|
|
175
|
+
if (requestParameters['clientRequestId'] != null) {
|
|
176
|
+
queryParameters['client_request_id'] = requestParameters['clientRequestId'];
|
|
177
|
+
}
|
|
178
|
+
if (requestParameters['from'] != null) {
|
|
179
|
+
queryParameters['from'] = requestParameters['from'].toISOString();
|
|
180
|
+
}
|
|
181
|
+
if (requestParameters['to'] != null) {
|
|
182
|
+
queryParameters['to'] = requestParameters['to'].toISOString();
|
|
183
|
+
}
|
|
184
|
+
if (requestParameters['cursor'] != null) {
|
|
185
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
186
|
+
}
|
|
187
|
+
if (requestParameters['limit'] != null) {
|
|
188
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
189
|
+
}
|
|
190
|
+
const headerParameters = {};
|
|
191
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
192
|
+
const token = this.configuration.accessToken;
|
|
193
|
+
const tokenString = yield token("bearerAuth", []);
|
|
194
|
+
if (tokenString) {
|
|
195
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
let urlPath = `/requests`;
|
|
199
|
+
return {
|
|
200
|
+
path: urlPath,
|
|
201
|
+
method: 'GET',
|
|
202
|
+
headers: headerParameters,
|
|
203
|
+
query: queryParameters,
|
|
204
|
+
};
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* 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).
|
|
209
|
+
* List requests (the request log)
|
|
210
|
+
*/
|
|
211
|
+
listRequestsRaw(requestParameters, initOverrides) {
|
|
212
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
213
|
+
const requestOptions = yield this.listRequestsRequestOpts(requestParameters);
|
|
214
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
215
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, RequestLogPage_1.RequestLogPageFromJSON)(jsonValue));
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* 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).
|
|
220
|
+
* List requests (the request log)
|
|
221
|
+
*/
|
|
222
|
+
listRequests() {
|
|
223
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
224
|
+
const response = yield this.listRequestsRaw(requestParameters, initOverrides);
|
|
225
|
+
return yield response.value();
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
exports.RequestsApi = RequestsApi;
|
|
230
|
+
/**
|
|
231
|
+
* @export
|
|
232
|
+
*/
|
|
233
|
+
exports.ExportRequestsSurfaceEnum = {
|
|
234
|
+
Chat: 'chat',
|
|
235
|
+
Messages: 'messages',
|
|
236
|
+
Responses: 'responses',
|
|
237
|
+
Embeddings: 'embeddings',
|
|
238
|
+
Image: 'image',
|
|
239
|
+
Video: 'video'
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* @export
|
|
243
|
+
*/
|
|
244
|
+
exports.ExportRequestsStatusEnum = {
|
|
245
|
+
Ok: 'ok',
|
|
246
|
+
Error: 'error',
|
|
247
|
+
Cancelled: 'cancelled',
|
|
248
|
+
Rejected: 'rejected'
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
251
|
+
* @export
|
|
252
|
+
*/
|
|
253
|
+
exports.ListRequestsSurfaceEnum = {
|
|
254
|
+
Chat: 'chat',
|
|
255
|
+
Messages: 'messages',
|
|
256
|
+
Responses: 'responses',
|
|
257
|
+
Embeddings: 'embeddings',
|
|
258
|
+
Image: 'image',
|
|
259
|
+
Video: 'video'
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* @export
|
|
263
|
+
*/
|
|
264
|
+
exports.ListRequestsStatusEnum = {
|
|
265
|
+
Ok: 'ok',
|
|
266
|
+
Error: 'error',
|
|
267
|
+
Cancelled: 'cancelled',
|
|
268
|
+
Rejected: 'rejected'
|
|
269
|
+
};
|
package/dist/apis/UsageApi.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* deeprelay Public Developer API
|
|
3
|
-
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
3
|
+
* 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.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: 1.0.0
|
|
6
6
|
* Contact: support@deeprelay.ai
|
package/dist/apis/UsageApi.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* deeprelay Public Developer API
|
|
6
|
-
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
6
|
+
* 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.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: 1.0.0
|
|
9
9
|
* Contact: support@deeprelay.ai
|