@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,861 @@
|
|
|
1
|
+
# InferenceApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.deeprelay.ai/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**cancelVideo**](InferenceApi.md#cancelvideo) | **POST** /videos/{id}/cancel | Cancel a video generation job |
|
|
8
|
+
| [**createChatCompletion**](InferenceApi.md#createchatcompletion) | **POST** /chat/completions | Create a chat completion (OpenAI-compatible) |
|
|
9
|
+
| [**createEmbeddings**](InferenceApi.md#createembeddings) | **POST** /embeddings | Create embeddings (OpenAI-compatible) |
|
|
10
|
+
| [**createImage**](InferenceApi.md#createimage) | **POST** /images/generations | Create image (OpenAI-compatible) |
|
|
11
|
+
| [**createVideo**](InferenceApi.md#createvideo) | **POST** /videos | Create a video generation job (async) |
|
|
12
|
+
| [**getModel**](InferenceApi.md#getmodel) | **GET** /models/{id} | Get a specific model (OpenAI-compatible) |
|
|
13
|
+
| [**getVideo**](InferenceApi.md#getvideo) | **GET** /videos/{id} | Get a video generation job |
|
|
14
|
+
| [**getVideoContent**](InferenceApi.md#getvideocontent) | **GET** /videos/{id}/content | Download a completed video artifact |
|
|
15
|
+
| [**inferencePreflight**](InferenceApi.md#inferencepreflight) | **GET** /inference/preflight | Check whether a model request would be served, and at whose expense |
|
|
16
|
+
| [**listModels**](InferenceApi.md#listmodels) | **GET** /models | List available models (OpenAI-compatible) |
|
|
17
|
+
| [**listVideos**](InferenceApi.md#listvideos) | **GET** /videos | List video generation jobs |
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## cancelVideo
|
|
22
|
+
|
|
23
|
+
> VideoJob cancelVideo(id)
|
|
24
|
+
|
|
25
|
+
Cancel a video generation job
|
|
26
|
+
|
|
27
|
+
### Example
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import {
|
|
31
|
+
Configuration,
|
|
32
|
+
InferenceApi,
|
|
33
|
+
} from '@deeprelay/sdk';
|
|
34
|
+
import type { CancelVideoRequest } from '@deeprelay/sdk';
|
|
35
|
+
|
|
36
|
+
async function example() {
|
|
37
|
+
console.log("🚀 Testing @deeprelay/sdk SDK...");
|
|
38
|
+
const config = new Configuration({
|
|
39
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
40
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
41
|
+
});
|
|
42
|
+
const api = new InferenceApi(config);
|
|
43
|
+
|
|
44
|
+
const body = {
|
|
45
|
+
// string
|
|
46
|
+
id: id_example,
|
|
47
|
+
} satisfies CancelVideoRequest;
|
|
48
|
+
|
|
49
|
+
try {
|
|
50
|
+
const data = await api.cancelVideo(body);
|
|
51
|
+
console.log(data);
|
|
52
|
+
} catch (error) {
|
|
53
|
+
console.error(error);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Run the test
|
|
58
|
+
example().catch(console.error);
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Parameters
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
| Name | Type | Description | Notes |
|
|
65
|
+
|------------- | ------------- | ------------- | -------------|
|
|
66
|
+
| **id** | `string` | | [Defaults to `undefined`] |
|
|
67
|
+
|
|
68
|
+
### Return type
|
|
69
|
+
|
|
70
|
+
[**VideoJob**](VideoJob.md)
|
|
71
|
+
|
|
72
|
+
### Authorization
|
|
73
|
+
|
|
74
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
75
|
+
|
|
76
|
+
### HTTP request headers
|
|
77
|
+
|
|
78
|
+
- **Content-Type**: Not defined
|
|
79
|
+
- **Accept**: `application/json`
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### HTTP response details
|
|
83
|
+
| Status code | Description | Response headers |
|
|
84
|
+
|-------------|-------------|------------------|
|
|
85
|
+
| **200** | A video generation job object. | - |
|
|
86
|
+
| **401** | Missing or invalid API key (OpenAI error envelope). | - |
|
|
87
|
+
| **403** | API key lacks the required scope (OpenAI error envelope). | - |
|
|
88
|
+
| **404** | Model or resource not found (OpenAI error envelope). | - |
|
|
89
|
+
| **409** | Invalid request (OpenAI error envelope). | - |
|
|
90
|
+
| **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
91
|
+
|
|
92
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## createChatCompletion
|
|
96
|
+
|
|
97
|
+
> ChatCompletionResponse createChatCompletion(chatCompletionRequest)
|
|
98
|
+
|
|
99
|
+
Create a chat completion (OpenAI-compatible)
|
|
100
|
+
|
|
101
|
+
### Example
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
import {
|
|
105
|
+
Configuration,
|
|
106
|
+
InferenceApi,
|
|
107
|
+
} from '@deeprelay/sdk';
|
|
108
|
+
import type { CreateChatCompletionRequest } from '@deeprelay/sdk';
|
|
109
|
+
|
|
110
|
+
async function example() {
|
|
111
|
+
console.log("🚀 Testing @deeprelay/sdk SDK...");
|
|
112
|
+
const config = new Configuration({
|
|
113
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
114
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
115
|
+
});
|
|
116
|
+
const api = new InferenceApi(config);
|
|
117
|
+
|
|
118
|
+
const body = {
|
|
119
|
+
// ChatCompletionRequest
|
|
120
|
+
chatCompletionRequest: ...,
|
|
121
|
+
} satisfies CreateChatCompletionRequest;
|
|
122
|
+
|
|
123
|
+
try {
|
|
124
|
+
const data = await api.createChatCompletion(body);
|
|
125
|
+
console.log(data);
|
|
126
|
+
} catch (error) {
|
|
127
|
+
console.error(error);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Run the test
|
|
132
|
+
example().catch(console.error);
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Parameters
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
| Name | Type | Description | Notes |
|
|
139
|
+
|------------- | ------------- | ------------- | -------------|
|
|
140
|
+
| **chatCompletionRequest** | [ChatCompletionRequest](ChatCompletionRequest.md) | | |
|
|
141
|
+
|
|
142
|
+
### Return type
|
|
143
|
+
|
|
144
|
+
[**ChatCompletionResponse**](ChatCompletionResponse.md)
|
|
145
|
+
|
|
146
|
+
### Authorization
|
|
147
|
+
|
|
148
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
149
|
+
|
|
150
|
+
### HTTP request headers
|
|
151
|
+
|
|
152
|
+
- **Content-Type**: `application/json`
|
|
153
|
+
- **Accept**: `application/json`, `text/event-stream`
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
### HTTP response details
|
|
157
|
+
| Status code | Description | Response headers |
|
|
158
|
+
|-------------|-------------|------------------|
|
|
159
|
+
| **200** | Successful response. application/json for non-streaming requests; text/event-stream for streaming requests (stream=true). | - |
|
|
160
|
+
| **400** | Invalid request (OpenAI error envelope). | - |
|
|
161
|
+
| **401** | Missing or invalid API key (OpenAI error envelope). | - |
|
|
162
|
+
| **402** | Insufficient balance (OpenAI error envelope, SERV-06). | - |
|
|
163
|
+
| **403** | API key lacks the required scope (OpenAI error envelope). | - |
|
|
164
|
+
| **404** | Model or resource not found (OpenAI error envelope). | - |
|
|
165
|
+
| **422** | Request validation failed (OpenAI error envelope). | - |
|
|
166
|
+
| **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
167
|
+
| **500** | Internal server error (OpenAI error envelope). | - |
|
|
168
|
+
| **503** | Upstream provider unavailable (OpenAI error envelope). Retry-After header may indicate seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
169
|
+
|
|
170
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
## createEmbeddings
|
|
174
|
+
|
|
175
|
+
> EmbeddingsResponse createEmbeddings(embeddingsRequest)
|
|
176
|
+
|
|
177
|
+
Create embeddings (OpenAI-compatible)
|
|
178
|
+
|
|
179
|
+
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.
|
|
180
|
+
|
|
181
|
+
### Example
|
|
182
|
+
|
|
183
|
+
```ts
|
|
184
|
+
import {
|
|
185
|
+
Configuration,
|
|
186
|
+
InferenceApi,
|
|
187
|
+
} from '@deeprelay/sdk';
|
|
188
|
+
import type { CreateEmbeddingsRequest } from '@deeprelay/sdk';
|
|
189
|
+
|
|
190
|
+
async function example() {
|
|
191
|
+
console.log("🚀 Testing @deeprelay/sdk SDK...");
|
|
192
|
+
const config = new Configuration({
|
|
193
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
194
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
195
|
+
});
|
|
196
|
+
const api = new InferenceApi(config);
|
|
197
|
+
|
|
198
|
+
const body = {
|
|
199
|
+
// EmbeddingsRequest
|
|
200
|
+
embeddingsRequest: ...,
|
|
201
|
+
} satisfies CreateEmbeddingsRequest;
|
|
202
|
+
|
|
203
|
+
try {
|
|
204
|
+
const data = await api.createEmbeddings(body);
|
|
205
|
+
console.log(data);
|
|
206
|
+
} catch (error) {
|
|
207
|
+
console.error(error);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// Run the test
|
|
212
|
+
example().catch(console.error);
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Parameters
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
| Name | Type | Description | Notes |
|
|
219
|
+
|------------- | ------------- | ------------- | -------------|
|
|
220
|
+
| **embeddingsRequest** | [EmbeddingsRequest](EmbeddingsRequest.md) | | |
|
|
221
|
+
|
|
222
|
+
### Return type
|
|
223
|
+
|
|
224
|
+
[**EmbeddingsResponse**](EmbeddingsResponse.md)
|
|
225
|
+
|
|
226
|
+
### Authorization
|
|
227
|
+
|
|
228
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
229
|
+
|
|
230
|
+
### HTTP request headers
|
|
231
|
+
|
|
232
|
+
- **Content-Type**: `application/json`
|
|
233
|
+
- **Accept**: `application/json`
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
### HTTP response details
|
|
237
|
+
| Status code | Description | Response headers |
|
|
238
|
+
|-------------|-------------|------------------|
|
|
239
|
+
| **200** | One embedding vector per input, in request order. | - |
|
|
240
|
+
| **400** | Invalid request (OpenAI error envelope). | - |
|
|
241
|
+
| **401** | Missing or invalid API key (OpenAI error envelope). | - |
|
|
242
|
+
| **402** | Insufficient balance (OpenAI error envelope, SERV-06). | - |
|
|
243
|
+
| **403** | API key lacks the required scope (OpenAI error envelope). | - |
|
|
244
|
+
| **404** | Model or resource not found (OpenAI error envelope). | - |
|
|
245
|
+
| **413** | Request body too large (OpenAI error envelope, code request_too_large). | - |
|
|
246
|
+
| **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
247
|
+
| **500** | Internal server error (OpenAI error envelope). | - |
|
|
248
|
+
| **502** | The upstream answered but its response could not be used (OpenAI error envelope): code upstream_response_too_large when the vector payload exceeded the per-request size limit, or upstream_error for a malformed / misaligned response. Not retryable as-is for upstream_response_too_large — send fewer inputs. | - |
|
|
249
|
+
| **503** | Upstream provider unavailable (OpenAI error envelope). Retry-After header may indicate seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
250
|
+
| **504** | Upstream provider exceeded the synchronous per-attempt deadline (OpenAI error envelope). 504 semantic — distinct from 503 OpenAIUpstreamUnavailable which signals a connection or routing failure rather than a timeout. | - |
|
|
251
|
+
|
|
252
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
## createImage
|
|
256
|
+
|
|
257
|
+
> ImagesResponse createImage(imagesGenerationsRequest, idempotencyKey)
|
|
258
|
+
|
|
259
|
+
Create image (OpenAI-compatible)
|
|
260
|
+
|
|
261
|
+
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.
|
|
262
|
+
|
|
263
|
+
### Example
|
|
264
|
+
|
|
265
|
+
```ts
|
|
266
|
+
import {
|
|
267
|
+
Configuration,
|
|
268
|
+
InferenceApi,
|
|
269
|
+
} from '@deeprelay/sdk';
|
|
270
|
+
import type { CreateImageRequest } from '@deeprelay/sdk';
|
|
271
|
+
|
|
272
|
+
async function example() {
|
|
273
|
+
console.log("🚀 Testing @deeprelay/sdk SDK...");
|
|
274
|
+
const config = new Configuration({
|
|
275
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
276
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
277
|
+
});
|
|
278
|
+
const api = new InferenceApi(config);
|
|
279
|
+
|
|
280
|
+
const body = {
|
|
281
|
+
// ImagesGenerationsRequest
|
|
282
|
+
imagesGenerationsRequest: ...,
|
|
283
|
+
// string (optional)
|
|
284
|
+
idempotencyKey: idempotencyKey_example,
|
|
285
|
+
} satisfies CreateImageRequest;
|
|
286
|
+
|
|
287
|
+
try {
|
|
288
|
+
const data = await api.createImage(body);
|
|
289
|
+
console.log(data);
|
|
290
|
+
} catch (error) {
|
|
291
|
+
console.error(error);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// Run the test
|
|
296
|
+
example().catch(console.error);
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### Parameters
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
| Name | Type | Description | Notes |
|
|
303
|
+
|------------- | ------------- | ------------- | -------------|
|
|
304
|
+
| **imagesGenerationsRequest** | [ImagesGenerationsRequest](ImagesGenerationsRequest.md) | | |
|
|
305
|
+
| **idempotencyKey** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
306
|
+
|
|
307
|
+
### Return type
|
|
308
|
+
|
|
309
|
+
[**ImagesResponse**](ImagesResponse.md)
|
|
310
|
+
|
|
311
|
+
### Authorization
|
|
312
|
+
|
|
313
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
314
|
+
|
|
315
|
+
### HTTP request headers
|
|
316
|
+
|
|
317
|
+
- **Content-Type**: `application/json`
|
|
318
|
+
- **Accept**: `application/json`
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
### HTTP response details
|
|
322
|
+
| Status code | Description | Response headers |
|
|
323
|
+
|-------------|-------------|------------------|
|
|
324
|
+
| **200** | OpenAI-shaped image generation response (b64_json only). | - |
|
|
325
|
+
| **400** | Invalid request (OpenAI error envelope). | - |
|
|
326
|
+
| **401** | Missing or invalid API key (OpenAI error envelope). | - |
|
|
327
|
+
| **402** | Insufficient balance (OpenAI error envelope, SERV-06). | - |
|
|
328
|
+
| **403** | API key lacks the required scope (OpenAI error envelope). | - |
|
|
329
|
+
| **404** | Model or resource not found (OpenAI error envelope). | - |
|
|
330
|
+
| **422** | Request validation failed (OpenAI error envelope). | - |
|
|
331
|
+
| **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
332
|
+
| **500** | Internal server error (OpenAI error envelope). | - |
|
|
333
|
+
| **503** | Upstream provider unavailable (OpenAI error envelope). Retry-After header may indicate seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
334
|
+
| **504** | Upstream provider exceeded the synchronous per-attempt deadline (OpenAI error envelope). 504 semantic — distinct from 503 OpenAIUpstreamUnavailable which signals a connection or routing failure rather than a timeout. | - |
|
|
335
|
+
|
|
336
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
## createVideo
|
|
340
|
+
|
|
341
|
+
> VideoJob createVideo(videoCreateRequest, idempotencyKey)
|
|
342
|
+
|
|
343
|
+
Create a video generation job (async)
|
|
344
|
+
|
|
345
|
+
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.
|
|
346
|
+
|
|
347
|
+
### Example
|
|
348
|
+
|
|
349
|
+
```ts
|
|
350
|
+
import {
|
|
351
|
+
Configuration,
|
|
352
|
+
InferenceApi,
|
|
353
|
+
} from '@deeprelay/sdk';
|
|
354
|
+
import type { CreateVideoRequest } from '@deeprelay/sdk';
|
|
355
|
+
|
|
356
|
+
async function example() {
|
|
357
|
+
console.log("🚀 Testing @deeprelay/sdk SDK...");
|
|
358
|
+
const config = new Configuration({
|
|
359
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
360
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
361
|
+
});
|
|
362
|
+
const api = new InferenceApi(config);
|
|
363
|
+
|
|
364
|
+
const body = {
|
|
365
|
+
// VideoCreateRequest
|
|
366
|
+
videoCreateRequest: ...,
|
|
367
|
+
// string (optional)
|
|
368
|
+
idempotencyKey: idempotencyKey_example,
|
|
369
|
+
} satisfies CreateVideoRequest;
|
|
370
|
+
|
|
371
|
+
try {
|
|
372
|
+
const data = await api.createVideo(body);
|
|
373
|
+
console.log(data);
|
|
374
|
+
} catch (error) {
|
|
375
|
+
console.error(error);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// Run the test
|
|
380
|
+
example().catch(console.error);
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### Parameters
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
| Name | Type | Description | Notes |
|
|
387
|
+
|------------- | ------------- | ------------- | -------------|
|
|
388
|
+
| **videoCreateRequest** | [VideoCreateRequest](VideoCreateRequest.md) | | |
|
|
389
|
+
| **idempotencyKey** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
390
|
+
|
|
391
|
+
### Return type
|
|
392
|
+
|
|
393
|
+
[**VideoJob**](VideoJob.md)
|
|
394
|
+
|
|
395
|
+
### Authorization
|
|
396
|
+
|
|
397
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
398
|
+
|
|
399
|
+
### HTTP request headers
|
|
400
|
+
|
|
401
|
+
- **Content-Type**: `application/json`
|
|
402
|
+
- **Accept**: `application/json`
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
### HTTP response details
|
|
406
|
+
| Status code | Description | Response headers |
|
|
407
|
+
|-------------|-------------|------------------|
|
|
408
|
+
| **200** | A video generation job object. | - |
|
|
409
|
+
| **400** | Invalid request (OpenAI error envelope). | - |
|
|
410
|
+
| **401** | Missing or invalid API key (OpenAI error envelope). | - |
|
|
411
|
+
| **402** | Insufficient balance (OpenAI error envelope, SERV-06). | - |
|
|
412
|
+
| **403** | API key lacks the required scope (OpenAI error envelope). | - |
|
|
413
|
+
| **404** | Model or resource not found (OpenAI error envelope). | - |
|
|
414
|
+
| **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
415
|
+
| **500** | Internal server error (OpenAI error envelope). | - |
|
|
416
|
+
|
|
417
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
## getModel
|
|
421
|
+
|
|
422
|
+
> Model getModel(id)
|
|
423
|
+
|
|
424
|
+
Get a specific model (OpenAI-compatible)
|
|
425
|
+
|
|
426
|
+
### Example
|
|
427
|
+
|
|
428
|
+
```ts
|
|
429
|
+
import {
|
|
430
|
+
Configuration,
|
|
431
|
+
InferenceApi,
|
|
432
|
+
} from '@deeprelay/sdk';
|
|
433
|
+
import type { GetModelRequest } from '@deeprelay/sdk';
|
|
434
|
+
|
|
435
|
+
async function example() {
|
|
436
|
+
console.log("🚀 Testing @deeprelay/sdk SDK...");
|
|
437
|
+
const config = new Configuration({
|
|
438
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
439
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
440
|
+
});
|
|
441
|
+
const api = new InferenceApi(config);
|
|
442
|
+
|
|
443
|
+
const body = {
|
|
444
|
+
// string
|
|
445
|
+
id: id_example,
|
|
446
|
+
} satisfies GetModelRequest;
|
|
447
|
+
|
|
448
|
+
try {
|
|
449
|
+
const data = await api.getModel(body);
|
|
450
|
+
console.log(data);
|
|
451
|
+
} catch (error) {
|
|
452
|
+
console.error(error);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
// Run the test
|
|
457
|
+
example().catch(console.error);
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
### Parameters
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
| Name | Type | Description | Notes |
|
|
464
|
+
|------------- | ------------- | ------------- | -------------|
|
|
465
|
+
| **id** | `string` | | [Defaults to `undefined`] |
|
|
466
|
+
|
|
467
|
+
### Return type
|
|
468
|
+
|
|
469
|
+
[**Model**](Model.md)
|
|
470
|
+
|
|
471
|
+
### Authorization
|
|
472
|
+
|
|
473
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
474
|
+
|
|
475
|
+
### HTTP request headers
|
|
476
|
+
|
|
477
|
+
- **Content-Type**: Not defined
|
|
478
|
+
- **Accept**: `application/json`
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
### HTTP response details
|
|
482
|
+
| Status code | Description | Response headers |
|
|
483
|
+
|-------------|-------------|------------------|
|
|
484
|
+
| **200** | OpenAI-shaped single model. | - |
|
|
485
|
+
| **401** | Missing or invalid API key (OpenAI error envelope). | - |
|
|
486
|
+
| **403** | API key lacks the required scope (OpenAI error envelope). | - |
|
|
487
|
+
| **404** | Model or resource not found (OpenAI error envelope). | - |
|
|
488
|
+
| **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
489
|
+
|
|
490
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
## getVideo
|
|
494
|
+
|
|
495
|
+
> VideoJob getVideo(id)
|
|
496
|
+
|
|
497
|
+
Get a video generation job
|
|
498
|
+
|
|
499
|
+
### Example
|
|
500
|
+
|
|
501
|
+
```ts
|
|
502
|
+
import {
|
|
503
|
+
Configuration,
|
|
504
|
+
InferenceApi,
|
|
505
|
+
} from '@deeprelay/sdk';
|
|
506
|
+
import type { GetVideoRequest } from '@deeprelay/sdk';
|
|
507
|
+
|
|
508
|
+
async function example() {
|
|
509
|
+
console.log("🚀 Testing @deeprelay/sdk SDK...");
|
|
510
|
+
const config = new Configuration({
|
|
511
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
512
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
513
|
+
});
|
|
514
|
+
const api = new InferenceApi(config);
|
|
515
|
+
|
|
516
|
+
const body = {
|
|
517
|
+
// string
|
|
518
|
+
id: id_example,
|
|
519
|
+
} satisfies GetVideoRequest;
|
|
520
|
+
|
|
521
|
+
try {
|
|
522
|
+
const data = await api.getVideo(body);
|
|
523
|
+
console.log(data);
|
|
524
|
+
} catch (error) {
|
|
525
|
+
console.error(error);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
// Run the test
|
|
530
|
+
example().catch(console.error);
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
### Parameters
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
| Name | Type | Description | Notes |
|
|
537
|
+
|------------- | ------------- | ------------- | -------------|
|
|
538
|
+
| **id** | `string` | | [Defaults to `undefined`] |
|
|
539
|
+
|
|
540
|
+
### Return type
|
|
541
|
+
|
|
542
|
+
[**VideoJob**](VideoJob.md)
|
|
543
|
+
|
|
544
|
+
### Authorization
|
|
545
|
+
|
|
546
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
547
|
+
|
|
548
|
+
### HTTP request headers
|
|
549
|
+
|
|
550
|
+
- **Content-Type**: Not defined
|
|
551
|
+
- **Accept**: `application/json`
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
### HTTP response details
|
|
555
|
+
| Status code | Description | Response headers |
|
|
556
|
+
|-------------|-------------|------------------|
|
|
557
|
+
| **200** | A video generation job object. | - |
|
|
558
|
+
| **401** | Missing or invalid API key (OpenAI error envelope). | - |
|
|
559
|
+
| **403** | API key lacks the required scope (OpenAI error envelope). | - |
|
|
560
|
+
| **404** | Model or resource not found (OpenAI error envelope). | - |
|
|
561
|
+
| **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
562
|
+
|
|
563
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
## getVideoContent
|
|
567
|
+
|
|
568
|
+
> Blob getVideoContent(id)
|
|
569
|
+
|
|
570
|
+
Download a completed video artifact
|
|
571
|
+
|
|
572
|
+
Streams the generated MP4 for a completed job. Returns 410 Gone once the artifact has expired (24h retention).
|
|
573
|
+
|
|
574
|
+
### Example
|
|
575
|
+
|
|
576
|
+
```ts
|
|
577
|
+
import {
|
|
578
|
+
Configuration,
|
|
579
|
+
InferenceApi,
|
|
580
|
+
} from '@deeprelay/sdk';
|
|
581
|
+
import type { GetVideoContentRequest } from '@deeprelay/sdk';
|
|
582
|
+
|
|
583
|
+
async function example() {
|
|
584
|
+
console.log("🚀 Testing @deeprelay/sdk SDK...");
|
|
585
|
+
const config = new Configuration({
|
|
586
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
587
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
588
|
+
});
|
|
589
|
+
const api = new InferenceApi(config);
|
|
590
|
+
|
|
591
|
+
const body = {
|
|
592
|
+
// string
|
|
593
|
+
id: id_example,
|
|
594
|
+
} satisfies GetVideoContentRequest;
|
|
595
|
+
|
|
596
|
+
try {
|
|
597
|
+
const data = await api.getVideoContent(body);
|
|
598
|
+
console.log(data);
|
|
599
|
+
} catch (error) {
|
|
600
|
+
console.error(error);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
// Run the test
|
|
605
|
+
example().catch(console.error);
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
### Parameters
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
| Name | Type | Description | Notes |
|
|
612
|
+
|------------- | ------------- | ------------- | -------------|
|
|
613
|
+
| **id** | `string` | | [Defaults to `undefined`] |
|
|
614
|
+
|
|
615
|
+
### Return type
|
|
616
|
+
|
|
617
|
+
**Blob**
|
|
618
|
+
|
|
619
|
+
### Authorization
|
|
620
|
+
|
|
621
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
622
|
+
|
|
623
|
+
### HTTP request headers
|
|
624
|
+
|
|
625
|
+
- **Content-Type**: Not defined
|
|
626
|
+
- **Accept**: `video/mp4`, `application/json`
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
### HTTP response details
|
|
630
|
+
| Status code | Description | Response headers |
|
|
631
|
+
|-------------|-------------|------------------|
|
|
632
|
+
| **200** | The generated video stream. | - |
|
|
633
|
+
| **401** | Missing or invalid API key (OpenAI error envelope). | - |
|
|
634
|
+
| **403** | API key lacks the required scope (OpenAI error envelope). | - |
|
|
635
|
+
| **404** | Model or resource not found (OpenAI error envelope). | - |
|
|
636
|
+
| **410** | The requested artifact has expired and is no longer available (OpenAI error envelope). | - |
|
|
637
|
+
| **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
638
|
+
|
|
639
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
## inferencePreflight
|
|
643
|
+
|
|
644
|
+
> InferencePreflight inferencePreflight(model)
|
|
645
|
+
|
|
646
|
+
Check whether a model request would be served, and at whose expense
|
|
647
|
+
|
|
648
|
+
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.
|
|
649
|
+
|
|
650
|
+
### Example
|
|
651
|
+
|
|
652
|
+
```ts
|
|
653
|
+
import {
|
|
654
|
+
Configuration,
|
|
655
|
+
InferenceApi,
|
|
656
|
+
} from '@deeprelay/sdk';
|
|
657
|
+
import type { InferencePreflightRequest } from '@deeprelay/sdk';
|
|
658
|
+
|
|
659
|
+
async function example() {
|
|
660
|
+
console.log("🚀 Testing @deeprelay/sdk SDK...");
|
|
661
|
+
const config = new Configuration({
|
|
662
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
663
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
664
|
+
});
|
|
665
|
+
const api = new InferenceApi(config);
|
|
666
|
+
|
|
667
|
+
const body = {
|
|
668
|
+
// string | Model id or alias, optionally with a `:economy` tier suffix. It is resolved through the catalog exactly as the inference endpoints resolve it, so an alias and a tier view answer for the model that would actually serve.
|
|
669
|
+
model: model_example,
|
|
670
|
+
} satisfies InferencePreflightRequest;
|
|
671
|
+
|
|
672
|
+
try {
|
|
673
|
+
const data = await api.inferencePreflight(body);
|
|
674
|
+
console.log(data);
|
|
675
|
+
} catch (error) {
|
|
676
|
+
console.error(error);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
// Run the test
|
|
681
|
+
example().catch(console.error);
|
|
682
|
+
```
|
|
683
|
+
|
|
684
|
+
### Parameters
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
| Name | Type | Description | Notes |
|
|
688
|
+
|------------- | ------------- | ------------- | -------------|
|
|
689
|
+
| **model** | `string` | Model id or alias, optionally with a `:economy` tier suffix. It is resolved through the catalog exactly as the inference endpoints resolve it, so an alias and a tier view answer for the model that would actually serve. | [Defaults to `undefined`] |
|
|
690
|
+
|
|
691
|
+
### Return type
|
|
692
|
+
|
|
693
|
+
[**InferencePreflight**](InferencePreflight.md)
|
|
694
|
+
|
|
695
|
+
### Authorization
|
|
696
|
+
|
|
697
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
698
|
+
|
|
699
|
+
### HTTP request headers
|
|
700
|
+
|
|
701
|
+
- **Content-Type**: Not defined
|
|
702
|
+
- **Accept**: `application/json`
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
### HTTP response details
|
|
706
|
+
| Status code | Description | Response headers |
|
|
707
|
+
|-------------|-------------|------------------|
|
|
708
|
+
| **200** | OK | - |
|
|
709
|
+
| **404** | Model or resource not found (OpenAI error envelope). | - |
|
|
710
|
+
| **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
711
|
+
|
|
712
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
## listModels
|
|
716
|
+
|
|
717
|
+
> ModelList listModels(modality)
|
|
718
|
+
|
|
719
|
+
List available models (OpenAI-compatible)
|
|
720
|
+
|
|
721
|
+
### Example
|
|
722
|
+
|
|
723
|
+
```ts
|
|
724
|
+
import {
|
|
725
|
+
Configuration,
|
|
726
|
+
InferenceApi,
|
|
727
|
+
} from '@deeprelay/sdk';
|
|
728
|
+
import type { ListModelsRequest } from '@deeprelay/sdk';
|
|
729
|
+
|
|
730
|
+
async function example() {
|
|
731
|
+
console.log("🚀 Testing @deeprelay/sdk SDK...");
|
|
732
|
+
const config = new Configuration({
|
|
733
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
734
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
735
|
+
});
|
|
736
|
+
const api = new InferenceApi(config);
|
|
737
|
+
|
|
738
|
+
const body = {
|
|
739
|
+
// 'chat' | 'image' | 'video' | 'embedding' (optional)
|
|
740
|
+
modality: modality_example,
|
|
741
|
+
} satisfies ListModelsRequest;
|
|
742
|
+
|
|
743
|
+
try {
|
|
744
|
+
const data = await api.listModels(body);
|
|
745
|
+
console.log(data);
|
|
746
|
+
} catch (error) {
|
|
747
|
+
console.error(error);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
// Run the test
|
|
752
|
+
example().catch(console.error);
|
|
753
|
+
```
|
|
754
|
+
|
|
755
|
+
### Parameters
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
| Name | Type | Description | Notes |
|
|
759
|
+
|------------- | ------------- | ------------- | -------------|
|
|
760
|
+
| **modality** | `chat`, `image`, `video`, `embedding` | | [Optional] [Defaults to `undefined`] [Enum: chat, image, video, embedding] |
|
|
761
|
+
|
|
762
|
+
### Return type
|
|
763
|
+
|
|
764
|
+
[**ModelList**](ModelList.md)
|
|
765
|
+
|
|
766
|
+
### Authorization
|
|
767
|
+
|
|
768
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
769
|
+
|
|
770
|
+
### HTTP request headers
|
|
771
|
+
|
|
772
|
+
- **Content-Type**: Not defined
|
|
773
|
+
- **Accept**: `application/json`
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
### HTTP response details
|
|
777
|
+
| Status code | Description | Response headers |
|
|
778
|
+
|-------------|-------------|------------------|
|
|
779
|
+
| **200** | OpenAI-shaped model list. | - |
|
|
780
|
+
| **400** | Invalid request (OpenAI error envelope). | - |
|
|
781
|
+
| **401** | Missing or invalid API key (OpenAI error envelope). | - |
|
|
782
|
+
| **403** | API key lacks the required scope (OpenAI error envelope). | - |
|
|
783
|
+
| **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
784
|
+
|
|
785
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
## listVideos
|
|
789
|
+
|
|
790
|
+
> VideoList listVideos(after, limit)
|
|
791
|
+
|
|
792
|
+
List video generation jobs
|
|
793
|
+
|
|
794
|
+
### Example
|
|
795
|
+
|
|
796
|
+
```ts
|
|
797
|
+
import {
|
|
798
|
+
Configuration,
|
|
799
|
+
InferenceApi,
|
|
800
|
+
} from '@deeprelay/sdk';
|
|
801
|
+
import type { ListVideosRequest } from '@deeprelay/sdk';
|
|
802
|
+
|
|
803
|
+
async function example() {
|
|
804
|
+
console.log("🚀 Testing @deeprelay/sdk SDK...");
|
|
805
|
+
const config = new Configuration({
|
|
806
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
807
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
808
|
+
});
|
|
809
|
+
const api = new InferenceApi(config);
|
|
810
|
+
|
|
811
|
+
const body = {
|
|
812
|
+
// string (optional)
|
|
813
|
+
after: after_example,
|
|
814
|
+
// number (optional)
|
|
815
|
+
limit: 56,
|
|
816
|
+
} satisfies ListVideosRequest;
|
|
817
|
+
|
|
818
|
+
try {
|
|
819
|
+
const data = await api.listVideos(body);
|
|
820
|
+
console.log(data);
|
|
821
|
+
} catch (error) {
|
|
822
|
+
console.error(error);
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
// Run the test
|
|
827
|
+
example().catch(console.error);
|
|
828
|
+
```
|
|
829
|
+
|
|
830
|
+
### Parameters
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
| Name | Type | Description | Notes |
|
|
834
|
+
|------------- | ------------- | ------------- | -------------|
|
|
835
|
+
| **after** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
836
|
+
| **limit** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
837
|
+
|
|
838
|
+
### Return type
|
|
839
|
+
|
|
840
|
+
[**VideoList**](VideoList.md)
|
|
841
|
+
|
|
842
|
+
### Authorization
|
|
843
|
+
|
|
844
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
845
|
+
|
|
846
|
+
### HTTP request headers
|
|
847
|
+
|
|
848
|
+
- **Content-Type**: Not defined
|
|
849
|
+
- **Accept**: `application/json`
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
### HTTP response details
|
|
853
|
+
| Status code | Description | Response headers |
|
|
854
|
+
|-------------|-------------|------------------|
|
|
855
|
+
| **200** | A page of video generation jobs. | - |
|
|
856
|
+
| **401** | Missing or invalid API key (OpenAI error envelope). | - |
|
|
857
|
+
| **403** | API key lacks the required scope (OpenAI error envelope). | - |
|
|
858
|
+
| **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
859
|
+
|
|
860
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
861
|
+
|