@deeprelay/sdk 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/.openapi-generator/FILES +116 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +24 -0
  4. package/LICENSE +204 -0
  5. package/README.md +189 -4
  6. package/dist/apis/BillingApi.d.ts +131 -0
  7. package/dist/apis/BillingApi.js +361 -0
  8. package/dist/apis/InferenceApi.d.ts +199 -0
  9. package/dist/apis/InferenceApi.js +531 -0
  10. package/dist/apis/MetaApi.d.ts +44 -0
  11. package/dist/apis/MetaApi.js +105 -0
  12. package/dist/apis/OperationsApi.d.ts +33 -0
  13. package/dist/apis/OperationsApi.js +79 -0
  14. package/dist/apis/UsageApi.d.ts +56 -0
  15. package/dist/apis/UsageApi.js +109 -0
  16. package/dist/apis/WebhooksApi.d.ts +82 -0
  17. package/dist/apis/WebhooksApi.js +224 -0
  18. package/dist/apis/index.d.ts +6 -0
  19. package/dist/apis/index.js +24 -0
  20. package/dist/esm/apis/BillingApi.d.ts +131 -0
  21. package/dist/esm/apis/BillingApi.js +357 -0
  22. package/dist/esm/apis/InferenceApi.d.ts +199 -0
  23. package/dist/esm/apis/InferenceApi.js +527 -0
  24. package/dist/esm/apis/MetaApi.d.ts +44 -0
  25. package/dist/esm/apis/MetaApi.js +101 -0
  26. package/dist/esm/apis/OperationsApi.d.ts +33 -0
  27. package/dist/esm/apis/OperationsApi.js +75 -0
  28. package/dist/esm/apis/UsageApi.d.ts +56 -0
  29. package/dist/esm/apis/UsageApi.js +105 -0
  30. package/dist/esm/apis/WebhooksApi.d.ts +82 -0
  31. package/dist/esm/apis/WebhooksApi.js +220 -0
  32. package/dist/esm/apis/index.d.ts +6 -0
  33. package/dist/esm/apis/index.js +8 -0
  34. package/dist/esm/index.d.ts +3 -0
  35. package/dist/esm/index.js +5 -0
  36. package/dist/esm/models/Balance.d.ts +65 -0
  37. package/dist/esm/models/Balance.js +63 -0
  38. package/dist/esm/models/ChatChoice.d.ts +55 -0
  39. package/dist/esm/models/ChatChoice.js +55 -0
  40. package/dist/esm/models/ChatCompletionRequest.d.ts +64 -0
  41. package/dist/esm/models/ChatCompletionRequest.js +57 -0
  42. package/dist/esm/models/ChatCompletionResponse.d.ts +71 -0
  43. package/dist/esm/models/ChatCompletionResponse.js +73 -0
  44. package/dist/esm/models/ChatMessage.d.ts +47 -0
  45. package/dist/esm/models/ChatMessage.js +55 -0
  46. package/dist/esm/models/CreateCryptoDepositRequest.d.ts +64 -0
  47. package/dist/esm/models/CreateCryptoDepositRequest.js +68 -0
  48. package/dist/esm/models/CreateWebhookEndpointRequest.d.ts +50 -0
  49. package/dist/esm/models/CreateWebhookEndpointRequest.js +58 -0
  50. package/dist/esm/models/CryptoDeposit.d.ts +114 -0
  51. package/dist/esm/models/CryptoDeposit.js +90 -0
  52. package/dist/esm/models/Embedding.d.ts +51 -0
  53. package/dist/esm/models/Embedding.js +59 -0
  54. package/dist/esm/models/EmbeddingsRequest.d.ts +64 -0
  55. package/dist/esm/models/EmbeddingsRequest.js +60 -0
  56. package/dist/esm/models/EmbeddingsRequestInput.d.ts +21 -0
  57. package/dist/esm/models/EmbeddingsRequestInput.js +47 -0
  58. package/dist/esm/models/EmbeddingsResponse.d.ts +59 -0
  59. package/dist/esm/models/EmbeddingsResponse.js +65 -0
  60. package/dist/esm/models/EmbeddingsUsage.d.ts +38 -0
  61. package/dist/esm/models/EmbeddingsUsage.js +47 -0
  62. package/dist/esm/models/GetHealth200Response.d.ts +39 -0
  63. package/dist/esm/models/GetHealth200Response.js +47 -0
  64. package/dist/esm/models/ImagesGenerationsRequest.d.ts +63 -0
  65. package/dist/esm/models/ImagesGenerationsRequest.js +59 -0
  66. package/dist/esm/models/ImagesResponse.d.ts +46 -0
  67. package/dist/esm/models/ImagesResponse.js +53 -0
  68. package/dist/esm/models/ImagesResponseDataInner.d.ts +32 -0
  69. package/dist/esm/models/ImagesResponseDataInner.js +43 -0
  70. package/dist/esm/models/ImagesResponseUsage.d.ts +32 -0
  71. package/dist/esm/models/ImagesResponseUsage.js +43 -0
  72. package/dist/esm/models/ListDeposits200Response.d.ts +39 -0
  73. package/dist/esm/models/ListDeposits200Response.js +48 -0
  74. package/dist/esm/models/Model.d.ts +152 -0
  75. package/dist/esm/models/Model.js +110 -0
  76. package/dist/esm/models/ModelList.d.ts +46 -0
  77. package/dist/esm/models/ModelList.js +56 -0
  78. package/dist/esm/models/ModelParametersInner.d.ts +72 -0
  79. package/dist/esm/models/ModelParametersInner.js +64 -0
  80. package/dist/esm/models/ModelPricing.d.ts +126 -0
  81. package/dist/esm/models/ModelPricing.js +78 -0
  82. package/dist/esm/models/ModelRate.d.ts +62 -0
  83. package/dist/esm/models/ModelRate.js +51 -0
  84. package/dist/esm/models/OpenAIErrorEnvelope.d.ts +33 -0
  85. package/dist/esm/models/OpenAIErrorEnvelope.js +44 -0
  86. package/dist/esm/models/OpenAIErrorEnvelopeError.d.ts +50 -0
  87. package/dist/esm/models/OpenAIErrorEnvelopeError.js +53 -0
  88. package/dist/esm/models/Operation.d.ts +107 -0
  89. package/dist/esm/models/Operation.js +86 -0
  90. package/dist/esm/models/OperationError.d.ts +38 -0
  91. package/dist/esm/models/OperationError.js +43 -0
  92. package/dist/esm/models/OperationResult.d.ts +44 -0
  93. package/dist/esm/models/OperationResult.js +45 -0
  94. package/dist/esm/models/PeakWindow.d.ts +38 -0
  95. package/dist/esm/models/PeakWindow.js +47 -0
  96. package/dist/esm/models/Problem.d.ts +87 -0
  97. package/dist/esm/models/Problem.js +87 -0
  98. package/dist/esm/models/SpendingLimit.d.ts +101 -0
  99. package/dist/esm/models/SpendingLimit.js +85 -0
  100. package/dist/esm/models/StreamOptions.d.ts +32 -0
  101. package/dist/esm/models/StreamOptions.js +41 -0
  102. package/dist/esm/models/Subscription.d.ts +78 -0
  103. package/dist/esm/models/Subscription.js +68 -0
  104. package/dist/esm/models/SubscriptionPlan.d.ts +46 -0
  105. package/dist/esm/models/SubscriptionPlan.js +50 -0
  106. package/dist/esm/models/SubscriptionPrice.d.ts +53 -0
  107. package/dist/esm/models/SubscriptionPrice.js +55 -0
  108. package/dist/esm/models/SubscriptionQuota.d.ts +60 -0
  109. package/dist/esm/models/SubscriptionQuota.js +59 -0
  110. package/dist/esm/models/SubscriptionUsage.d.ts +65 -0
  111. package/dist/esm/models/SubscriptionUsage.js +63 -0
  112. package/dist/esm/models/UpdateSpendingLimitRequest.d.ts +59 -0
  113. package/dist/esm/models/UpdateSpendingLimitRequest.js +57 -0
  114. package/dist/esm/models/Usage.d.ts +44 -0
  115. package/dist/esm/models/Usage.js +51 -0
  116. package/dist/esm/models/UsageBucket.d.ts +56 -0
  117. package/dist/esm/models/UsageBucket.js +55 -0
  118. package/dist/esm/models/UsagePage.d.ts +39 -0
  119. package/dist/esm/models/UsagePage.js +48 -0
  120. package/dist/esm/models/VideoCreateRequest.d.ts +50 -0
  121. package/dist/esm/models/VideoCreateRequest.js +51 -0
  122. package/dist/esm/models/VideoJob.d.ts +117 -0
  123. package/dist/esm/models/VideoJob.js +94 -0
  124. package/dist/esm/models/VideoList.d.ts +52 -0
  125. package/dist/esm/models/VideoList.js +60 -0
  126. package/dist/esm/models/WebhookEndpoint.d.ts +74 -0
  127. package/dist/esm/models/WebhookEndpoint.js +72 -0
  128. package/dist/esm/models/WebhookEndpointPage.d.ts +39 -0
  129. package/dist/esm/models/WebhookEndpointPage.js +48 -0
  130. package/dist/esm/models/index.d.ts +47 -0
  131. package/dist/esm/models/index.js +49 -0
  132. package/dist/esm/runtime.d.ts +185 -0
  133. package/dist/esm/runtime.js +354 -0
  134. package/dist/index.d.ts +3 -0
  135. package/dist/index.js +21 -0
  136. package/dist/models/Balance.d.ts +65 -0
  137. package/dist/models/Balance.js +70 -0
  138. package/dist/models/ChatChoice.d.ts +55 -0
  139. package/dist/models/ChatChoice.js +63 -0
  140. package/dist/models/ChatCompletionRequest.d.ts +64 -0
  141. package/dist/models/ChatCompletionRequest.js +64 -0
  142. package/dist/models/ChatCompletionResponse.d.ts +71 -0
  143. package/dist/models/ChatCompletionResponse.js +81 -0
  144. package/dist/models/ChatMessage.d.ts +47 -0
  145. package/dist/models/ChatMessage.js +63 -0
  146. package/dist/models/CreateCryptoDepositRequest.d.ts +64 -0
  147. package/dist/models/CreateCryptoDepositRequest.js +76 -0
  148. package/dist/models/CreateWebhookEndpointRequest.d.ts +50 -0
  149. package/dist/models/CreateWebhookEndpointRequest.js +66 -0
  150. package/dist/models/CryptoDeposit.d.ts +114 -0
  151. package/dist/models/CryptoDeposit.js +98 -0
  152. package/dist/models/Embedding.d.ts +51 -0
  153. package/dist/models/Embedding.js +67 -0
  154. package/dist/models/EmbeddingsRequest.d.ts +64 -0
  155. package/dist/models/EmbeddingsRequest.js +68 -0
  156. package/dist/models/EmbeddingsRequestInput.d.ts +21 -0
  157. package/dist/models/EmbeddingsRequestInput.js +53 -0
  158. package/dist/models/EmbeddingsResponse.d.ts +59 -0
  159. package/dist/models/EmbeddingsResponse.js +73 -0
  160. package/dist/models/EmbeddingsUsage.d.ts +38 -0
  161. package/dist/models/EmbeddingsUsage.js +54 -0
  162. package/dist/models/GetHealth200Response.d.ts +39 -0
  163. package/dist/models/GetHealth200Response.js +55 -0
  164. package/dist/models/ImagesGenerationsRequest.d.ts +63 -0
  165. package/dist/models/ImagesGenerationsRequest.js +67 -0
  166. package/dist/models/ImagesResponse.d.ts +46 -0
  167. package/dist/models/ImagesResponse.js +60 -0
  168. package/dist/models/ImagesResponseDataInner.d.ts +32 -0
  169. package/dist/models/ImagesResponseDataInner.js +50 -0
  170. package/dist/models/ImagesResponseUsage.d.ts +32 -0
  171. package/dist/models/ImagesResponseUsage.js +50 -0
  172. package/dist/models/ListDeposits200Response.d.ts +39 -0
  173. package/dist/models/ListDeposits200Response.js +55 -0
  174. package/dist/models/Model.d.ts +152 -0
  175. package/dist/models/Model.js +118 -0
  176. package/dist/models/ModelList.d.ts +46 -0
  177. package/dist/models/ModelList.js +64 -0
  178. package/dist/models/ModelParametersInner.d.ts +72 -0
  179. package/dist/models/ModelParametersInner.js +72 -0
  180. package/dist/models/ModelPricing.d.ts +126 -0
  181. package/dist/models/ModelPricing.js +86 -0
  182. package/dist/models/ModelRate.d.ts +62 -0
  183. package/dist/models/ModelRate.js +58 -0
  184. package/dist/models/OpenAIErrorEnvelope.d.ts +33 -0
  185. package/dist/models/OpenAIErrorEnvelope.js +51 -0
  186. package/dist/models/OpenAIErrorEnvelopeError.d.ts +50 -0
  187. package/dist/models/OpenAIErrorEnvelopeError.js +60 -0
  188. package/dist/models/Operation.d.ts +107 -0
  189. package/dist/models/Operation.js +94 -0
  190. package/dist/models/OperationError.d.ts +38 -0
  191. package/dist/models/OperationError.js +50 -0
  192. package/dist/models/OperationResult.d.ts +44 -0
  193. package/dist/models/OperationResult.js +52 -0
  194. package/dist/models/PeakWindow.d.ts +38 -0
  195. package/dist/models/PeakWindow.js +54 -0
  196. package/dist/models/Problem.d.ts +87 -0
  197. package/dist/models/Problem.js +95 -0
  198. package/dist/models/SpendingLimit.d.ts +101 -0
  199. package/dist/models/SpendingLimit.js +93 -0
  200. package/dist/models/StreamOptions.d.ts +32 -0
  201. package/dist/models/StreamOptions.js +48 -0
  202. package/dist/models/Subscription.d.ts +78 -0
  203. package/dist/models/Subscription.js +75 -0
  204. package/dist/models/SubscriptionPlan.d.ts +46 -0
  205. package/dist/models/SubscriptionPlan.js +57 -0
  206. package/dist/models/SubscriptionPrice.d.ts +53 -0
  207. package/dist/models/SubscriptionPrice.js +62 -0
  208. package/dist/models/SubscriptionQuota.d.ts +60 -0
  209. package/dist/models/SubscriptionQuota.js +66 -0
  210. package/dist/models/SubscriptionUsage.d.ts +65 -0
  211. package/dist/models/SubscriptionUsage.js +70 -0
  212. package/dist/models/UpdateSpendingLimitRequest.d.ts +59 -0
  213. package/dist/models/UpdateSpendingLimitRequest.js +65 -0
  214. package/dist/models/Usage.d.ts +44 -0
  215. package/dist/models/Usage.js +58 -0
  216. package/dist/models/UsageBucket.d.ts +56 -0
  217. package/dist/models/UsageBucket.js +62 -0
  218. package/dist/models/UsagePage.d.ts +39 -0
  219. package/dist/models/UsagePage.js +55 -0
  220. package/dist/models/VideoCreateRequest.d.ts +50 -0
  221. package/dist/models/VideoCreateRequest.js +58 -0
  222. package/dist/models/VideoJob.d.ts +117 -0
  223. package/dist/models/VideoJob.js +102 -0
  224. package/dist/models/VideoList.d.ts +52 -0
  225. package/dist/models/VideoList.js +68 -0
  226. package/dist/models/WebhookEndpoint.d.ts +74 -0
  227. package/dist/models/WebhookEndpoint.js +80 -0
  228. package/dist/models/WebhookEndpointPage.d.ts +39 -0
  229. package/dist/models/WebhookEndpointPage.js +55 -0
  230. package/dist/models/index.d.ts +47 -0
  231. package/dist/models/index.js +65 -0
  232. package/dist/runtime.d.ts +185 -0
  233. package/dist/runtime.js +371 -0
  234. package/docs/Balance.md +45 -0
  235. package/docs/BillingApi.md +503 -0
  236. package/docs/ChatChoice.md +38 -0
  237. package/docs/ChatCompletionRequest.md +44 -0
  238. package/docs/ChatCompletionResponse.md +44 -0
  239. package/docs/ChatMessage.md +36 -0
  240. package/docs/CreateCryptoDepositRequest.md +38 -0
  241. package/docs/CreateWebhookEndpointRequest.md +36 -0
  242. package/docs/CryptoDeposit.md +55 -0
  243. package/docs/Embedding.md +38 -0
  244. package/docs/EmbeddingsRequest.md +42 -0
  245. package/docs/EmbeddingsRequestInput.md +33 -0
  246. package/docs/EmbeddingsResponse.md +40 -0
  247. package/docs/EmbeddingsUsage.md +37 -0
  248. package/docs/GetHealth200Response.md +34 -0
  249. package/docs/ImagesGenerationsRequest.md +42 -0
  250. package/docs/ImagesResponse.md +38 -0
  251. package/docs/ImagesResponseDataInner.md +34 -0
  252. package/docs/ImagesResponseUsage.md +34 -0
  253. package/docs/InferenceApi.md +787 -0
  254. package/docs/ListDeposits200Response.md +36 -0
  255. package/docs/MetaApi.md +126 -0
  256. package/docs/Model.md +64 -0
  257. package/docs/ModelList.md +36 -0
  258. package/docs/ModelParametersInner.md +44 -0
  259. package/docs/ModelPricing.md +62 -0
  260. package/docs/ModelRate.md +45 -0
  261. package/docs/OpenAIErrorEnvelope.md +34 -0
  262. package/docs/OpenAIErrorEnvelopeError.md +40 -0
  263. package/docs/Operation.md +52 -0
  264. package/docs/OperationError.md +36 -0
  265. package/docs/OperationResult.md +39 -0
  266. package/docs/OperationsApi.md +80 -0
  267. package/docs/PeakWindow.md +37 -0
  268. package/docs/Problem.md +44 -0
  269. package/docs/SpendingLimit.md +54 -0
  270. package/docs/StreamOptions.md +34 -0
  271. package/docs/Subscription.md +49 -0
  272. package/docs/SubscriptionPlan.md +39 -0
  273. package/docs/SubscriptionPrice.md +41 -0
  274. package/docs/SubscriptionQuota.md +43 -0
  275. package/docs/SubscriptionUsage.md +45 -0
  276. package/docs/UpdateSpendingLimitRequest.md +40 -0
  277. package/docs/Usage.md +38 -0
  278. package/docs/UsageApi.md +95 -0
  279. package/docs/UsageBucket.md +42 -0
  280. package/docs/UsagePage.md +36 -0
  281. package/docs/VideoCreateRequest.md +40 -0
  282. package/docs/VideoJob.md +56 -0
  283. package/docs/VideoList.md +38 -0
  284. package/docs/WebhookEndpoint.md +44 -0
  285. package/docs/WebhookEndpointPage.md +36 -0
  286. package/docs/WebhooksApi.md +302 -0
  287. package/package.json +16 -7
  288. package/src/apis/BillingApi.ts +431 -0
  289. package/src/apis/InferenceApi.ts +686 -0
  290. package/src/apis/MetaApi.ts +103 -0
  291. package/src/apis/OperationsApi.ts +89 -0
  292. package/src/apis/UsageApi.ts +129 -0
  293. package/src/apis/WebhooksApi.ts +277 -0
  294. package/src/apis/index.ts +8 -0
  295. package/src/index.ts +5 -0
  296. package/src/models/Balance.ts +114 -0
  297. package/src/models/ChatChoice.ts +102 -0
  298. package/src/models/ChatCompletionRequest.ts +122 -0
  299. package/src/models/ChatCompletionResponse.ts +138 -0
  300. package/src/models/ChatMessage.ts +87 -0
  301. package/src/models/CreateCryptoDepositRequest.ts +108 -0
  302. package/src/models/CreateWebhookEndpointRequest.ts +90 -0
  303. package/src/models/CryptoDeposit.ts +177 -0
  304. package/src/models/Embedding.ts +96 -0
  305. package/src/models/EmbeddingsRequest.ts +117 -0
  306. package/src/models/EmbeddingsRequestInput.ts +59 -0
  307. package/src/models/EmbeddingsResponse.ts +120 -0
  308. package/src/models/EmbeddingsUsage.ts +75 -0
  309. package/src/models/GetHealth200Response.ts +75 -0
  310. package/src/models/ImagesGenerationsRequest.ts +109 -0
  311. package/src/models/ImagesResponse.ts +99 -0
  312. package/src/models/ImagesResponseDataInner.ts +66 -0
  313. package/src/models/ImagesResponseUsage.ts +66 -0
  314. package/src/models/ListDeposits200Response.ts +83 -0
  315. package/src/models/Model.ts +241 -0
  316. package/src/models/ModelList.ts +95 -0
  317. package/src/models/ModelParametersInner.ts +120 -0
  318. package/src/models/ModelPricing.ts +203 -0
  319. package/src/models/ModelRate.ts +105 -0
  320. package/src/models/OpenAIErrorEnvelope.ts +74 -0
  321. package/src/models/OpenAIErrorEnvelopeError.ts +92 -0
  322. package/src/models/Operation.ts +179 -0
  323. package/src/models/OperationError.ts +73 -0
  324. package/src/models/OperationResult.ts +81 -0
  325. package/src/models/PeakWindow.ts +75 -0
  326. package/src/models/Problem.ts +139 -0
  327. package/src/models/SpendingLimit.ts +165 -0
  328. package/src/models/StreamOptions.ts +65 -0
  329. package/src/models/Subscription.ts +149 -0
  330. package/src/models/SubscriptionPlan.ts +92 -0
  331. package/src/models/SubscriptionPrice.ts +96 -0
  332. package/src/models/SubscriptionQuota.ts +106 -0
  333. package/src/models/SubscriptionUsage.ts +114 -0
  334. package/src/models/UpdateSpendingLimitRequest.ts +102 -0
  335. package/src/models/Usage.ts +84 -0
  336. package/src/models/UsageBucket.ts +100 -0
  337. package/src/models/UsagePage.ts +83 -0
  338. package/src/models/VideoCreateRequest.ts +91 -0
  339. package/src/models/VideoJob.ts +184 -0
  340. package/src/models/VideoList.ts +104 -0
  341. package/src/models/WebhookEndpoint.ts +125 -0
  342. package/src/models/WebhookEndpointPage.ts +83 -0
  343. package/src/models/index.ts +49 -0
  344. package/src/runtime.ts +454 -0
  345. package/tsconfig.esm.json +7 -0
  346. package/tsconfig.json +16 -0
@@ -0,0 +1,787 @@
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
+ | [**listModels**](InferenceApi.md#listmodels) | **GET** /models | List available models (OpenAI-compatible) |
16
+ | [**listVideos**](InferenceApi.md#listvideos) | **GET** /videos | List video generation jobs |
17
+
18
+
19
+
20
+ ## cancelVideo
21
+
22
+ > VideoJob cancelVideo(id)
23
+
24
+ Cancel a video generation job
25
+
26
+ ### Example
27
+
28
+ ```ts
29
+ import {
30
+ Configuration,
31
+ InferenceApi,
32
+ } from '@deeprelay/sdk';
33
+ import type { CancelVideoRequest } from '@deeprelay/sdk';
34
+
35
+ async function example() {
36
+ console.log("🚀 Testing @deeprelay/sdk SDK...");
37
+ const config = new Configuration({
38
+ // Configure HTTP bearer authorization: bearerAuth
39
+ accessToken: "YOUR BEARER TOKEN",
40
+ });
41
+ const api = new InferenceApi(config);
42
+
43
+ const body = {
44
+ // string
45
+ id: id_example,
46
+ } satisfies CancelVideoRequest;
47
+
48
+ try {
49
+ const data = await api.cancelVideo(body);
50
+ console.log(data);
51
+ } catch (error) {
52
+ console.error(error);
53
+ }
54
+ }
55
+
56
+ // Run the test
57
+ example().catch(console.error);
58
+ ```
59
+
60
+ ### Parameters
61
+
62
+
63
+ | Name | Type | Description | Notes |
64
+ |------------- | ------------- | ------------- | -------------|
65
+ | **id** | `string` | | [Defaults to `undefined`] |
66
+
67
+ ### Return type
68
+
69
+ [**VideoJob**](VideoJob.md)
70
+
71
+ ### Authorization
72
+
73
+ [bearerAuth](../README.md#bearerAuth)
74
+
75
+ ### HTTP request headers
76
+
77
+ - **Content-Type**: Not defined
78
+ - **Accept**: `application/json`
79
+
80
+
81
+ ### HTTP response details
82
+ | Status code | Description | Response headers |
83
+ |-------------|-------------|------------------|
84
+ | **200** | A video generation job object. | - |
85
+ | **401** | Missing or invalid API key (OpenAI error envelope). | - |
86
+ | **403** | API key lacks the required scope (OpenAI error envelope). | - |
87
+ | **404** | Model or resource not found (OpenAI error envelope). | - |
88
+ | **409** | Invalid request (OpenAI error envelope). | - |
89
+ | **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
90
+
91
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
92
+
93
+
94
+ ## createChatCompletion
95
+
96
+ > ChatCompletionResponse createChatCompletion(chatCompletionRequest)
97
+
98
+ Create a chat completion (OpenAI-compatible)
99
+
100
+ ### Example
101
+
102
+ ```ts
103
+ import {
104
+ Configuration,
105
+ InferenceApi,
106
+ } from '@deeprelay/sdk';
107
+ import type { CreateChatCompletionRequest } from '@deeprelay/sdk';
108
+
109
+ async function example() {
110
+ console.log("🚀 Testing @deeprelay/sdk SDK...");
111
+ const config = new Configuration({
112
+ // Configure HTTP bearer authorization: bearerAuth
113
+ accessToken: "YOUR BEARER TOKEN",
114
+ });
115
+ const api = new InferenceApi(config);
116
+
117
+ const body = {
118
+ // ChatCompletionRequest
119
+ chatCompletionRequest: ...,
120
+ } satisfies CreateChatCompletionRequest;
121
+
122
+ try {
123
+ const data = await api.createChatCompletion(body);
124
+ console.log(data);
125
+ } catch (error) {
126
+ console.error(error);
127
+ }
128
+ }
129
+
130
+ // Run the test
131
+ example().catch(console.error);
132
+ ```
133
+
134
+ ### Parameters
135
+
136
+
137
+ | Name | Type | Description | Notes |
138
+ |------------- | ------------- | ------------- | -------------|
139
+ | **chatCompletionRequest** | [ChatCompletionRequest](ChatCompletionRequest.md) | | |
140
+
141
+ ### Return type
142
+
143
+ [**ChatCompletionResponse**](ChatCompletionResponse.md)
144
+
145
+ ### Authorization
146
+
147
+ [bearerAuth](../README.md#bearerAuth)
148
+
149
+ ### HTTP request headers
150
+
151
+ - **Content-Type**: `application/json`
152
+ - **Accept**: `application/json`, `text/event-stream`
153
+
154
+
155
+ ### HTTP response details
156
+ | Status code | Description | Response headers |
157
+ |-------------|-------------|------------------|
158
+ | **200** | Successful response. application/json for non-streaming requests; text/event-stream for streaming requests (stream&#x3D;true). | - |
159
+ | **400** | Invalid request (OpenAI error envelope). | - |
160
+ | **401** | Missing or invalid API key (OpenAI error envelope). | - |
161
+ | **402** | Insufficient balance (OpenAI error envelope, SERV-06). | - |
162
+ | **403** | API key lacks the required scope (OpenAI error envelope). | - |
163
+ | **404** | Model or resource not found (OpenAI error envelope). | - |
164
+ | **422** | Request validation failed (OpenAI error envelope). | - |
165
+ | **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
166
+ | **500** | Internal server error (OpenAI error envelope). | - |
167
+ | **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> |
168
+
169
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
170
+
171
+
172
+ ## createEmbeddings
173
+
174
+ > EmbeddingsResponse createEmbeddings(embeddingsRequest)
175
+
176
+ Create embeddings (OpenAI-compatible)
177
+
178
+ 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 &#x60;dimensions&#x60; value) — over-limit requests are rejected with 400 before any processing. Returns one float vector per input, in request order. Billed on the upstream\&#39;s reported prompt tokens at the model\&#39;s listed input rate, rounded up to the next whole cent per request; an embeddings call emits no completion tokens, so &#x60;usage&#x60; carries &#x60;prompt_tokens&#x60; and &#x60;total_tokens&#x60; only. &#x60;encoding_format&#x60; accepts only &#x60;float&#x60; — a value of &#x60;base64&#x60; is rejected with &#x60;unsupported_parameter&#x60;. A chat model id on this route returns 404 &#x60;model_not_found&#x60;: the id is valid, but not on this surface.
179
+
180
+ ### Example
181
+
182
+ ```ts
183
+ import {
184
+ Configuration,
185
+ InferenceApi,
186
+ } from '@deeprelay/sdk';
187
+ import type { CreateEmbeddingsRequest } from '@deeprelay/sdk';
188
+
189
+ async function example() {
190
+ console.log("🚀 Testing @deeprelay/sdk SDK...");
191
+ const config = new Configuration({
192
+ // Configure HTTP bearer authorization: bearerAuth
193
+ accessToken: "YOUR BEARER TOKEN",
194
+ });
195
+ const api = new InferenceApi(config);
196
+
197
+ const body = {
198
+ // EmbeddingsRequest
199
+ embeddingsRequest: ...,
200
+ } satisfies CreateEmbeddingsRequest;
201
+
202
+ try {
203
+ const data = await api.createEmbeddings(body);
204
+ console.log(data);
205
+ } catch (error) {
206
+ console.error(error);
207
+ }
208
+ }
209
+
210
+ // Run the test
211
+ example().catch(console.error);
212
+ ```
213
+
214
+ ### Parameters
215
+
216
+
217
+ | Name | Type | Description | Notes |
218
+ |------------- | ------------- | ------------- | -------------|
219
+ | **embeddingsRequest** | [EmbeddingsRequest](EmbeddingsRequest.md) | | |
220
+
221
+ ### Return type
222
+
223
+ [**EmbeddingsResponse**](EmbeddingsResponse.md)
224
+
225
+ ### Authorization
226
+
227
+ [bearerAuth](../README.md#bearerAuth)
228
+
229
+ ### HTTP request headers
230
+
231
+ - **Content-Type**: `application/json`
232
+ - **Accept**: `application/json`
233
+
234
+
235
+ ### HTTP response details
236
+ | Status code | Description | Response headers |
237
+ |-------------|-------------|------------------|
238
+ | **200** | One embedding vector per input, in request order. | - |
239
+ | **400** | Invalid request (OpenAI error envelope). | - |
240
+ | **401** | Missing or invalid API key (OpenAI error envelope). | - |
241
+ | **402** | Insufficient balance (OpenAI error envelope, SERV-06). | - |
242
+ | **403** | API key lacks the required scope (OpenAI error envelope). | - |
243
+ | **404** | Model or resource not found (OpenAI error envelope). | - |
244
+ | **413** | Request body too large (OpenAI error envelope, code request_too_large). | - |
245
+ | **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
246
+ | **500** | Internal server error (OpenAI error envelope). | - |
247
+ | **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. | - |
248
+ | **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> |
249
+ | **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. | - |
250
+
251
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
252
+
253
+
254
+ ## createImage
255
+
256
+ > ImagesResponse createImage(imagesGenerationsRequest, idempotencyKey)
257
+
258
+ Create image (OpenAI-compatible)
259
+
260
+ Synchronous text-to-image generation. Returns base64-encoded images only (&#x60;response_format&#x60; is restricted to &#x60;b64_json&#x60;); a value of &#x60;url&#x60; is rejected with &#x60;invalid_request_error&#x60; until S3-backed URL delivery lands. Pass an &#x60;Idempotency-Key&#x60; header to make a retried request replay the original response without a second charge.
261
+
262
+ ### Example
263
+
264
+ ```ts
265
+ import {
266
+ Configuration,
267
+ InferenceApi,
268
+ } from '@deeprelay/sdk';
269
+ import type { CreateImageRequest } from '@deeprelay/sdk';
270
+
271
+ async function example() {
272
+ console.log("🚀 Testing @deeprelay/sdk SDK...");
273
+ const config = new Configuration({
274
+ // Configure HTTP bearer authorization: bearerAuth
275
+ accessToken: "YOUR BEARER TOKEN",
276
+ });
277
+ const api = new InferenceApi(config);
278
+
279
+ const body = {
280
+ // ImagesGenerationsRequest
281
+ imagesGenerationsRequest: ...,
282
+ // string (optional)
283
+ idempotencyKey: idempotencyKey_example,
284
+ } satisfies CreateImageRequest;
285
+
286
+ try {
287
+ const data = await api.createImage(body);
288
+ console.log(data);
289
+ } catch (error) {
290
+ console.error(error);
291
+ }
292
+ }
293
+
294
+ // Run the test
295
+ example().catch(console.error);
296
+ ```
297
+
298
+ ### Parameters
299
+
300
+
301
+ | Name | Type | Description | Notes |
302
+ |------------- | ------------- | ------------- | -------------|
303
+ | **imagesGenerationsRequest** | [ImagesGenerationsRequest](ImagesGenerationsRequest.md) | | |
304
+ | **idempotencyKey** | `string` | | [Optional] [Defaults to `undefined`] |
305
+
306
+ ### Return type
307
+
308
+ [**ImagesResponse**](ImagesResponse.md)
309
+
310
+ ### Authorization
311
+
312
+ [bearerAuth](../README.md#bearerAuth)
313
+
314
+ ### HTTP request headers
315
+
316
+ - **Content-Type**: `application/json`
317
+ - **Accept**: `application/json`
318
+
319
+
320
+ ### HTTP response details
321
+ | Status code | Description | Response headers |
322
+ |-------------|-------------|------------------|
323
+ | **200** | OpenAI-shaped image generation response (b64_json only). | - |
324
+ | **400** | Invalid request (OpenAI error envelope). | - |
325
+ | **401** | Missing or invalid API key (OpenAI error envelope). | - |
326
+ | **402** | Insufficient balance (OpenAI error envelope, SERV-06). | - |
327
+ | **403** | API key lacks the required scope (OpenAI error envelope). | - |
328
+ | **404** | Model or resource not found (OpenAI error envelope). | - |
329
+ | **422** | Request validation failed (OpenAI error envelope). | - |
330
+ | **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
331
+ | **500** | Internal server error (OpenAI error envelope). | - |
332
+ | **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> |
333
+ | **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. | - |
334
+
335
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
336
+
337
+
338
+ ## createVideo
339
+
340
+ > VideoJob createVideo(videoCreateRequest, idempotencyKey)
341
+
342
+ Create a video generation job (async)
343
+
344
+ Submit an asynchronous text-to-video generation job. Returns a job object with status &#x60;queued&#x60;; poll GET /videos/{id} until &#x60;completed&#x60;, then stream the result from GET /videos/{id}/content. Pass an &#x60;Idempotency-Key&#x60; header to make a retried request replay the original response without a second charge.
345
+
346
+ ### Example
347
+
348
+ ```ts
349
+ import {
350
+ Configuration,
351
+ InferenceApi,
352
+ } from '@deeprelay/sdk';
353
+ import type { CreateVideoRequest } from '@deeprelay/sdk';
354
+
355
+ async function example() {
356
+ console.log("🚀 Testing @deeprelay/sdk SDK...");
357
+ const config = new Configuration({
358
+ // Configure HTTP bearer authorization: bearerAuth
359
+ accessToken: "YOUR BEARER TOKEN",
360
+ });
361
+ const api = new InferenceApi(config);
362
+
363
+ const body = {
364
+ // VideoCreateRequest
365
+ videoCreateRequest: ...,
366
+ // string (optional)
367
+ idempotencyKey: idempotencyKey_example,
368
+ } satisfies CreateVideoRequest;
369
+
370
+ try {
371
+ const data = await api.createVideo(body);
372
+ console.log(data);
373
+ } catch (error) {
374
+ console.error(error);
375
+ }
376
+ }
377
+
378
+ // Run the test
379
+ example().catch(console.error);
380
+ ```
381
+
382
+ ### Parameters
383
+
384
+
385
+ | Name | Type | Description | Notes |
386
+ |------------- | ------------- | ------------- | -------------|
387
+ | **videoCreateRequest** | [VideoCreateRequest](VideoCreateRequest.md) | | |
388
+ | **idempotencyKey** | `string` | | [Optional] [Defaults to `undefined`] |
389
+
390
+ ### Return type
391
+
392
+ [**VideoJob**](VideoJob.md)
393
+
394
+ ### Authorization
395
+
396
+ [bearerAuth](../README.md#bearerAuth)
397
+
398
+ ### HTTP request headers
399
+
400
+ - **Content-Type**: `application/json`
401
+ - **Accept**: `application/json`
402
+
403
+
404
+ ### HTTP response details
405
+ | Status code | Description | Response headers |
406
+ |-------------|-------------|------------------|
407
+ | **200** | A video generation job object. | - |
408
+ | **400** | Invalid request (OpenAI error envelope). | - |
409
+ | **401** | Missing or invalid API key (OpenAI error envelope). | - |
410
+ | **402** | Insufficient balance (OpenAI error envelope, SERV-06). | - |
411
+ | **403** | API key lacks the required scope (OpenAI error envelope). | - |
412
+ | **404** | Model or resource not found (OpenAI error envelope). | - |
413
+ | **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
414
+ | **500** | Internal server error (OpenAI error envelope). | - |
415
+
416
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
417
+
418
+
419
+ ## getModel
420
+
421
+ > Model getModel(id)
422
+
423
+ Get a specific model (OpenAI-compatible)
424
+
425
+ ### Example
426
+
427
+ ```ts
428
+ import {
429
+ Configuration,
430
+ InferenceApi,
431
+ } from '@deeprelay/sdk';
432
+ import type { GetModelRequest } from '@deeprelay/sdk';
433
+
434
+ async function example() {
435
+ console.log("🚀 Testing @deeprelay/sdk SDK...");
436
+ const config = new Configuration({
437
+ // Configure HTTP bearer authorization: bearerAuth
438
+ accessToken: "YOUR BEARER TOKEN",
439
+ });
440
+ const api = new InferenceApi(config);
441
+
442
+ const body = {
443
+ // string
444
+ id: id_example,
445
+ } satisfies GetModelRequest;
446
+
447
+ try {
448
+ const data = await api.getModel(body);
449
+ console.log(data);
450
+ } catch (error) {
451
+ console.error(error);
452
+ }
453
+ }
454
+
455
+ // Run the test
456
+ example().catch(console.error);
457
+ ```
458
+
459
+ ### Parameters
460
+
461
+
462
+ | Name | Type | Description | Notes |
463
+ |------------- | ------------- | ------------- | -------------|
464
+ | **id** | `string` | | [Defaults to `undefined`] |
465
+
466
+ ### Return type
467
+
468
+ [**Model**](Model.md)
469
+
470
+ ### Authorization
471
+
472
+ [bearerAuth](../README.md#bearerAuth)
473
+
474
+ ### HTTP request headers
475
+
476
+ - **Content-Type**: Not defined
477
+ - **Accept**: `application/json`
478
+
479
+
480
+ ### HTTP response details
481
+ | Status code | Description | Response headers |
482
+ |-------------|-------------|------------------|
483
+ | **200** | OpenAI-shaped single model. | - |
484
+ | **401** | Missing or invalid API key (OpenAI error envelope). | - |
485
+ | **403** | API key lacks the required scope (OpenAI error envelope). | - |
486
+ | **404** | Model or resource not found (OpenAI error envelope). | - |
487
+ | **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
488
+
489
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
490
+
491
+
492
+ ## getVideo
493
+
494
+ > VideoJob getVideo(id)
495
+
496
+ Get a video generation job
497
+
498
+ ### Example
499
+
500
+ ```ts
501
+ import {
502
+ Configuration,
503
+ InferenceApi,
504
+ } from '@deeprelay/sdk';
505
+ import type { GetVideoRequest } from '@deeprelay/sdk';
506
+
507
+ async function example() {
508
+ console.log("🚀 Testing @deeprelay/sdk SDK...");
509
+ const config = new Configuration({
510
+ // Configure HTTP bearer authorization: bearerAuth
511
+ accessToken: "YOUR BEARER TOKEN",
512
+ });
513
+ const api = new InferenceApi(config);
514
+
515
+ const body = {
516
+ // string
517
+ id: id_example,
518
+ } satisfies GetVideoRequest;
519
+
520
+ try {
521
+ const data = await api.getVideo(body);
522
+ console.log(data);
523
+ } catch (error) {
524
+ console.error(error);
525
+ }
526
+ }
527
+
528
+ // Run the test
529
+ example().catch(console.error);
530
+ ```
531
+
532
+ ### Parameters
533
+
534
+
535
+ | Name | Type | Description | Notes |
536
+ |------------- | ------------- | ------------- | -------------|
537
+ | **id** | `string` | | [Defaults to `undefined`] |
538
+
539
+ ### Return type
540
+
541
+ [**VideoJob**](VideoJob.md)
542
+
543
+ ### Authorization
544
+
545
+ [bearerAuth](../README.md#bearerAuth)
546
+
547
+ ### HTTP request headers
548
+
549
+ - **Content-Type**: Not defined
550
+ - **Accept**: `application/json`
551
+
552
+
553
+ ### HTTP response details
554
+ | Status code | Description | Response headers |
555
+ |-------------|-------------|------------------|
556
+ | **200** | A video generation job object. | - |
557
+ | **401** | Missing or invalid API key (OpenAI error envelope). | - |
558
+ | **403** | API key lacks the required scope (OpenAI error envelope). | - |
559
+ | **404** | Model or resource not found (OpenAI error envelope). | - |
560
+ | **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
561
+
562
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
563
+
564
+
565
+ ## getVideoContent
566
+
567
+ > Blob getVideoContent(id)
568
+
569
+ Download a completed video artifact
570
+
571
+ Streams the generated MP4 for a completed job. Returns 410 Gone once the artifact has expired (24h retention).
572
+
573
+ ### Example
574
+
575
+ ```ts
576
+ import {
577
+ Configuration,
578
+ InferenceApi,
579
+ } from '@deeprelay/sdk';
580
+ import type { GetVideoContentRequest } from '@deeprelay/sdk';
581
+
582
+ async function example() {
583
+ console.log("🚀 Testing @deeprelay/sdk SDK...");
584
+ const config = new Configuration({
585
+ // Configure HTTP bearer authorization: bearerAuth
586
+ accessToken: "YOUR BEARER TOKEN",
587
+ });
588
+ const api = new InferenceApi(config);
589
+
590
+ const body = {
591
+ // string
592
+ id: id_example,
593
+ } satisfies GetVideoContentRequest;
594
+
595
+ try {
596
+ const data = await api.getVideoContent(body);
597
+ console.log(data);
598
+ } catch (error) {
599
+ console.error(error);
600
+ }
601
+ }
602
+
603
+ // Run the test
604
+ example().catch(console.error);
605
+ ```
606
+
607
+ ### Parameters
608
+
609
+
610
+ | Name | Type | Description | Notes |
611
+ |------------- | ------------- | ------------- | -------------|
612
+ | **id** | `string` | | [Defaults to `undefined`] |
613
+
614
+ ### Return type
615
+
616
+ **Blob**
617
+
618
+ ### Authorization
619
+
620
+ [bearerAuth](../README.md#bearerAuth)
621
+
622
+ ### HTTP request headers
623
+
624
+ - **Content-Type**: Not defined
625
+ - **Accept**: `video/mp4`, `application/json`
626
+
627
+
628
+ ### HTTP response details
629
+ | Status code | Description | Response headers |
630
+ |-------------|-------------|------------------|
631
+ | **200** | The generated video stream. | - |
632
+ | **401** | Missing or invalid API key (OpenAI error envelope). | - |
633
+ | **403** | API key lacks the required scope (OpenAI error envelope). | - |
634
+ | **404** | Model or resource not found (OpenAI error envelope). | - |
635
+ | **410** | The requested artifact has expired and is no longer available (OpenAI error envelope). | - |
636
+ | **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
637
+
638
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
639
+
640
+
641
+ ## listModels
642
+
643
+ > ModelList listModels(modality)
644
+
645
+ List available models (OpenAI-compatible)
646
+
647
+ ### Example
648
+
649
+ ```ts
650
+ import {
651
+ Configuration,
652
+ InferenceApi,
653
+ } from '@deeprelay/sdk';
654
+ import type { ListModelsRequest } from '@deeprelay/sdk';
655
+
656
+ async function example() {
657
+ console.log("🚀 Testing @deeprelay/sdk SDK...");
658
+ const config = new Configuration({
659
+ // Configure HTTP bearer authorization: bearerAuth
660
+ accessToken: "YOUR BEARER TOKEN",
661
+ });
662
+ const api = new InferenceApi(config);
663
+
664
+ const body = {
665
+ // 'chat' | 'image' | 'video' | 'embedding' (optional)
666
+ modality: modality_example,
667
+ } satisfies ListModelsRequest;
668
+
669
+ try {
670
+ const data = await api.listModels(body);
671
+ console.log(data);
672
+ } catch (error) {
673
+ console.error(error);
674
+ }
675
+ }
676
+
677
+ // Run the test
678
+ example().catch(console.error);
679
+ ```
680
+
681
+ ### Parameters
682
+
683
+
684
+ | Name | Type | Description | Notes |
685
+ |------------- | ------------- | ------------- | -------------|
686
+ | **modality** | `chat`, `image`, `video`, `embedding` | | [Optional] [Defaults to `undefined`] [Enum: chat, image, video, embedding] |
687
+
688
+ ### Return type
689
+
690
+ [**ModelList**](ModelList.md)
691
+
692
+ ### Authorization
693
+
694
+ [bearerAuth](../README.md#bearerAuth)
695
+
696
+ ### HTTP request headers
697
+
698
+ - **Content-Type**: Not defined
699
+ - **Accept**: `application/json`
700
+
701
+
702
+ ### HTTP response details
703
+ | Status code | Description | Response headers |
704
+ |-------------|-------------|------------------|
705
+ | **200** | OpenAI-shaped model list. | - |
706
+ | **400** | Invalid request (OpenAI error envelope). | - |
707
+ | **401** | Missing or invalid API key (OpenAI error envelope). | - |
708
+ | **403** | API key lacks the required scope (OpenAI error envelope). | - |
709
+ | **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
710
+
711
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
712
+
713
+
714
+ ## listVideos
715
+
716
+ > VideoList listVideos(after, limit)
717
+
718
+ List video generation jobs
719
+
720
+ ### Example
721
+
722
+ ```ts
723
+ import {
724
+ Configuration,
725
+ InferenceApi,
726
+ } from '@deeprelay/sdk';
727
+ import type { ListVideosRequest } from '@deeprelay/sdk';
728
+
729
+ async function example() {
730
+ console.log("🚀 Testing @deeprelay/sdk SDK...");
731
+ const config = new Configuration({
732
+ // Configure HTTP bearer authorization: bearerAuth
733
+ accessToken: "YOUR BEARER TOKEN",
734
+ });
735
+ const api = new InferenceApi(config);
736
+
737
+ const body = {
738
+ // string (optional)
739
+ after: after_example,
740
+ // number (optional)
741
+ limit: 56,
742
+ } satisfies ListVideosRequest;
743
+
744
+ try {
745
+ const data = await api.listVideos(body);
746
+ console.log(data);
747
+ } catch (error) {
748
+ console.error(error);
749
+ }
750
+ }
751
+
752
+ // Run the test
753
+ example().catch(console.error);
754
+ ```
755
+
756
+ ### Parameters
757
+
758
+
759
+ | Name | Type | Description | Notes |
760
+ |------------- | ------------- | ------------- | -------------|
761
+ | **after** | `string` | | [Optional] [Defaults to `undefined`] |
762
+ | **limit** | `number` | | [Optional] [Defaults to `undefined`] |
763
+
764
+ ### Return type
765
+
766
+ [**VideoList**](VideoList.md)
767
+
768
+ ### Authorization
769
+
770
+ [bearerAuth](../README.md#bearerAuth)
771
+
772
+ ### HTTP request headers
773
+
774
+ - **Content-Type**: Not defined
775
+ - **Accept**: `application/json`
776
+
777
+
778
+ ### HTTP response details
779
+ | Status code | Description | Response headers |
780
+ |-------------|-------------|------------------|
781
+ | **200** | A page of video generation jobs. | - |
782
+ | **401** | Missing or invalid API key (OpenAI error envelope). | - |
783
+ | **403** | API key lacks the required scope (OpenAI error envelope). | - |
784
+ | **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
785
+
786
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
787
+