@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.
Files changed (376) hide show
  1. package/.openapi-generator/FILES +126 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +24 -0
  4. package/LICENSE +204 -0
  5. package/README.md +197 -4
  6. package/dist/apis/BillingApi.d.ts +169 -0
  7. package/dist/apis/BillingApi.js +457 -0
  8. package/dist/apis/InferenceApi.d.ts +217 -0
  9. package/dist/apis/InferenceApi.js +582 -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 +169 -0
  21. package/dist/esm/apis/BillingApi.js +453 -0
  22. package/dist/esm/apis/InferenceApi.d.ts +217 -0
  23. package/dist/esm/apis/InferenceApi.js +578 -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/InferencePreflight.d.ts +92 -0
  73. package/dist/esm/models/InferencePreflight.js +86 -0
  74. package/dist/esm/models/ListDeposits200Response.d.ts +39 -0
  75. package/dist/esm/models/ListDeposits200Response.js +48 -0
  76. package/dist/esm/models/Model.d.ts +152 -0
  77. package/dist/esm/models/Model.js +110 -0
  78. package/dist/esm/models/ModelList.d.ts +46 -0
  79. package/dist/esm/models/ModelList.js +56 -0
  80. package/dist/esm/models/ModelParametersInner.d.ts +72 -0
  81. package/dist/esm/models/ModelParametersInner.js +64 -0
  82. package/dist/esm/models/ModelPricing.d.ts +126 -0
  83. package/dist/esm/models/ModelPricing.js +78 -0
  84. package/dist/esm/models/ModelRate.d.ts +62 -0
  85. package/dist/esm/models/ModelRate.js +51 -0
  86. package/dist/esm/models/OpenAIErrorEnvelope.d.ts +33 -0
  87. package/dist/esm/models/OpenAIErrorEnvelope.js +44 -0
  88. package/dist/esm/models/OpenAIErrorEnvelopeError.d.ts +50 -0
  89. package/dist/esm/models/OpenAIErrorEnvelopeError.js +53 -0
  90. package/dist/esm/models/Operation.d.ts +107 -0
  91. package/dist/esm/models/Operation.js +86 -0
  92. package/dist/esm/models/OperationError.d.ts +38 -0
  93. package/dist/esm/models/OperationError.js +43 -0
  94. package/dist/esm/models/OperationResult.d.ts +44 -0
  95. package/dist/esm/models/OperationResult.js +45 -0
  96. package/dist/esm/models/PeakWindow.d.ts +38 -0
  97. package/dist/esm/models/PeakWindow.js +47 -0
  98. package/dist/esm/models/Problem.d.ts +87 -0
  99. package/dist/esm/models/Problem.js +87 -0
  100. package/dist/esm/models/SpendingLimit.d.ts +101 -0
  101. package/dist/esm/models/SpendingLimit.js +85 -0
  102. package/dist/esm/models/StreamOptions.d.ts +32 -0
  103. package/dist/esm/models/StreamOptions.js +41 -0
  104. package/dist/esm/models/Subscription.d.ts +78 -0
  105. package/dist/esm/models/Subscription.js +68 -0
  106. package/dist/esm/models/SubscriptionCheckoutRequest.d.ts +45 -0
  107. package/dist/esm/models/SubscriptionCheckoutRequest.js +45 -0
  108. package/dist/esm/models/SubscriptionCheckoutSession.d.ts +45 -0
  109. package/dist/esm/models/SubscriptionCheckoutSession.js +52 -0
  110. package/dist/esm/models/SubscriptionPlan.d.ts +46 -0
  111. package/dist/esm/models/SubscriptionPlan.js +50 -0
  112. package/dist/esm/models/SubscriptionPortalRequest.d.ts +32 -0
  113. package/dist/esm/models/SubscriptionPortalRequest.js +41 -0
  114. package/dist/esm/models/SubscriptionPortalSession.d.ts +32 -0
  115. package/dist/esm/models/SubscriptionPortalSession.js +43 -0
  116. package/dist/esm/models/SubscriptionPrice.d.ts +53 -0
  117. package/dist/esm/models/SubscriptionPrice.js +55 -0
  118. package/dist/esm/models/SubscriptionQuota.d.ts +60 -0
  119. package/dist/esm/models/SubscriptionQuota.js +59 -0
  120. package/dist/esm/models/SubscriptionUsage.d.ts +65 -0
  121. package/dist/esm/models/SubscriptionUsage.js +63 -0
  122. package/dist/esm/models/UpdateSpendingLimitRequest.d.ts +59 -0
  123. package/dist/esm/models/UpdateSpendingLimitRequest.js +57 -0
  124. package/dist/esm/models/Usage.d.ts +44 -0
  125. package/dist/esm/models/Usage.js +51 -0
  126. package/dist/esm/models/UsageBucket.d.ts +56 -0
  127. package/dist/esm/models/UsageBucket.js +55 -0
  128. package/dist/esm/models/UsagePage.d.ts +39 -0
  129. package/dist/esm/models/UsagePage.js +48 -0
  130. package/dist/esm/models/VideoCreateRequest.d.ts +50 -0
  131. package/dist/esm/models/VideoCreateRequest.js +51 -0
  132. package/dist/esm/models/VideoJob.d.ts +117 -0
  133. package/dist/esm/models/VideoJob.js +94 -0
  134. package/dist/esm/models/VideoList.d.ts +52 -0
  135. package/dist/esm/models/VideoList.js +60 -0
  136. package/dist/esm/models/WebhookEndpoint.d.ts +74 -0
  137. package/dist/esm/models/WebhookEndpoint.js +72 -0
  138. package/dist/esm/models/WebhookEndpointPage.d.ts +39 -0
  139. package/dist/esm/models/WebhookEndpointPage.js +48 -0
  140. package/dist/esm/models/index.d.ts +52 -0
  141. package/dist/esm/models/index.js +54 -0
  142. package/dist/esm/runtime.d.ts +185 -0
  143. package/dist/esm/runtime.js +354 -0
  144. package/dist/index.d.ts +3 -0
  145. package/dist/index.js +21 -0
  146. package/dist/models/Balance.d.ts +65 -0
  147. package/dist/models/Balance.js +70 -0
  148. package/dist/models/ChatChoice.d.ts +55 -0
  149. package/dist/models/ChatChoice.js +63 -0
  150. package/dist/models/ChatCompletionRequest.d.ts +64 -0
  151. package/dist/models/ChatCompletionRequest.js +64 -0
  152. package/dist/models/ChatCompletionResponse.d.ts +71 -0
  153. package/dist/models/ChatCompletionResponse.js +81 -0
  154. package/dist/models/ChatMessage.d.ts +47 -0
  155. package/dist/models/ChatMessage.js +63 -0
  156. package/dist/models/CreateCryptoDepositRequest.d.ts +64 -0
  157. package/dist/models/CreateCryptoDepositRequest.js +76 -0
  158. package/dist/models/CreateWebhookEndpointRequest.d.ts +50 -0
  159. package/dist/models/CreateWebhookEndpointRequest.js +66 -0
  160. package/dist/models/CryptoDeposit.d.ts +114 -0
  161. package/dist/models/CryptoDeposit.js +98 -0
  162. package/dist/models/Embedding.d.ts +51 -0
  163. package/dist/models/Embedding.js +67 -0
  164. package/dist/models/EmbeddingsRequest.d.ts +64 -0
  165. package/dist/models/EmbeddingsRequest.js +68 -0
  166. package/dist/models/EmbeddingsRequestInput.d.ts +21 -0
  167. package/dist/models/EmbeddingsRequestInput.js +53 -0
  168. package/dist/models/EmbeddingsResponse.d.ts +59 -0
  169. package/dist/models/EmbeddingsResponse.js +73 -0
  170. package/dist/models/EmbeddingsUsage.d.ts +38 -0
  171. package/dist/models/EmbeddingsUsage.js +54 -0
  172. package/dist/models/GetHealth200Response.d.ts +39 -0
  173. package/dist/models/GetHealth200Response.js +55 -0
  174. package/dist/models/ImagesGenerationsRequest.d.ts +63 -0
  175. package/dist/models/ImagesGenerationsRequest.js +67 -0
  176. package/dist/models/ImagesResponse.d.ts +46 -0
  177. package/dist/models/ImagesResponse.js +60 -0
  178. package/dist/models/ImagesResponseDataInner.d.ts +32 -0
  179. package/dist/models/ImagesResponseDataInner.js +50 -0
  180. package/dist/models/ImagesResponseUsage.d.ts +32 -0
  181. package/dist/models/ImagesResponseUsage.js +50 -0
  182. package/dist/models/InferencePreflight.d.ts +92 -0
  183. package/dist/models/InferencePreflight.js +94 -0
  184. package/dist/models/ListDeposits200Response.d.ts +39 -0
  185. package/dist/models/ListDeposits200Response.js +55 -0
  186. package/dist/models/Model.d.ts +152 -0
  187. package/dist/models/Model.js +118 -0
  188. package/dist/models/ModelList.d.ts +46 -0
  189. package/dist/models/ModelList.js +64 -0
  190. package/dist/models/ModelParametersInner.d.ts +72 -0
  191. package/dist/models/ModelParametersInner.js +72 -0
  192. package/dist/models/ModelPricing.d.ts +126 -0
  193. package/dist/models/ModelPricing.js +86 -0
  194. package/dist/models/ModelRate.d.ts +62 -0
  195. package/dist/models/ModelRate.js +58 -0
  196. package/dist/models/OpenAIErrorEnvelope.d.ts +33 -0
  197. package/dist/models/OpenAIErrorEnvelope.js +51 -0
  198. package/dist/models/OpenAIErrorEnvelopeError.d.ts +50 -0
  199. package/dist/models/OpenAIErrorEnvelopeError.js +60 -0
  200. package/dist/models/Operation.d.ts +107 -0
  201. package/dist/models/Operation.js +94 -0
  202. package/dist/models/OperationError.d.ts +38 -0
  203. package/dist/models/OperationError.js +50 -0
  204. package/dist/models/OperationResult.d.ts +44 -0
  205. package/dist/models/OperationResult.js +52 -0
  206. package/dist/models/PeakWindow.d.ts +38 -0
  207. package/dist/models/PeakWindow.js +54 -0
  208. package/dist/models/Problem.d.ts +87 -0
  209. package/dist/models/Problem.js +95 -0
  210. package/dist/models/SpendingLimit.d.ts +101 -0
  211. package/dist/models/SpendingLimit.js +93 -0
  212. package/dist/models/StreamOptions.d.ts +32 -0
  213. package/dist/models/StreamOptions.js +48 -0
  214. package/dist/models/Subscription.d.ts +78 -0
  215. package/dist/models/Subscription.js +75 -0
  216. package/dist/models/SubscriptionCheckoutRequest.d.ts +45 -0
  217. package/dist/models/SubscriptionCheckoutRequest.js +52 -0
  218. package/dist/models/SubscriptionCheckoutSession.d.ts +45 -0
  219. package/dist/models/SubscriptionCheckoutSession.js +59 -0
  220. package/dist/models/SubscriptionPlan.d.ts +46 -0
  221. package/dist/models/SubscriptionPlan.js +57 -0
  222. package/dist/models/SubscriptionPortalRequest.d.ts +32 -0
  223. package/dist/models/SubscriptionPortalRequest.js +48 -0
  224. package/dist/models/SubscriptionPortalSession.d.ts +32 -0
  225. package/dist/models/SubscriptionPortalSession.js +50 -0
  226. package/dist/models/SubscriptionPrice.d.ts +53 -0
  227. package/dist/models/SubscriptionPrice.js +62 -0
  228. package/dist/models/SubscriptionQuota.d.ts +60 -0
  229. package/dist/models/SubscriptionQuota.js +66 -0
  230. package/dist/models/SubscriptionUsage.d.ts +65 -0
  231. package/dist/models/SubscriptionUsage.js +70 -0
  232. package/dist/models/UpdateSpendingLimitRequest.d.ts +59 -0
  233. package/dist/models/UpdateSpendingLimitRequest.js +65 -0
  234. package/dist/models/Usage.d.ts +44 -0
  235. package/dist/models/Usage.js +58 -0
  236. package/dist/models/UsageBucket.d.ts +56 -0
  237. package/dist/models/UsageBucket.js +62 -0
  238. package/dist/models/UsagePage.d.ts +39 -0
  239. package/dist/models/UsagePage.js +55 -0
  240. package/dist/models/VideoCreateRequest.d.ts +50 -0
  241. package/dist/models/VideoCreateRequest.js +58 -0
  242. package/dist/models/VideoJob.d.ts +117 -0
  243. package/dist/models/VideoJob.js +102 -0
  244. package/dist/models/VideoList.d.ts +52 -0
  245. package/dist/models/VideoList.js +68 -0
  246. package/dist/models/WebhookEndpoint.d.ts +74 -0
  247. package/dist/models/WebhookEndpoint.js +80 -0
  248. package/dist/models/WebhookEndpointPage.d.ts +39 -0
  249. package/dist/models/WebhookEndpointPage.js +55 -0
  250. package/dist/models/index.d.ts +52 -0
  251. package/dist/models/index.js +70 -0
  252. package/dist/runtime.d.ts +185 -0
  253. package/dist/runtime.js +371 -0
  254. package/docs/Balance.md +45 -0
  255. package/docs/BillingApi.md +657 -0
  256. package/docs/ChatChoice.md +38 -0
  257. package/docs/ChatCompletionRequest.md +44 -0
  258. package/docs/ChatCompletionResponse.md +44 -0
  259. package/docs/ChatMessage.md +36 -0
  260. package/docs/CreateCryptoDepositRequest.md +38 -0
  261. package/docs/CreateWebhookEndpointRequest.md +36 -0
  262. package/docs/CryptoDeposit.md +55 -0
  263. package/docs/Embedding.md +38 -0
  264. package/docs/EmbeddingsRequest.md +42 -0
  265. package/docs/EmbeddingsRequestInput.md +33 -0
  266. package/docs/EmbeddingsResponse.md +40 -0
  267. package/docs/EmbeddingsUsage.md +37 -0
  268. package/docs/GetHealth200Response.md +34 -0
  269. package/docs/ImagesGenerationsRequest.md +42 -0
  270. package/docs/ImagesResponse.md +38 -0
  271. package/docs/ImagesResponseDataInner.md +34 -0
  272. package/docs/ImagesResponseUsage.md +34 -0
  273. package/docs/InferenceApi.md +861 -0
  274. package/docs/InferencePreflight.md +47 -0
  275. package/docs/ListDeposits200Response.md +36 -0
  276. package/docs/MetaApi.md +126 -0
  277. package/docs/Model.md +64 -0
  278. package/docs/ModelList.md +36 -0
  279. package/docs/ModelParametersInner.md +44 -0
  280. package/docs/ModelPricing.md +62 -0
  281. package/docs/ModelRate.md +45 -0
  282. package/docs/OpenAIErrorEnvelope.md +34 -0
  283. package/docs/OpenAIErrorEnvelopeError.md +40 -0
  284. package/docs/Operation.md +52 -0
  285. package/docs/OperationError.md +36 -0
  286. package/docs/OperationResult.md +39 -0
  287. package/docs/OperationsApi.md +80 -0
  288. package/docs/PeakWindow.md +37 -0
  289. package/docs/Problem.md +44 -0
  290. package/docs/SpendingLimit.md +54 -0
  291. package/docs/StreamOptions.md +34 -0
  292. package/docs/Subscription.md +49 -0
  293. package/docs/SubscriptionCheckoutRequest.md +39 -0
  294. package/docs/SubscriptionCheckoutSession.md +38 -0
  295. package/docs/SubscriptionPlan.md +39 -0
  296. package/docs/SubscriptionPortalRequest.md +35 -0
  297. package/docs/SubscriptionPortalSession.md +34 -0
  298. package/docs/SubscriptionPrice.md +41 -0
  299. package/docs/SubscriptionQuota.md +43 -0
  300. package/docs/SubscriptionUsage.md +45 -0
  301. package/docs/UpdateSpendingLimitRequest.md +40 -0
  302. package/docs/Usage.md +38 -0
  303. package/docs/UsageApi.md +95 -0
  304. package/docs/UsageBucket.md +42 -0
  305. package/docs/UsagePage.md +36 -0
  306. package/docs/VideoCreateRequest.md +40 -0
  307. package/docs/VideoJob.md +56 -0
  308. package/docs/VideoList.md +38 -0
  309. package/docs/WebhookEndpoint.md +44 -0
  310. package/docs/WebhookEndpointPage.md +36 -0
  311. package/docs/WebhooksApi.md +302 -0
  312. package/package.json +16 -7
  313. package/src/apis/BillingApi.ts +559 -0
  314. package/src/apis/InferenceApi.ts +753 -0
  315. package/src/apis/MetaApi.ts +103 -0
  316. package/src/apis/OperationsApi.ts +89 -0
  317. package/src/apis/UsageApi.ts +129 -0
  318. package/src/apis/WebhooksApi.ts +277 -0
  319. package/src/apis/index.ts +8 -0
  320. package/src/index.ts +5 -0
  321. package/src/models/Balance.ts +114 -0
  322. package/src/models/ChatChoice.ts +102 -0
  323. package/src/models/ChatCompletionRequest.ts +122 -0
  324. package/src/models/ChatCompletionResponse.ts +138 -0
  325. package/src/models/ChatMessage.ts +87 -0
  326. package/src/models/CreateCryptoDepositRequest.ts +108 -0
  327. package/src/models/CreateWebhookEndpointRequest.ts +90 -0
  328. package/src/models/CryptoDeposit.ts +177 -0
  329. package/src/models/Embedding.ts +96 -0
  330. package/src/models/EmbeddingsRequest.ts +117 -0
  331. package/src/models/EmbeddingsRequestInput.ts +59 -0
  332. package/src/models/EmbeddingsResponse.ts +120 -0
  333. package/src/models/EmbeddingsUsage.ts +75 -0
  334. package/src/models/GetHealth200Response.ts +75 -0
  335. package/src/models/ImagesGenerationsRequest.ts +109 -0
  336. package/src/models/ImagesResponse.ts +99 -0
  337. package/src/models/ImagesResponseDataInner.ts +66 -0
  338. package/src/models/ImagesResponseUsage.ts +66 -0
  339. package/src/models/InferencePreflight.ts +147 -0
  340. package/src/models/ListDeposits200Response.ts +83 -0
  341. package/src/models/Model.ts +241 -0
  342. package/src/models/ModelList.ts +95 -0
  343. package/src/models/ModelParametersInner.ts +120 -0
  344. package/src/models/ModelPricing.ts +203 -0
  345. package/src/models/ModelRate.ts +105 -0
  346. package/src/models/OpenAIErrorEnvelope.ts +74 -0
  347. package/src/models/OpenAIErrorEnvelopeError.ts +92 -0
  348. package/src/models/Operation.ts +179 -0
  349. package/src/models/OperationError.ts +73 -0
  350. package/src/models/OperationResult.ts +81 -0
  351. package/src/models/PeakWindow.ts +75 -0
  352. package/src/models/Problem.ts +139 -0
  353. package/src/models/SpendingLimit.ts +165 -0
  354. package/src/models/StreamOptions.ts +65 -0
  355. package/src/models/Subscription.ts +149 -0
  356. package/src/models/SubscriptionCheckoutRequest.ts +82 -0
  357. package/src/models/SubscriptionCheckoutSession.ts +92 -0
  358. package/src/models/SubscriptionPlan.ts +92 -0
  359. package/src/models/SubscriptionPortalRequest.ts +65 -0
  360. package/src/models/SubscriptionPortalSession.ts +66 -0
  361. package/src/models/SubscriptionPrice.ts +96 -0
  362. package/src/models/SubscriptionQuota.ts +106 -0
  363. package/src/models/SubscriptionUsage.ts +114 -0
  364. package/src/models/UpdateSpendingLimitRequest.ts +102 -0
  365. package/src/models/Usage.ts +84 -0
  366. package/src/models/UsageBucket.ts +100 -0
  367. package/src/models/UsagePage.ts +83 -0
  368. package/src/models/VideoCreateRequest.ts +91 -0
  369. package/src/models/VideoJob.ts +184 -0
  370. package/src/models/VideoList.ts +104 -0
  371. package/src/models/WebhookEndpoint.ts +125 -0
  372. package/src/models/WebhookEndpointPage.ts +83 -0
  373. package/src/models/index.ts +54 -0
  374. package/src/runtime.ts +454 -0
  375. package/tsconfig.esm.json +7 -0
  376. 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&#x3D;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 &#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.
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 (&#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.
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 &#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.
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 \&quot;what happens if I call this model right now?\&quot; 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 &#x60;serverless:read&#x60; 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\&#39;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\&#39;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 &#x60;plan_covered&#x60; is false for a video model even if an operator has placed it on the plan\&#39;s covered list. That is a deliberate divergence from the same-named field on &#x60;/v1/models&#x60;, which reports the platform\&#39;s configuration. Here it means \&quot;the plan covers this REQUEST\&quot; — describing what will happen is the entire job of a preflight. One caveat on \&quot;read-only\&quot;: resolving the balance creates the organization\&#39;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 &#x60;warn&#x60; / &#x60;not_plan_covered&#x60;. 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. &#x60;funded&#x60; is a boolean and never a figure. This route is on the inference read scope, so it must not disclose the organization\&#39;s balance; use &#x60;/billing/balance&#x60; for the number. Failure posture is the opposite of the request gate\&#39;s: any gate that cannot be read degrades the verdict toward &#x60;ok&#x60;, never toward &#x60;block&#x60;. A false &#x60;block&#x60; would stop a customer whose request would have succeeded, while a false &#x60;ok&#x60; 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 &#x60;:economy&#x60; 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
+