@deeprelay/sdk 0.0.1 → 0.1.1
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 +126 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +24 -0
- package/LICENSE +204 -0
- package/README.md +197 -4
- package/dist/apis/BillingApi.d.ts +169 -0
- package/dist/apis/BillingApi.js +457 -0
- package/dist/apis/InferenceApi.d.ts +217 -0
- package/dist/apis/InferenceApi.js +582 -0
- package/dist/apis/MetaApi.d.ts +44 -0
- package/dist/apis/MetaApi.js +105 -0
- package/dist/apis/OperationsApi.d.ts +33 -0
- package/dist/apis/OperationsApi.js +79 -0
- package/dist/apis/UsageApi.d.ts +56 -0
- package/dist/apis/UsageApi.js +109 -0
- package/dist/apis/WebhooksApi.d.ts +82 -0
- package/dist/apis/WebhooksApi.js +224 -0
- package/dist/apis/index.d.ts +6 -0
- package/dist/apis/index.js +24 -0
- package/dist/esm/apis/BillingApi.d.ts +169 -0
- package/dist/esm/apis/BillingApi.js +453 -0
- package/dist/esm/apis/InferenceApi.d.ts +217 -0
- package/dist/esm/apis/InferenceApi.js +578 -0
- package/dist/esm/apis/MetaApi.d.ts +44 -0
- package/dist/esm/apis/MetaApi.js +101 -0
- package/dist/esm/apis/OperationsApi.d.ts +33 -0
- package/dist/esm/apis/OperationsApi.js +75 -0
- package/dist/esm/apis/UsageApi.d.ts +56 -0
- package/dist/esm/apis/UsageApi.js +105 -0
- package/dist/esm/apis/WebhooksApi.d.ts +82 -0
- package/dist/esm/apis/WebhooksApi.js +220 -0
- package/dist/esm/apis/index.d.ts +6 -0
- package/dist/esm/apis/index.js +8 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/Balance.d.ts +65 -0
- package/dist/esm/models/Balance.js +63 -0
- package/dist/esm/models/ChatChoice.d.ts +55 -0
- package/dist/esm/models/ChatChoice.js +55 -0
- package/dist/esm/models/ChatCompletionRequest.d.ts +64 -0
- package/dist/esm/models/ChatCompletionRequest.js +57 -0
- package/dist/esm/models/ChatCompletionResponse.d.ts +71 -0
- package/dist/esm/models/ChatCompletionResponse.js +73 -0
- package/dist/esm/models/ChatMessage.d.ts +47 -0
- package/dist/esm/models/ChatMessage.js +55 -0
- package/dist/esm/models/CreateCryptoDepositRequest.d.ts +64 -0
- package/dist/esm/models/CreateCryptoDepositRequest.js +68 -0
- package/dist/esm/models/CreateWebhookEndpointRequest.d.ts +50 -0
- package/dist/esm/models/CreateWebhookEndpointRequest.js +58 -0
- package/dist/esm/models/CryptoDeposit.d.ts +114 -0
- package/dist/esm/models/CryptoDeposit.js +90 -0
- package/dist/esm/models/Embedding.d.ts +51 -0
- package/dist/esm/models/Embedding.js +59 -0
- package/dist/esm/models/EmbeddingsRequest.d.ts +64 -0
- package/dist/esm/models/EmbeddingsRequest.js +60 -0
- package/dist/esm/models/EmbeddingsRequestInput.d.ts +21 -0
- package/dist/esm/models/EmbeddingsRequestInput.js +47 -0
- package/dist/esm/models/EmbeddingsResponse.d.ts +59 -0
- package/dist/esm/models/EmbeddingsResponse.js +65 -0
- package/dist/esm/models/EmbeddingsUsage.d.ts +38 -0
- package/dist/esm/models/EmbeddingsUsage.js +47 -0
- package/dist/esm/models/GetHealth200Response.d.ts +39 -0
- package/dist/esm/models/GetHealth200Response.js +47 -0
- package/dist/esm/models/ImagesGenerationsRequest.d.ts +63 -0
- package/dist/esm/models/ImagesGenerationsRequest.js +59 -0
- package/dist/esm/models/ImagesResponse.d.ts +46 -0
- package/dist/esm/models/ImagesResponse.js +53 -0
- package/dist/esm/models/ImagesResponseDataInner.d.ts +32 -0
- package/dist/esm/models/ImagesResponseDataInner.js +43 -0
- package/dist/esm/models/ImagesResponseUsage.d.ts +32 -0
- package/dist/esm/models/ImagesResponseUsage.js +43 -0
- package/dist/esm/models/InferencePreflight.d.ts +92 -0
- package/dist/esm/models/InferencePreflight.js +86 -0
- package/dist/esm/models/ListDeposits200Response.d.ts +39 -0
- package/dist/esm/models/ListDeposits200Response.js +48 -0
- package/dist/esm/models/Model.d.ts +152 -0
- package/dist/esm/models/Model.js +110 -0
- package/dist/esm/models/ModelList.d.ts +46 -0
- package/dist/esm/models/ModelList.js +56 -0
- package/dist/esm/models/ModelParametersInner.d.ts +72 -0
- package/dist/esm/models/ModelParametersInner.js +64 -0
- package/dist/esm/models/ModelPricing.d.ts +126 -0
- package/dist/esm/models/ModelPricing.js +78 -0
- package/dist/esm/models/ModelRate.d.ts +62 -0
- package/dist/esm/models/ModelRate.js +51 -0
- package/dist/esm/models/OpenAIErrorEnvelope.d.ts +33 -0
- package/dist/esm/models/OpenAIErrorEnvelope.js +44 -0
- package/dist/esm/models/OpenAIErrorEnvelopeError.d.ts +50 -0
- package/dist/esm/models/OpenAIErrorEnvelopeError.js +53 -0
- package/dist/esm/models/Operation.d.ts +107 -0
- package/dist/esm/models/Operation.js +86 -0
- package/dist/esm/models/OperationError.d.ts +38 -0
- package/dist/esm/models/OperationError.js +43 -0
- package/dist/esm/models/OperationResult.d.ts +44 -0
- package/dist/esm/models/OperationResult.js +45 -0
- package/dist/esm/models/PeakWindow.d.ts +38 -0
- package/dist/esm/models/PeakWindow.js +47 -0
- package/dist/esm/models/Problem.d.ts +87 -0
- package/dist/esm/models/Problem.js +87 -0
- package/dist/esm/models/SpendingLimit.d.ts +101 -0
- package/dist/esm/models/SpendingLimit.js +85 -0
- package/dist/esm/models/StreamOptions.d.ts +32 -0
- package/dist/esm/models/StreamOptions.js +41 -0
- package/dist/esm/models/Subscription.d.ts +78 -0
- package/dist/esm/models/Subscription.js +68 -0
- package/dist/esm/models/SubscriptionCheckoutRequest.d.ts +45 -0
- package/dist/esm/models/SubscriptionCheckoutRequest.js +45 -0
- package/dist/esm/models/SubscriptionCheckoutSession.d.ts +45 -0
- package/dist/esm/models/SubscriptionCheckoutSession.js +52 -0
- package/dist/esm/models/SubscriptionPlan.d.ts +46 -0
- package/dist/esm/models/SubscriptionPlan.js +50 -0
- package/dist/esm/models/SubscriptionPortalRequest.d.ts +32 -0
- package/dist/esm/models/SubscriptionPortalRequest.js +41 -0
- package/dist/esm/models/SubscriptionPortalSession.d.ts +32 -0
- package/dist/esm/models/SubscriptionPortalSession.js +43 -0
- package/dist/esm/models/SubscriptionPrice.d.ts +53 -0
- package/dist/esm/models/SubscriptionPrice.js +55 -0
- package/dist/esm/models/SubscriptionQuota.d.ts +60 -0
- package/dist/esm/models/SubscriptionQuota.js +59 -0
- package/dist/esm/models/SubscriptionUsage.d.ts +65 -0
- package/dist/esm/models/SubscriptionUsage.js +63 -0
- package/dist/esm/models/UpdateSpendingLimitRequest.d.ts +59 -0
- package/dist/esm/models/UpdateSpendingLimitRequest.js +57 -0
- package/dist/esm/models/Usage.d.ts +44 -0
- package/dist/esm/models/Usage.js +51 -0
- package/dist/esm/models/UsageBucket.d.ts +56 -0
- package/dist/esm/models/UsageBucket.js +55 -0
- package/dist/esm/models/UsagePage.d.ts +39 -0
- package/dist/esm/models/UsagePage.js +48 -0
- package/dist/esm/models/VideoCreateRequest.d.ts +50 -0
- package/dist/esm/models/VideoCreateRequest.js +51 -0
- package/dist/esm/models/VideoJob.d.ts +117 -0
- package/dist/esm/models/VideoJob.js +94 -0
- package/dist/esm/models/VideoList.d.ts +52 -0
- package/dist/esm/models/VideoList.js +60 -0
- package/dist/esm/models/WebhookEndpoint.d.ts +74 -0
- package/dist/esm/models/WebhookEndpoint.js +72 -0
- package/dist/esm/models/WebhookEndpointPage.d.ts +39 -0
- package/dist/esm/models/WebhookEndpointPage.js +48 -0
- package/dist/esm/models/index.d.ts +52 -0
- package/dist/esm/models/index.js +54 -0
- package/dist/esm/runtime.d.ts +185 -0
- package/dist/esm/runtime.js +354 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/Balance.d.ts +65 -0
- package/dist/models/Balance.js +70 -0
- package/dist/models/ChatChoice.d.ts +55 -0
- package/dist/models/ChatChoice.js +63 -0
- package/dist/models/ChatCompletionRequest.d.ts +64 -0
- package/dist/models/ChatCompletionRequest.js +64 -0
- package/dist/models/ChatCompletionResponse.d.ts +71 -0
- package/dist/models/ChatCompletionResponse.js +81 -0
- package/dist/models/ChatMessage.d.ts +47 -0
- package/dist/models/ChatMessage.js +63 -0
- package/dist/models/CreateCryptoDepositRequest.d.ts +64 -0
- package/dist/models/CreateCryptoDepositRequest.js +76 -0
- package/dist/models/CreateWebhookEndpointRequest.d.ts +50 -0
- package/dist/models/CreateWebhookEndpointRequest.js +66 -0
- package/dist/models/CryptoDeposit.d.ts +114 -0
- package/dist/models/CryptoDeposit.js +98 -0
- package/dist/models/Embedding.d.ts +51 -0
- package/dist/models/Embedding.js +67 -0
- package/dist/models/EmbeddingsRequest.d.ts +64 -0
- package/dist/models/EmbeddingsRequest.js +68 -0
- package/dist/models/EmbeddingsRequestInput.d.ts +21 -0
- package/dist/models/EmbeddingsRequestInput.js +53 -0
- package/dist/models/EmbeddingsResponse.d.ts +59 -0
- package/dist/models/EmbeddingsResponse.js +73 -0
- package/dist/models/EmbeddingsUsage.d.ts +38 -0
- package/dist/models/EmbeddingsUsage.js +54 -0
- package/dist/models/GetHealth200Response.d.ts +39 -0
- package/dist/models/GetHealth200Response.js +55 -0
- package/dist/models/ImagesGenerationsRequest.d.ts +63 -0
- package/dist/models/ImagesGenerationsRequest.js +67 -0
- package/dist/models/ImagesResponse.d.ts +46 -0
- package/dist/models/ImagesResponse.js +60 -0
- package/dist/models/ImagesResponseDataInner.d.ts +32 -0
- package/dist/models/ImagesResponseDataInner.js +50 -0
- package/dist/models/ImagesResponseUsage.d.ts +32 -0
- package/dist/models/ImagesResponseUsage.js +50 -0
- package/dist/models/InferencePreflight.d.ts +92 -0
- package/dist/models/InferencePreflight.js +94 -0
- package/dist/models/ListDeposits200Response.d.ts +39 -0
- package/dist/models/ListDeposits200Response.js +55 -0
- package/dist/models/Model.d.ts +152 -0
- package/dist/models/Model.js +118 -0
- package/dist/models/ModelList.d.ts +46 -0
- package/dist/models/ModelList.js +64 -0
- package/dist/models/ModelParametersInner.d.ts +72 -0
- package/dist/models/ModelParametersInner.js +72 -0
- package/dist/models/ModelPricing.d.ts +126 -0
- package/dist/models/ModelPricing.js +86 -0
- package/dist/models/ModelRate.d.ts +62 -0
- package/dist/models/ModelRate.js +58 -0
- package/dist/models/OpenAIErrorEnvelope.d.ts +33 -0
- package/dist/models/OpenAIErrorEnvelope.js +51 -0
- package/dist/models/OpenAIErrorEnvelopeError.d.ts +50 -0
- package/dist/models/OpenAIErrorEnvelopeError.js +60 -0
- package/dist/models/Operation.d.ts +107 -0
- package/dist/models/Operation.js +94 -0
- package/dist/models/OperationError.d.ts +38 -0
- package/dist/models/OperationError.js +50 -0
- package/dist/models/OperationResult.d.ts +44 -0
- package/dist/models/OperationResult.js +52 -0
- package/dist/models/PeakWindow.d.ts +38 -0
- package/dist/models/PeakWindow.js +54 -0
- package/dist/models/Problem.d.ts +87 -0
- package/dist/models/Problem.js +95 -0
- package/dist/models/SpendingLimit.d.ts +101 -0
- package/dist/models/SpendingLimit.js +93 -0
- package/dist/models/StreamOptions.d.ts +32 -0
- package/dist/models/StreamOptions.js +48 -0
- package/dist/models/Subscription.d.ts +78 -0
- package/dist/models/Subscription.js +75 -0
- package/dist/models/SubscriptionCheckoutRequest.d.ts +45 -0
- package/dist/models/SubscriptionCheckoutRequest.js +52 -0
- package/dist/models/SubscriptionCheckoutSession.d.ts +45 -0
- package/dist/models/SubscriptionCheckoutSession.js +59 -0
- package/dist/models/SubscriptionPlan.d.ts +46 -0
- package/dist/models/SubscriptionPlan.js +57 -0
- package/dist/models/SubscriptionPortalRequest.d.ts +32 -0
- package/dist/models/SubscriptionPortalRequest.js +48 -0
- package/dist/models/SubscriptionPortalSession.d.ts +32 -0
- package/dist/models/SubscriptionPortalSession.js +50 -0
- package/dist/models/SubscriptionPrice.d.ts +53 -0
- package/dist/models/SubscriptionPrice.js +62 -0
- package/dist/models/SubscriptionQuota.d.ts +60 -0
- package/dist/models/SubscriptionQuota.js +66 -0
- package/dist/models/SubscriptionUsage.d.ts +65 -0
- package/dist/models/SubscriptionUsage.js +70 -0
- package/dist/models/UpdateSpendingLimitRequest.d.ts +59 -0
- package/dist/models/UpdateSpendingLimitRequest.js +65 -0
- package/dist/models/Usage.d.ts +44 -0
- package/dist/models/Usage.js +58 -0
- package/dist/models/UsageBucket.d.ts +56 -0
- package/dist/models/UsageBucket.js +62 -0
- package/dist/models/UsagePage.d.ts +39 -0
- package/dist/models/UsagePage.js +55 -0
- package/dist/models/VideoCreateRequest.d.ts +50 -0
- package/dist/models/VideoCreateRequest.js +58 -0
- package/dist/models/VideoJob.d.ts +117 -0
- package/dist/models/VideoJob.js +102 -0
- package/dist/models/VideoList.d.ts +52 -0
- package/dist/models/VideoList.js +68 -0
- package/dist/models/WebhookEndpoint.d.ts +74 -0
- package/dist/models/WebhookEndpoint.js +80 -0
- package/dist/models/WebhookEndpointPage.d.ts +39 -0
- package/dist/models/WebhookEndpointPage.js +55 -0
- package/dist/models/index.d.ts +52 -0
- package/dist/models/index.js +70 -0
- package/dist/runtime.d.ts +185 -0
- package/dist/runtime.js +371 -0
- package/docs/Balance.md +45 -0
- package/docs/BillingApi.md +657 -0
- package/docs/ChatChoice.md +38 -0
- package/docs/ChatCompletionRequest.md +44 -0
- package/docs/ChatCompletionResponse.md +44 -0
- package/docs/ChatMessage.md +36 -0
- package/docs/CreateCryptoDepositRequest.md +38 -0
- package/docs/CreateWebhookEndpointRequest.md +36 -0
- package/docs/CryptoDeposit.md +55 -0
- package/docs/Embedding.md +38 -0
- package/docs/EmbeddingsRequest.md +42 -0
- package/docs/EmbeddingsRequestInput.md +33 -0
- package/docs/EmbeddingsResponse.md +40 -0
- package/docs/EmbeddingsUsage.md +37 -0
- package/docs/GetHealth200Response.md +34 -0
- package/docs/ImagesGenerationsRequest.md +42 -0
- package/docs/ImagesResponse.md +38 -0
- package/docs/ImagesResponseDataInner.md +34 -0
- package/docs/ImagesResponseUsage.md +34 -0
- package/docs/InferenceApi.md +861 -0
- package/docs/InferencePreflight.md +47 -0
- package/docs/ListDeposits200Response.md +36 -0
- package/docs/MetaApi.md +126 -0
- package/docs/Model.md +64 -0
- package/docs/ModelList.md +36 -0
- package/docs/ModelParametersInner.md +44 -0
- package/docs/ModelPricing.md +62 -0
- package/docs/ModelRate.md +45 -0
- package/docs/OpenAIErrorEnvelope.md +34 -0
- package/docs/OpenAIErrorEnvelopeError.md +40 -0
- package/docs/Operation.md +52 -0
- package/docs/OperationError.md +36 -0
- package/docs/OperationResult.md +39 -0
- package/docs/OperationsApi.md +80 -0
- package/docs/PeakWindow.md +37 -0
- package/docs/Problem.md +44 -0
- package/docs/SpendingLimit.md +54 -0
- package/docs/StreamOptions.md +34 -0
- package/docs/Subscription.md +49 -0
- package/docs/SubscriptionCheckoutRequest.md +39 -0
- package/docs/SubscriptionCheckoutSession.md +38 -0
- package/docs/SubscriptionPlan.md +39 -0
- package/docs/SubscriptionPortalRequest.md +35 -0
- package/docs/SubscriptionPortalSession.md +34 -0
- package/docs/SubscriptionPrice.md +41 -0
- package/docs/SubscriptionQuota.md +43 -0
- package/docs/SubscriptionUsage.md +45 -0
- package/docs/UpdateSpendingLimitRequest.md +40 -0
- package/docs/Usage.md +38 -0
- package/docs/UsageApi.md +95 -0
- package/docs/UsageBucket.md +42 -0
- package/docs/UsagePage.md +36 -0
- package/docs/VideoCreateRequest.md +40 -0
- package/docs/VideoJob.md +56 -0
- package/docs/VideoList.md +38 -0
- package/docs/WebhookEndpoint.md +44 -0
- package/docs/WebhookEndpointPage.md +36 -0
- package/docs/WebhooksApi.md +302 -0
- package/package.json +16 -7
- package/src/apis/BillingApi.ts +559 -0
- package/src/apis/InferenceApi.ts +753 -0
- package/src/apis/MetaApi.ts +103 -0
- package/src/apis/OperationsApi.ts +89 -0
- package/src/apis/UsageApi.ts +129 -0
- package/src/apis/WebhooksApi.ts +277 -0
- package/src/apis/index.ts +8 -0
- package/src/index.ts +5 -0
- package/src/models/Balance.ts +114 -0
- package/src/models/ChatChoice.ts +102 -0
- package/src/models/ChatCompletionRequest.ts +122 -0
- package/src/models/ChatCompletionResponse.ts +138 -0
- package/src/models/ChatMessage.ts +87 -0
- package/src/models/CreateCryptoDepositRequest.ts +108 -0
- package/src/models/CreateWebhookEndpointRequest.ts +90 -0
- package/src/models/CryptoDeposit.ts +177 -0
- package/src/models/Embedding.ts +96 -0
- package/src/models/EmbeddingsRequest.ts +117 -0
- package/src/models/EmbeddingsRequestInput.ts +59 -0
- package/src/models/EmbeddingsResponse.ts +120 -0
- package/src/models/EmbeddingsUsage.ts +75 -0
- package/src/models/GetHealth200Response.ts +75 -0
- package/src/models/ImagesGenerationsRequest.ts +109 -0
- package/src/models/ImagesResponse.ts +99 -0
- package/src/models/ImagesResponseDataInner.ts +66 -0
- package/src/models/ImagesResponseUsage.ts +66 -0
- package/src/models/InferencePreflight.ts +147 -0
- package/src/models/ListDeposits200Response.ts +83 -0
- package/src/models/Model.ts +241 -0
- package/src/models/ModelList.ts +95 -0
- package/src/models/ModelParametersInner.ts +120 -0
- package/src/models/ModelPricing.ts +203 -0
- package/src/models/ModelRate.ts +105 -0
- package/src/models/OpenAIErrorEnvelope.ts +74 -0
- package/src/models/OpenAIErrorEnvelopeError.ts +92 -0
- package/src/models/Operation.ts +179 -0
- package/src/models/OperationError.ts +73 -0
- package/src/models/OperationResult.ts +81 -0
- package/src/models/PeakWindow.ts +75 -0
- package/src/models/Problem.ts +139 -0
- package/src/models/SpendingLimit.ts +165 -0
- package/src/models/StreamOptions.ts +65 -0
- package/src/models/Subscription.ts +149 -0
- package/src/models/SubscriptionCheckoutRequest.ts +82 -0
- package/src/models/SubscriptionCheckoutSession.ts +92 -0
- package/src/models/SubscriptionPlan.ts +92 -0
- package/src/models/SubscriptionPortalRequest.ts +65 -0
- package/src/models/SubscriptionPortalSession.ts +66 -0
- package/src/models/SubscriptionPrice.ts +96 -0
- package/src/models/SubscriptionQuota.ts +106 -0
- package/src/models/SubscriptionUsage.ts +114 -0
- package/src/models/UpdateSpendingLimitRequest.ts +102 -0
- package/src/models/Usage.ts +84 -0
- package/src/models/UsageBucket.ts +100 -0
- package/src/models/UsagePage.ts +83 -0
- package/src/models/VideoCreateRequest.ts +91 -0
- package/src/models/VideoJob.ts +184 -0
- package/src/models/VideoList.ts +104 -0
- package/src/models/WebhookEndpoint.ts +125 -0
- package/src/models/WebhookEndpointPage.ts +83 -0
- package/src/models/index.ts +54 -0
- package/src/runtime.ts +454 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,582 @@
|
|
|
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.
|
|
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.ListModelsModalityEnum = exports.InferenceApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const ChatCompletionRequest_1 = require("../models/ChatCompletionRequest");
|
|
28
|
+
const ChatCompletionResponse_1 = require("../models/ChatCompletionResponse");
|
|
29
|
+
const EmbeddingsRequest_1 = require("../models/EmbeddingsRequest");
|
|
30
|
+
const EmbeddingsResponse_1 = require("../models/EmbeddingsResponse");
|
|
31
|
+
const ImagesGenerationsRequest_1 = require("../models/ImagesGenerationsRequest");
|
|
32
|
+
const ImagesResponse_1 = require("../models/ImagesResponse");
|
|
33
|
+
const InferencePreflight_1 = require("../models/InferencePreflight");
|
|
34
|
+
const Model_1 = require("../models/Model");
|
|
35
|
+
const ModelList_1 = require("../models/ModelList");
|
|
36
|
+
const VideoCreateRequest_1 = require("../models/VideoCreateRequest");
|
|
37
|
+
const VideoJob_1 = require("../models/VideoJob");
|
|
38
|
+
const VideoList_1 = require("../models/VideoList");
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
class InferenceApi extends runtime.BaseAPI {
|
|
43
|
+
/**
|
|
44
|
+
* Creates request options for cancelVideo without sending the request
|
|
45
|
+
*/
|
|
46
|
+
cancelVideoRequestOpts(requestParameters) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
if (requestParameters['id'] == null) {
|
|
49
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling cancelVideo().');
|
|
50
|
+
}
|
|
51
|
+
const queryParameters = {};
|
|
52
|
+
const headerParameters = {};
|
|
53
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
54
|
+
const token = this.configuration.accessToken;
|
|
55
|
+
const tokenString = yield token("bearerAuth", []);
|
|
56
|
+
if (tokenString) {
|
|
57
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
let urlPath = `/videos/{id}/cancel`;
|
|
61
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
62
|
+
return {
|
|
63
|
+
path: urlPath,
|
|
64
|
+
method: 'POST',
|
|
65
|
+
headers: headerParameters,
|
|
66
|
+
query: queryParameters,
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Cancel a video generation job
|
|
72
|
+
*/
|
|
73
|
+
cancelVideoRaw(requestParameters, initOverrides) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
const requestOptions = yield this.cancelVideoRequestOpts(requestParameters);
|
|
76
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
77
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, VideoJob_1.VideoJobFromJSON)(jsonValue));
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Cancel a video generation job
|
|
82
|
+
*/
|
|
83
|
+
cancelVideo(requestParameters, initOverrides) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
const response = yield this.cancelVideoRaw(requestParameters, initOverrides);
|
|
86
|
+
return yield response.value();
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Creates request options for createChatCompletion without sending the request
|
|
91
|
+
*/
|
|
92
|
+
createChatCompletionRequestOpts(requestParameters) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
if (requestParameters['chatCompletionRequest'] == null) {
|
|
95
|
+
throw new runtime.RequiredError('chatCompletionRequest', 'Required parameter "chatCompletionRequest" was null or undefined when calling createChatCompletion().');
|
|
96
|
+
}
|
|
97
|
+
const queryParameters = {};
|
|
98
|
+
const headerParameters = {};
|
|
99
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
100
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
101
|
+
const token = this.configuration.accessToken;
|
|
102
|
+
const tokenString = yield token("bearerAuth", []);
|
|
103
|
+
if (tokenString) {
|
|
104
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
let urlPath = `/chat/completions`;
|
|
108
|
+
return {
|
|
109
|
+
path: urlPath,
|
|
110
|
+
method: 'POST',
|
|
111
|
+
headers: headerParameters,
|
|
112
|
+
query: queryParameters,
|
|
113
|
+
body: (0, ChatCompletionRequest_1.ChatCompletionRequestToJSON)(requestParameters['chatCompletionRequest']),
|
|
114
|
+
};
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Create a chat completion (OpenAI-compatible)
|
|
119
|
+
*/
|
|
120
|
+
createChatCompletionRaw(requestParameters, initOverrides) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
const requestOptions = yield this.createChatCompletionRequestOpts(requestParameters);
|
|
123
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
124
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, ChatCompletionResponse_1.ChatCompletionResponseFromJSON)(jsonValue));
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Create a chat completion (OpenAI-compatible)
|
|
129
|
+
*/
|
|
130
|
+
createChatCompletion(requestParameters, initOverrides) {
|
|
131
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
+
const response = yield this.createChatCompletionRaw(requestParameters, initOverrides);
|
|
133
|
+
return yield response.value();
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Creates request options for createEmbeddings without sending the request
|
|
138
|
+
*/
|
|
139
|
+
createEmbeddingsRequestOpts(requestParameters) {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
if (requestParameters['embeddingsRequest'] == null) {
|
|
142
|
+
throw new runtime.RequiredError('embeddingsRequest', 'Required parameter "embeddingsRequest" was null or undefined when calling createEmbeddings().');
|
|
143
|
+
}
|
|
144
|
+
const queryParameters = {};
|
|
145
|
+
const headerParameters = {};
|
|
146
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
147
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
148
|
+
const token = this.configuration.accessToken;
|
|
149
|
+
const tokenString = yield token("bearerAuth", []);
|
|
150
|
+
if (tokenString) {
|
|
151
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
let urlPath = `/embeddings`;
|
|
155
|
+
return {
|
|
156
|
+
path: urlPath,
|
|
157
|
+
method: 'POST',
|
|
158
|
+
headers: headerParameters,
|
|
159
|
+
query: queryParameters,
|
|
160
|
+
body: (0, EmbeddingsRequest_1.EmbeddingsRequestToJSON)(requestParameters['embeddingsRequest']),
|
|
161
|
+
};
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Synchronous text embeddings. Accepts a single string or an array of up to 2048 strings, bounded so the response stays under 64 MiB (about 680 inputs at 4096 dimensions; fewer at a larger `dimensions` value) — over-limit requests are rejected with 400 before any processing. Returns one float vector per input, in request order. Billed on the upstream\'s reported prompt tokens at the model\'s listed input rate, rounded up to the next whole cent per request; an embeddings call emits no completion tokens, so `usage` carries `prompt_tokens` and `total_tokens` only. `encoding_format` accepts only `float` — a value of `base64` is rejected with `unsupported_parameter`. A chat model id on this route returns 404 `model_not_found`: the id is valid, but not on this surface.
|
|
166
|
+
* Create embeddings (OpenAI-compatible)
|
|
167
|
+
*/
|
|
168
|
+
createEmbeddingsRaw(requestParameters, initOverrides) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
const requestOptions = yield this.createEmbeddingsRequestOpts(requestParameters);
|
|
171
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
172
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, EmbeddingsResponse_1.EmbeddingsResponseFromJSON)(jsonValue));
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Synchronous text embeddings. Accepts a single string or an array of up to 2048 strings, bounded so the response stays under 64 MiB (about 680 inputs at 4096 dimensions; fewer at a larger `dimensions` value) — over-limit requests are rejected with 400 before any processing. Returns one float vector per input, in request order. Billed on the upstream\'s reported prompt tokens at the model\'s listed input rate, rounded up to the next whole cent per request; an embeddings call emits no completion tokens, so `usage` carries `prompt_tokens` and `total_tokens` only. `encoding_format` accepts only `float` — a value of `base64` is rejected with `unsupported_parameter`. A chat model id on this route returns 404 `model_not_found`: the id is valid, but not on this surface.
|
|
177
|
+
* Create embeddings (OpenAI-compatible)
|
|
178
|
+
*/
|
|
179
|
+
createEmbeddings(requestParameters, initOverrides) {
|
|
180
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
+
const response = yield this.createEmbeddingsRaw(requestParameters, initOverrides);
|
|
182
|
+
return yield response.value();
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Creates request options for createImage without sending the request
|
|
187
|
+
*/
|
|
188
|
+
createImageRequestOpts(requestParameters) {
|
|
189
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
190
|
+
if (requestParameters['imagesGenerationsRequest'] == null) {
|
|
191
|
+
throw new runtime.RequiredError('imagesGenerationsRequest', 'Required parameter "imagesGenerationsRequest" was null or undefined when calling createImage().');
|
|
192
|
+
}
|
|
193
|
+
const queryParameters = {};
|
|
194
|
+
const headerParameters = {};
|
|
195
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
196
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
197
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
198
|
+
}
|
|
199
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
200
|
+
const token = this.configuration.accessToken;
|
|
201
|
+
const tokenString = yield token("bearerAuth", []);
|
|
202
|
+
if (tokenString) {
|
|
203
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
let urlPath = `/images/generations`;
|
|
207
|
+
return {
|
|
208
|
+
path: urlPath,
|
|
209
|
+
method: 'POST',
|
|
210
|
+
headers: headerParameters,
|
|
211
|
+
query: queryParameters,
|
|
212
|
+
body: (0, ImagesGenerationsRequest_1.ImagesGenerationsRequestToJSON)(requestParameters['imagesGenerationsRequest']),
|
|
213
|
+
};
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Synchronous text-to-image generation. Returns base64-encoded images only (`response_format` is restricted to `b64_json`); a value of `url` is rejected with `invalid_request_error` until S3-backed URL delivery lands. Pass an `Idempotency-Key` header to make a retried request replay the original response without a second charge.
|
|
218
|
+
* Create image (OpenAI-compatible)
|
|
219
|
+
*/
|
|
220
|
+
createImageRaw(requestParameters, initOverrides) {
|
|
221
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
222
|
+
const requestOptions = yield this.createImageRequestOpts(requestParameters);
|
|
223
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
224
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, ImagesResponse_1.ImagesResponseFromJSON)(jsonValue));
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Synchronous text-to-image generation. Returns base64-encoded images only (`response_format` is restricted to `b64_json`); a value of `url` is rejected with `invalid_request_error` until S3-backed URL delivery lands. Pass an `Idempotency-Key` header to make a retried request replay the original response without a second charge.
|
|
229
|
+
* Create image (OpenAI-compatible)
|
|
230
|
+
*/
|
|
231
|
+
createImage(requestParameters, initOverrides) {
|
|
232
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
233
|
+
const response = yield this.createImageRaw(requestParameters, initOverrides);
|
|
234
|
+
return yield response.value();
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Creates request options for createVideo without sending the request
|
|
239
|
+
*/
|
|
240
|
+
createVideoRequestOpts(requestParameters) {
|
|
241
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
242
|
+
if (requestParameters['videoCreateRequest'] == null) {
|
|
243
|
+
throw new runtime.RequiredError('videoCreateRequest', 'Required parameter "videoCreateRequest" was null or undefined when calling createVideo().');
|
|
244
|
+
}
|
|
245
|
+
const queryParameters = {};
|
|
246
|
+
const headerParameters = {};
|
|
247
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
248
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
249
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
250
|
+
}
|
|
251
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
252
|
+
const token = this.configuration.accessToken;
|
|
253
|
+
const tokenString = yield token("bearerAuth", []);
|
|
254
|
+
if (tokenString) {
|
|
255
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
let urlPath = `/videos`;
|
|
259
|
+
return {
|
|
260
|
+
path: urlPath,
|
|
261
|
+
method: 'POST',
|
|
262
|
+
headers: headerParameters,
|
|
263
|
+
query: queryParameters,
|
|
264
|
+
body: (0, VideoCreateRequest_1.VideoCreateRequestToJSON)(requestParameters['videoCreateRequest']),
|
|
265
|
+
};
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Submit an asynchronous text-to-video generation job. Returns a job object with status `queued`; poll GET /videos/{id} until `completed`, then stream the result from GET /videos/{id}/content. Pass an `Idempotency-Key` header to make a retried request replay the original response without a second charge.
|
|
270
|
+
* Create a video generation job (async)
|
|
271
|
+
*/
|
|
272
|
+
createVideoRaw(requestParameters, initOverrides) {
|
|
273
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
274
|
+
const requestOptions = yield this.createVideoRequestOpts(requestParameters);
|
|
275
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
276
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, VideoJob_1.VideoJobFromJSON)(jsonValue));
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Submit an asynchronous text-to-video generation job. Returns a job object with status `queued`; poll GET /videos/{id} until `completed`, then stream the result from GET /videos/{id}/content. Pass an `Idempotency-Key` header to make a retried request replay the original response without a second charge.
|
|
281
|
+
* Create a video generation job (async)
|
|
282
|
+
*/
|
|
283
|
+
createVideo(requestParameters, initOverrides) {
|
|
284
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
285
|
+
const response = yield this.createVideoRaw(requestParameters, initOverrides);
|
|
286
|
+
return yield response.value();
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Creates request options for getModel without sending the request
|
|
291
|
+
*/
|
|
292
|
+
getModelRequestOpts(requestParameters) {
|
|
293
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
294
|
+
if (requestParameters['id'] == null) {
|
|
295
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getModel().');
|
|
296
|
+
}
|
|
297
|
+
const queryParameters = {};
|
|
298
|
+
const headerParameters = {};
|
|
299
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
300
|
+
const token = this.configuration.accessToken;
|
|
301
|
+
const tokenString = yield token("bearerAuth", []);
|
|
302
|
+
if (tokenString) {
|
|
303
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
let urlPath = `/models/{id}`;
|
|
307
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
308
|
+
return {
|
|
309
|
+
path: urlPath,
|
|
310
|
+
method: 'GET',
|
|
311
|
+
headers: headerParameters,
|
|
312
|
+
query: queryParameters,
|
|
313
|
+
};
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Get a specific model (OpenAI-compatible)
|
|
318
|
+
*/
|
|
319
|
+
getModelRaw(requestParameters, initOverrides) {
|
|
320
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
321
|
+
const requestOptions = yield this.getModelRequestOpts(requestParameters);
|
|
322
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
323
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, Model_1.ModelFromJSON)(jsonValue));
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Get a specific model (OpenAI-compatible)
|
|
328
|
+
*/
|
|
329
|
+
getModel(requestParameters, initOverrides) {
|
|
330
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
331
|
+
const response = yield this.getModelRaw(requestParameters, initOverrides);
|
|
332
|
+
return yield response.value();
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Creates request options for getVideo without sending the request
|
|
337
|
+
*/
|
|
338
|
+
getVideoRequestOpts(requestParameters) {
|
|
339
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
340
|
+
if (requestParameters['id'] == null) {
|
|
341
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getVideo().');
|
|
342
|
+
}
|
|
343
|
+
const queryParameters = {};
|
|
344
|
+
const headerParameters = {};
|
|
345
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
346
|
+
const token = this.configuration.accessToken;
|
|
347
|
+
const tokenString = yield token("bearerAuth", []);
|
|
348
|
+
if (tokenString) {
|
|
349
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
let urlPath = `/videos/{id}`;
|
|
353
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
354
|
+
return {
|
|
355
|
+
path: urlPath,
|
|
356
|
+
method: 'GET',
|
|
357
|
+
headers: headerParameters,
|
|
358
|
+
query: queryParameters,
|
|
359
|
+
};
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Get a video generation job
|
|
364
|
+
*/
|
|
365
|
+
getVideoRaw(requestParameters, initOverrides) {
|
|
366
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
367
|
+
const requestOptions = yield this.getVideoRequestOpts(requestParameters);
|
|
368
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
369
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, VideoJob_1.VideoJobFromJSON)(jsonValue));
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Get a video generation job
|
|
374
|
+
*/
|
|
375
|
+
getVideo(requestParameters, initOverrides) {
|
|
376
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
377
|
+
const response = yield this.getVideoRaw(requestParameters, initOverrides);
|
|
378
|
+
return yield response.value();
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Creates request options for getVideoContent without sending the request
|
|
383
|
+
*/
|
|
384
|
+
getVideoContentRequestOpts(requestParameters) {
|
|
385
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
386
|
+
if (requestParameters['id'] == null) {
|
|
387
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getVideoContent().');
|
|
388
|
+
}
|
|
389
|
+
const queryParameters = {};
|
|
390
|
+
const headerParameters = {};
|
|
391
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
392
|
+
const token = this.configuration.accessToken;
|
|
393
|
+
const tokenString = yield token("bearerAuth", []);
|
|
394
|
+
if (tokenString) {
|
|
395
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
let urlPath = `/videos/{id}/content`;
|
|
399
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
400
|
+
return {
|
|
401
|
+
path: urlPath,
|
|
402
|
+
method: 'GET',
|
|
403
|
+
headers: headerParameters,
|
|
404
|
+
query: queryParameters,
|
|
405
|
+
};
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Streams the generated MP4 for a completed job. Returns 410 Gone once the artifact has expired (24h retention).
|
|
410
|
+
* Download a completed video artifact
|
|
411
|
+
*/
|
|
412
|
+
getVideoContentRaw(requestParameters, initOverrides) {
|
|
413
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
414
|
+
const requestOptions = yield this.getVideoContentRequestOpts(requestParameters);
|
|
415
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
416
|
+
return new runtime.BlobApiResponse(response);
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Streams the generated MP4 for a completed job. Returns 410 Gone once the artifact has expired (24h retention).
|
|
421
|
+
* Download a completed video artifact
|
|
422
|
+
*/
|
|
423
|
+
getVideoContent(requestParameters, initOverrides) {
|
|
424
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
425
|
+
const response = yield this.getVideoContentRaw(requestParameters, initOverrides);
|
|
426
|
+
return yield response.value();
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Creates request options for inferencePreflight without sending the request
|
|
431
|
+
*/
|
|
432
|
+
inferencePreflightRequestOpts(requestParameters) {
|
|
433
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
434
|
+
if (requestParameters['model'] == null) {
|
|
435
|
+
throw new runtime.RequiredError('model', 'Required parameter "model" was null or undefined when calling inferencePreflight().');
|
|
436
|
+
}
|
|
437
|
+
const queryParameters = {};
|
|
438
|
+
if (requestParameters['model'] != null) {
|
|
439
|
+
queryParameters['model'] = requestParameters['model'];
|
|
440
|
+
}
|
|
441
|
+
const headerParameters = {};
|
|
442
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
443
|
+
const token = this.configuration.accessToken;
|
|
444
|
+
const tokenString = yield token("bearerAuth", []);
|
|
445
|
+
if (tokenString) {
|
|
446
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
let urlPath = `/inference/preflight`;
|
|
450
|
+
return {
|
|
451
|
+
path: urlPath,
|
|
452
|
+
method: 'GET',
|
|
453
|
+
headers: headerParameters,
|
|
454
|
+
query: queryParameters,
|
|
455
|
+
};
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Answers \"what happens if I call this model right now?\" before the call is made: whether the plan covers the model, whether the organization is subscribed, and whether there is credit to pay if it is not covered. Requires the `serverless:read` scope. Nothing is sent, counted, charged, or reserved. The verdict is computed from the state of the SAME gates that judge the real request — plan coverage, subscription entitlement, remaining plan quota, credit balance and self-set spending caps — so the advice cannot drift from enforcement. It is deliberately NOT a dry run: no per-request cost estimate is quoted, because that figure changes with every prompt and quoting it would invite clients to cache it. The gates consulted depend on the model\'s MODALITY, because the endpoints do not all meet the same ones. Chat, embeddings and image requests meet the full gate (balance, then the organization\'s opt-in daily cap, then its monthly cap). Video creation meets only the balance check, so an organization past its own spending cap but holding credit is reported as fundable for video — which is what the video endpoint will in fact do. Predicting the strictest gate rather than the applicable one would make this endpoint refuse requests the API accepts. The same is true of the plan: video creation does not run the subscription gate, so `plan_covered` is false for a video model even if an operator has placed it on the plan\'s covered list. That is a deliberate divergence from the same-named field on `/v1/models`, which reports the platform\'s configuration. Here it means \"the plan covers this REQUEST\" — describing what will happen is the entire job of a preflight. One caveat on \"read-only\": resolving the balance creates the organization\'s balance row if it has never had one (idempotent, org-scoped, and the same row the first real request would create). Nothing else is written. The case this exists for is `warn` / `not_plan_covered`. A subscriber calling a model outside the plan IS served and IS charged pay-as-you-go, and nothing in the response to that request says so — the first signal used to be the invoice. `funded` is a boolean and never a figure. This route is on the inference read scope, so it must not disclose the organization\'s balance; use `/billing/balance` for the number. Failure posture is the opposite of the request gate\'s: any gate that cannot be read degrades the verdict toward `ok`, never toward `block`. A false `block` would stop a customer whose request would have succeeded, while a false `ok` costs them one honest error from the real call.
|
|
460
|
+
* Check whether a model request would be served, and at whose expense
|
|
461
|
+
*/
|
|
462
|
+
inferencePreflightRaw(requestParameters, initOverrides) {
|
|
463
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
464
|
+
const requestOptions = yield this.inferencePreflightRequestOpts(requestParameters);
|
|
465
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
466
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, InferencePreflight_1.InferencePreflightFromJSON)(jsonValue));
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Answers \"what happens if I call this model right now?\" before the call is made: whether the plan covers the model, whether the organization is subscribed, and whether there is credit to pay if it is not covered. Requires the `serverless:read` scope. Nothing is sent, counted, charged, or reserved. The verdict is computed from the state of the SAME gates that judge the real request — plan coverage, subscription entitlement, remaining plan quota, credit balance and self-set spending caps — so the advice cannot drift from enforcement. It is deliberately NOT a dry run: no per-request cost estimate is quoted, because that figure changes with every prompt and quoting it would invite clients to cache it. The gates consulted depend on the model\'s MODALITY, because the endpoints do not all meet the same ones. Chat, embeddings and image requests meet the full gate (balance, then the organization\'s opt-in daily cap, then its monthly cap). Video creation meets only the balance check, so an organization past its own spending cap but holding credit is reported as fundable for video — which is what the video endpoint will in fact do. Predicting the strictest gate rather than the applicable one would make this endpoint refuse requests the API accepts. The same is true of the plan: video creation does not run the subscription gate, so `plan_covered` is false for a video model even if an operator has placed it on the plan\'s covered list. That is a deliberate divergence from the same-named field on `/v1/models`, which reports the platform\'s configuration. Here it means \"the plan covers this REQUEST\" — describing what will happen is the entire job of a preflight. One caveat on \"read-only\": resolving the balance creates the organization\'s balance row if it has never had one (idempotent, org-scoped, and the same row the first real request would create). Nothing else is written. The case this exists for is `warn` / `not_plan_covered`. A subscriber calling a model outside the plan IS served and IS charged pay-as-you-go, and nothing in the response to that request says so — the first signal used to be the invoice. `funded` is a boolean and never a figure. This route is on the inference read scope, so it must not disclose the organization\'s balance; use `/billing/balance` for the number. Failure posture is the opposite of the request gate\'s: any gate that cannot be read degrades the verdict toward `ok`, never toward `block`. A false `block` would stop a customer whose request would have succeeded, while a false `ok` costs them one honest error from the real call.
|
|
471
|
+
* Check whether a model request would be served, and at whose expense
|
|
472
|
+
*/
|
|
473
|
+
inferencePreflight(requestParameters, initOverrides) {
|
|
474
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
475
|
+
const response = yield this.inferencePreflightRaw(requestParameters, initOverrides);
|
|
476
|
+
return yield response.value();
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Creates request options for listModels without sending the request
|
|
481
|
+
*/
|
|
482
|
+
listModelsRequestOpts(requestParameters) {
|
|
483
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
484
|
+
const queryParameters = {};
|
|
485
|
+
if (requestParameters['modality'] != null) {
|
|
486
|
+
queryParameters['modality'] = requestParameters['modality'];
|
|
487
|
+
}
|
|
488
|
+
const headerParameters = {};
|
|
489
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
490
|
+
const token = this.configuration.accessToken;
|
|
491
|
+
const tokenString = yield token("bearerAuth", []);
|
|
492
|
+
if (tokenString) {
|
|
493
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
let urlPath = `/models`;
|
|
497
|
+
return {
|
|
498
|
+
path: urlPath,
|
|
499
|
+
method: 'GET',
|
|
500
|
+
headers: headerParameters,
|
|
501
|
+
query: queryParameters,
|
|
502
|
+
};
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* List available models (OpenAI-compatible)
|
|
507
|
+
*/
|
|
508
|
+
listModelsRaw(requestParameters, initOverrides) {
|
|
509
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
510
|
+
const requestOptions = yield this.listModelsRequestOpts(requestParameters);
|
|
511
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
512
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, ModelList_1.ModelListFromJSON)(jsonValue));
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* List available models (OpenAI-compatible)
|
|
517
|
+
*/
|
|
518
|
+
listModels() {
|
|
519
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
520
|
+
const response = yield this.listModelsRaw(requestParameters, initOverrides);
|
|
521
|
+
return yield response.value();
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Creates request options for listVideos without sending the request
|
|
526
|
+
*/
|
|
527
|
+
listVideosRequestOpts(requestParameters) {
|
|
528
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
529
|
+
const queryParameters = {};
|
|
530
|
+
if (requestParameters['after'] != null) {
|
|
531
|
+
queryParameters['after'] = requestParameters['after'];
|
|
532
|
+
}
|
|
533
|
+
if (requestParameters['limit'] != null) {
|
|
534
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
535
|
+
}
|
|
536
|
+
const headerParameters = {};
|
|
537
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
538
|
+
const token = this.configuration.accessToken;
|
|
539
|
+
const tokenString = yield token("bearerAuth", []);
|
|
540
|
+
if (tokenString) {
|
|
541
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
let urlPath = `/videos`;
|
|
545
|
+
return {
|
|
546
|
+
path: urlPath,
|
|
547
|
+
method: 'GET',
|
|
548
|
+
headers: headerParameters,
|
|
549
|
+
query: queryParameters,
|
|
550
|
+
};
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* List video generation jobs
|
|
555
|
+
*/
|
|
556
|
+
listVideosRaw(requestParameters, initOverrides) {
|
|
557
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
558
|
+
const requestOptions = yield this.listVideosRequestOpts(requestParameters);
|
|
559
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
560
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, VideoList_1.VideoListFromJSON)(jsonValue));
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* List video generation jobs
|
|
565
|
+
*/
|
|
566
|
+
listVideos() {
|
|
567
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
568
|
+
const response = yield this.listVideosRaw(requestParameters, initOverrides);
|
|
569
|
+
return yield response.value();
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
exports.InferenceApi = InferenceApi;
|
|
574
|
+
/**
|
|
575
|
+
* @export
|
|
576
|
+
*/
|
|
577
|
+
exports.ListModelsModalityEnum = {
|
|
578
|
+
Chat: 'chat',
|
|
579
|
+
Image: 'image',
|
|
580
|
+
Video: 'video',
|
|
581
|
+
Embedding: 'embedding'
|
|
582
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
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.
|
|
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 GetHealth200Response } from '../models/GetHealth200Response';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export declare class MetaApi extends runtime.BaseAPI {
|
|
18
|
+
/**
|
|
19
|
+
* Creates request options for getHealth without sending the request
|
|
20
|
+
*/
|
|
21
|
+
getHealthRequestOpts(): Promise<runtime.RequestOpts>;
|
|
22
|
+
/**
|
|
23
|
+
* Liveness probe
|
|
24
|
+
*/
|
|
25
|
+
getHealthRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetHealth200Response>>;
|
|
26
|
+
/**
|
|
27
|
+
* Liveness probe
|
|
28
|
+
*/
|
|
29
|
+
getHealth(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetHealth200Response>;
|
|
30
|
+
/**
|
|
31
|
+
* Creates request options for getOpenApiSpec without sending the request
|
|
32
|
+
*/
|
|
33
|
+
getOpenApiSpecRequestOpts(): Promise<runtime.RequestOpts>;
|
|
34
|
+
/**
|
|
35
|
+
* The machine-readable specification of the PUBLISHED API surface — the same document the client SDKs are generated from. Endpoints marked `x-gpu-supply-paused` in the authoritative spec are absent from it while GPU supply is paused (D-28), so this response and the SDKs always describe the same surface.
|
|
36
|
+
* OpenAPI 3.1 specification
|
|
37
|
+
*/
|
|
38
|
+
getOpenApiSpecRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
|
|
39
|
+
/**
|
|
40
|
+
* The machine-readable specification of the PUBLISHED API surface — the same document the client SDKs are generated from. Endpoints marked `x-gpu-supply-paused` in the authoritative spec are absent from it while GPU supply is paused (D-28), so this response and the SDKs always describe the same surface.
|
|
41
|
+
* OpenAPI 3.1 specification
|
|
42
|
+
*/
|
|
43
|
+
getOpenApiSpec(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
44
|
+
}
|