@deeprelay/sdk 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (514) hide show
  1. package/.openapi-generator/FILES +66 -0
  2. package/README.md +47 -11
  3. package/dist/apis/AlertsApi.d.ts +50 -0
  4. package/dist/apis/AlertsApi.js +127 -0
  5. package/dist/apis/ApiKeysApi.d.ts +107 -0
  6. package/dist/apis/ApiKeysApi.js +284 -0
  7. package/dist/apis/BillingApi.d.ts +25 -7
  8. package/dist/apis/BillingApi.js +57 -7
  9. package/dist/apis/InferenceApi.d.ts +12 -1
  10. package/dist/apis/InferenceApi.js +22 -1
  11. package/dist/apis/MetaApi.d.ts +1 -1
  12. package/dist/apis/MetaApi.js +1 -1
  13. package/dist/apis/RequestsApi.d.ts +130 -0
  14. package/dist/apis/RequestsApi.js +269 -0
  15. package/dist/apis/UsageApi.d.ts +15 -1
  16. package/dist/apis/UsageApi.js +19 -2
  17. package/dist/apis/WebhooksApi.d.ts +1 -1
  18. package/dist/apis/WebhooksApi.js +1 -1
  19. package/dist/apis/index.d.ts +3 -0
  20. package/dist/apis/index.js +3 -0
  21. package/dist/esm/apis/AlertsApi.d.ts +50 -0
  22. package/dist/esm/apis/AlertsApi.js +123 -0
  23. package/dist/esm/apis/ApiKeysApi.d.ts +107 -0
  24. package/dist/esm/apis/ApiKeysApi.js +280 -0
  25. package/dist/esm/apis/BillingApi.d.ts +25 -7
  26. package/dist/esm/apis/BillingApi.js +57 -7
  27. package/dist/esm/apis/InferenceApi.d.ts +12 -1
  28. package/dist/esm/apis/InferenceApi.js +22 -1
  29. package/dist/esm/apis/MetaApi.d.ts +1 -1
  30. package/dist/esm/apis/MetaApi.js +1 -1
  31. package/dist/esm/apis/RequestsApi.d.ts +130 -0
  32. package/dist/esm/apis/RequestsApi.js +265 -0
  33. package/dist/esm/apis/UsageApi.d.ts +15 -1
  34. package/dist/esm/apis/UsageApi.js +18 -1
  35. package/dist/esm/apis/WebhooksApi.d.ts +1 -1
  36. package/dist/esm/apis/WebhooksApi.js +1 -1
  37. package/dist/esm/apis/index.d.ts +3 -0
  38. package/dist/esm/apis/index.js +3 -0
  39. package/dist/esm/models/AlertEmailToggles.d.ts +50 -0
  40. package/dist/esm/models/AlertEmailToggles.js +55 -0
  41. package/dist/esm/models/AlertSettings.d.ts +51 -0
  42. package/dist/esm/models/AlertSettings.js +56 -0
  43. package/dist/esm/models/AlertSettingsUpdate.d.ts +39 -0
  44. package/dist/esm/models/AlertSettingsUpdate.js +48 -0
  45. package/dist/esm/models/ApiKey.d.ts +123 -0
  46. package/dist/esm/models/ApiKey.js +96 -0
  47. package/dist/esm/models/ApiKeyCreate.d.ts +70 -0
  48. package/dist/esm/models/ApiKeyCreate.js +57 -0
  49. package/dist/esm/models/ApiKeyCreated.d.ts +129 -0
  50. package/dist/esm/models/ApiKeyCreated.js +100 -0
  51. package/dist/esm/models/ApiKeyList.d.ts +33 -0
  52. package/dist/esm/models/ApiKeyList.js +44 -0
  53. package/dist/esm/models/ApiKeyScopes.d.ts +65 -0
  54. package/dist/esm/models/ApiKeyScopes.js +66 -0
  55. package/dist/esm/models/ApiKeyUpdate.d.ts +62 -0
  56. package/dist/esm/models/ApiKeyUpdate.js +51 -0
  57. package/dist/esm/models/Balance.d.ts +1 -1
  58. package/dist/esm/models/Balance.js +1 -1
  59. package/dist/esm/models/ChatChoice.d.ts +11 -1
  60. package/dist/esm/models/ChatChoice.js +3 -1
  61. package/dist/esm/models/ChatCompletionRequest.d.ts +78 -2
  62. package/dist/esm/models/ChatCompletionRequest.js +26 -1
  63. package/dist/esm/models/ChatCompletionRequestResponseFormat.d.ts +31 -0
  64. package/dist/esm/models/ChatCompletionRequestResponseFormat.js +52 -0
  65. package/dist/esm/models/ChatCompletionRequestToolChoice.d.ts +23 -0
  66. package/dist/esm/models/ChatCompletionRequestToolChoice.js +50 -0
  67. package/dist/esm/models/ChatCompletionResponse.d.ts +1 -1
  68. package/dist/esm/models/ChatCompletionResponse.js +1 -1
  69. package/dist/esm/models/ChatMessage.d.ts +22 -2
  70. package/dist/esm/models/ChatMessage.js +10 -5
  71. package/dist/esm/models/CostDetails.d.ts +59 -0
  72. package/dist/esm/models/CostDetails.js +59 -0
  73. package/dist/esm/models/CreateCryptoDepositRequest.d.ts +4 -1
  74. package/dist/esm/models/CreateCryptoDepositRequest.js +4 -2
  75. package/dist/esm/models/CreateWebhookEndpointRequest.d.ts +5 -1
  76. package/dist/esm/models/CreateWebhookEndpointRequest.js +6 -2
  77. package/dist/esm/models/CryptoDeposit.d.ts +3 -1
  78. package/dist/esm/models/CryptoDeposit.js +4 -2
  79. package/dist/esm/models/Embedding.d.ts +1 -1
  80. package/dist/esm/models/Embedding.js +1 -1
  81. package/dist/esm/models/EmbeddingsRequest.d.ts +1 -1
  82. package/dist/esm/models/EmbeddingsRequest.js +1 -1
  83. package/dist/esm/models/EmbeddingsRequestInput.d.ts +1 -1
  84. package/dist/esm/models/EmbeddingsRequestInput.js +1 -1
  85. package/dist/esm/models/EmbeddingsResponse.d.ts +1 -1
  86. package/dist/esm/models/EmbeddingsResponse.js +1 -1
  87. package/dist/esm/models/EmbeddingsUsage.d.ts +1 -1
  88. package/dist/esm/models/EmbeddingsUsage.js +1 -1
  89. package/dist/esm/models/GetHealth200Response.d.ts +1 -1
  90. package/dist/esm/models/GetHealth200Response.js +1 -1
  91. package/dist/esm/models/ImagesGenerationsRequest.d.ts +2 -2
  92. package/dist/esm/models/ImagesGenerationsRequest.js +1 -1
  93. package/dist/esm/models/ImagesResponse.d.ts +1 -1
  94. package/dist/esm/models/ImagesResponse.js +1 -1
  95. package/dist/esm/models/ImagesResponseDataInner.d.ts +1 -1
  96. package/dist/esm/models/ImagesResponseDataInner.js +1 -1
  97. package/dist/esm/models/ImagesResponseUsage.d.ts +1 -1
  98. package/dist/esm/models/ImagesResponseUsage.js +1 -1
  99. package/dist/esm/models/InferencePreflight.d.ts +5 -2
  100. package/dist/esm/models/InferencePreflight.js +4 -1
  101. package/dist/esm/models/JSONSchemaFormat.d.ts +54 -0
  102. package/dist/esm/models/JSONSchemaFormat.js +49 -0
  103. package/dist/esm/models/ListDeposits200Response.d.ts +1 -1
  104. package/dist/esm/models/ListDeposits200Response.js +1 -1
  105. package/dist/esm/models/Model.d.ts +54 -5
  106. package/dist/esm/models/Model.js +21 -2
  107. package/dist/esm/models/ModelList.d.ts +1 -1
  108. package/dist/esm/models/ModelList.js +1 -1
  109. package/dist/esm/models/ModelMetrics.d.ts +101 -0
  110. package/dist/esm/models/ModelMetrics.js +85 -0
  111. package/dist/esm/models/ModelParametersInner.d.ts +1 -1
  112. package/dist/esm/models/ModelParametersInner.js +1 -1
  113. package/dist/esm/models/ModelPricing.d.ts +1 -1
  114. package/dist/esm/models/ModelPricing.js +1 -1
  115. package/dist/esm/models/ModelRate.d.ts +1 -1
  116. package/dist/esm/models/ModelRate.js +1 -1
  117. package/dist/esm/models/OpenAIErrorEnvelope.d.ts +1 -1
  118. package/dist/esm/models/OpenAIErrorEnvelope.js +1 -1
  119. package/dist/esm/models/OpenAIErrorEnvelopeError.d.ts +8 -2
  120. package/dist/esm/models/OpenAIErrorEnvelopeError.js +3 -1
  121. package/dist/esm/models/PeakWindow.d.ts +1 -1
  122. package/dist/esm/models/PeakWindow.js +1 -1
  123. package/dist/esm/models/Problem.d.ts +22 -1
  124. package/dist/esm/models/Problem.js +14 -1
  125. package/dist/esm/models/RefereeStatus.d.ts +1 -1
  126. package/dist/esm/models/RefereeStatus.js +1 -1
  127. package/dist/esm/models/Referral.d.ts +14 -2
  128. package/dist/esm/models/Referral.js +9 -1
  129. package/dist/esm/models/RequestLogEntry.d.ts +210 -0
  130. package/dist/esm/models/RequestLogEntry.js +129 -0
  131. package/dist/esm/models/RequestLogPage.d.ts +45 -0
  132. package/dist/esm/models/RequestLogPage.js +52 -0
  133. package/dist/esm/models/ResponseFormatJSONObject.d.ts +39 -0
  134. package/dist/esm/models/ResponseFormatJSONObject.js +51 -0
  135. package/dist/esm/models/ResponseFormatJSONSchema.d.ts +46 -0
  136. package/dist/esm/models/ResponseFormatJSONSchema.js +56 -0
  137. package/dist/esm/models/ResponseFormatText.d.ts +39 -0
  138. package/dist/esm/models/ResponseFormatText.js +51 -0
  139. package/dist/esm/models/SpendingLimit.d.ts +1 -1
  140. package/dist/esm/models/SpendingLimit.js +1 -1
  141. package/dist/esm/models/StreamOptions.d.ts +1 -1
  142. package/dist/esm/models/StreamOptions.js +1 -1
  143. package/dist/esm/models/Subscription.d.ts +9 -2
  144. package/dist/esm/models/Subscription.js +6 -1
  145. package/dist/esm/models/SubscriptionCheckoutRequest.d.ts +18 -4
  146. package/dist/esm/models/SubscriptionCheckoutRequest.js +10 -1
  147. package/dist/esm/models/SubscriptionCheckoutSession.d.ts +21 -1
  148. package/dist/esm/models/SubscriptionCheckoutSession.js +12 -1
  149. package/dist/esm/models/SubscriptionModelUsage.d.ts +68 -0
  150. package/dist/esm/models/SubscriptionModelUsage.js +67 -0
  151. package/dist/esm/models/SubscriptionPlan.d.ts +4 -4
  152. package/dist/esm/models/SubscriptionPlan.js +1 -1
  153. package/dist/esm/models/SubscriptionPortalRequest.d.ts +1 -1
  154. package/dist/esm/models/SubscriptionPortalRequest.js +1 -1
  155. package/dist/esm/models/SubscriptionPortalSession.d.ts +1 -1
  156. package/dist/esm/models/SubscriptionPortalSession.js +1 -1
  157. package/dist/esm/models/SubscriptionPrice.d.ts +1 -1
  158. package/dist/esm/models/SubscriptionPrice.js +1 -1
  159. package/dist/esm/models/SubscriptionQuota.d.ts +10 -4
  160. package/dist/esm/models/SubscriptionQuota.js +8 -4
  161. package/dist/esm/models/SubscriptionTier.d.ts +53 -0
  162. package/dist/esm/models/SubscriptionTier.js +55 -0
  163. package/dist/esm/models/SubscriptionUpgradeRequest.d.ts +32 -0
  164. package/dist/esm/models/SubscriptionUpgradeRequest.js +43 -0
  165. package/dist/esm/models/SubscriptionUsage.d.ts +28 -3
  166. package/dist/esm/models/SubscriptionUsage.js +15 -4
  167. package/dist/esm/models/Tool.d.ts +46 -0
  168. package/dist/esm/models/Tool.js +56 -0
  169. package/dist/esm/models/ToolCall.d.ts +60 -0
  170. package/dist/esm/models/ToolCall.js +56 -0
  171. package/dist/esm/models/ToolCallFunction.d.ts +39 -0
  172. package/dist/esm/models/ToolCallFunction.js +47 -0
  173. package/dist/esm/models/ToolChoiceFunction.d.ts +46 -0
  174. package/dist/esm/models/ToolChoiceFunction.js +56 -0
  175. package/dist/esm/models/ToolChoiceFunctionFunction.d.ts +32 -0
  176. package/dist/esm/models/ToolChoiceFunctionFunction.js +43 -0
  177. package/dist/esm/models/ToolFunction.d.ts +47 -0
  178. package/dist/esm/models/ToolFunction.js +47 -0
  179. package/dist/esm/models/UpdateSpendingLimitRequest.d.ts +1 -1
  180. package/dist/esm/models/UpdateSpendingLimitRequest.js +1 -1
  181. package/dist/esm/models/Usage.d.ts +29 -1
  182. package/dist/esm/models/Usage.js +12 -1
  183. package/dist/esm/models/UsageBucket.d.ts +39 -6
  184. package/dist/esm/models/UsageBucket.js +11 -1
  185. package/dist/esm/models/UsageCompletionTokensDetails.d.ts +32 -0
  186. package/dist/esm/models/UsageCompletionTokensDetails.js +41 -0
  187. package/dist/esm/models/UsagePage.d.ts +2 -1
  188. package/dist/esm/models/UsagePage.js +1 -1
  189. package/dist/esm/models/UsagePromptTokensDetails.d.ts +33 -0
  190. package/dist/esm/models/UsagePromptTokensDetails.js +41 -0
  191. package/dist/esm/models/VideoCreateRequest.d.ts +1 -1
  192. package/dist/esm/models/VideoCreateRequest.js +1 -1
  193. package/dist/esm/models/VideoJob.d.ts +1 -1
  194. package/dist/esm/models/VideoJob.js +1 -1
  195. package/dist/esm/models/VideoList.d.ts +1 -1
  196. package/dist/esm/models/VideoList.js +1 -1
  197. package/dist/esm/models/WebhookEndpoint.d.ts +5 -1
  198. package/dist/esm/models/WebhookEndpoint.js +6 -2
  199. package/dist/esm/models/WebhookEndpointPage.d.ts +1 -1
  200. package/dist/esm/models/WebhookEndpointPage.js +1 -1
  201. package/dist/esm/models/index.d.ts +30 -0
  202. package/dist/esm/models/index.js +30 -0
  203. package/dist/esm/runtime.d.ts +1 -1
  204. package/dist/esm/runtime.js +2 -2
  205. package/dist/models/AlertEmailToggles.d.ts +50 -0
  206. package/dist/models/AlertEmailToggles.js +62 -0
  207. package/dist/models/AlertSettings.d.ts +51 -0
  208. package/dist/models/AlertSettings.js +63 -0
  209. package/dist/models/AlertSettingsUpdate.d.ts +39 -0
  210. package/dist/models/AlertSettingsUpdate.js +55 -0
  211. package/dist/models/ApiKey.d.ts +123 -0
  212. package/dist/models/ApiKey.js +103 -0
  213. package/dist/models/ApiKeyCreate.d.ts +70 -0
  214. package/dist/models/ApiKeyCreate.js +64 -0
  215. package/dist/models/ApiKeyCreated.d.ts +129 -0
  216. package/dist/models/ApiKeyCreated.js +107 -0
  217. package/dist/models/ApiKeyList.d.ts +33 -0
  218. package/dist/models/ApiKeyList.js +51 -0
  219. package/dist/models/ApiKeyScopes.d.ts +65 -0
  220. package/dist/models/ApiKeyScopes.js +74 -0
  221. package/dist/models/ApiKeyUpdate.d.ts +62 -0
  222. package/dist/models/ApiKeyUpdate.js +58 -0
  223. package/dist/models/Balance.d.ts +1 -1
  224. package/dist/models/Balance.js +1 -1
  225. package/dist/models/ChatChoice.d.ts +11 -1
  226. package/dist/models/ChatChoice.js +3 -1
  227. package/dist/models/ChatCompletionRequest.d.ts +78 -2
  228. package/dist/models/ChatCompletionRequest.js +26 -1
  229. package/dist/models/ChatCompletionRequestResponseFormat.d.ts +31 -0
  230. package/dist/models/ChatCompletionRequestResponseFormat.js +58 -0
  231. package/dist/models/ChatCompletionRequestToolChoice.d.ts +23 -0
  232. package/dist/models/ChatCompletionRequestToolChoice.js +56 -0
  233. package/dist/models/ChatCompletionResponse.d.ts +1 -1
  234. package/dist/models/ChatCompletionResponse.js +1 -1
  235. package/dist/models/ChatMessage.d.ts +22 -2
  236. package/dist/models/ChatMessage.js +10 -5
  237. package/dist/models/CostDetails.d.ts +59 -0
  238. package/dist/models/CostDetails.js +66 -0
  239. package/dist/models/CreateCryptoDepositRequest.d.ts +4 -1
  240. package/dist/models/CreateCryptoDepositRequest.js +4 -2
  241. package/dist/models/CreateWebhookEndpointRequest.d.ts +5 -1
  242. package/dist/models/CreateWebhookEndpointRequest.js +6 -2
  243. package/dist/models/CryptoDeposit.d.ts +3 -1
  244. package/dist/models/CryptoDeposit.js +4 -2
  245. package/dist/models/Embedding.d.ts +1 -1
  246. package/dist/models/Embedding.js +1 -1
  247. package/dist/models/EmbeddingsRequest.d.ts +1 -1
  248. package/dist/models/EmbeddingsRequest.js +1 -1
  249. package/dist/models/EmbeddingsRequestInput.d.ts +1 -1
  250. package/dist/models/EmbeddingsRequestInput.js +1 -1
  251. package/dist/models/EmbeddingsResponse.d.ts +1 -1
  252. package/dist/models/EmbeddingsResponse.js +1 -1
  253. package/dist/models/EmbeddingsUsage.d.ts +1 -1
  254. package/dist/models/EmbeddingsUsage.js +1 -1
  255. package/dist/models/GetHealth200Response.d.ts +1 -1
  256. package/dist/models/GetHealth200Response.js +1 -1
  257. package/dist/models/ImagesGenerationsRequest.d.ts +2 -2
  258. package/dist/models/ImagesGenerationsRequest.js +1 -1
  259. package/dist/models/ImagesResponse.d.ts +1 -1
  260. package/dist/models/ImagesResponse.js +1 -1
  261. package/dist/models/ImagesResponseDataInner.d.ts +1 -1
  262. package/dist/models/ImagesResponseDataInner.js +1 -1
  263. package/dist/models/ImagesResponseUsage.d.ts +1 -1
  264. package/dist/models/ImagesResponseUsage.js +1 -1
  265. package/dist/models/InferencePreflight.d.ts +5 -2
  266. package/dist/models/InferencePreflight.js +4 -1
  267. package/dist/models/JSONSchemaFormat.d.ts +54 -0
  268. package/dist/models/JSONSchemaFormat.js +56 -0
  269. package/dist/models/ListDeposits200Response.d.ts +1 -1
  270. package/dist/models/ListDeposits200Response.js +1 -1
  271. package/dist/models/Model.d.ts +54 -5
  272. package/dist/models/Model.js +21 -2
  273. package/dist/models/ModelList.d.ts +1 -1
  274. package/dist/models/ModelList.js +1 -1
  275. package/dist/models/ModelMetrics.d.ts +101 -0
  276. package/dist/models/ModelMetrics.js +93 -0
  277. package/dist/models/ModelParametersInner.d.ts +1 -1
  278. package/dist/models/ModelParametersInner.js +1 -1
  279. package/dist/models/ModelPricing.d.ts +1 -1
  280. package/dist/models/ModelPricing.js +1 -1
  281. package/dist/models/ModelRate.d.ts +1 -1
  282. package/dist/models/ModelRate.js +1 -1
  283. package/dist/models/OpenAIErrorEnvelope.d.ts +1 -1
  284. package/dist/models/OpenAIErrorEnvelope.js +1 -1
  285. package/dist/models/OpenAIErrorEnvelopeError.d.ts +8 -2
  286. package/dist/models/OpenAIErrorEnvelopeError.js +3 -1
  287. package/dist/models/PeakWindow.d.ts +1 -1
  288. package/dist/models/PeakWindow.js +1 -1
  289. package/dist/models/Problem.d.ts +22 -1
  290. package/dist/models/Problem.js +14 -1
  291. package/dist/models/RefereeStatus.d.ts +1 -1
  292. package/dist/models/RefereeStatus.js +1 -1
  293. package/dist/models/Referral.d.ts +14 -2
  294. package/dist/models/Referral.js +9 -1
  295. package/dist/models/RequestLogEntry.d.ts +210 -0
  296. package/dist/models/RequestLogEntry.js +137 -0
  297. package/dist/models/RequestLogPage.d.ts +45 -0
  298. package/dist/models/RequestLogPage.js +59 -0
  299. package/dist/models/ResponseFormatJSONObject.d.ts +39 -0
  300. package/dist/models/ResponseFormatJSONObject.js +59 -0
  301. package/dist/models/ResponseFormatJSONSchema.d.ts +46 -0
  302. package/dist/models/ResponseFormatJSONSchema.js +64 -0
  303. package/dist/models/ResponseFormatText.d.ts +39 -0
  304. package/dist/models/ResponseFormatText.js +59 -0
  305. package/dist/models/SpendingLimit.d.ts +1 -1
  306. package/dist/models/SpendingLimit.js +1 -1
  307. package/dist/models/StreamOptions.d.ts +1 -1
  308. package/dist/models/StreamOptions.js +1 -1
  309. package/dist/models/Subscription.d.ts +9 -2
  310. package/dist/models/Subscription.js +6 -1
  311. package/dist/models/SubscriptionCheckoutRequest.d.ts +18 -4
  312. package/dist/models/SubscriptionCheckoutRequest.js +11 -1
  313. package/dist/models/SubscriptionCheckoutSession.d.ts +21 -1
  314. package/dist/models/SubscriptionCheckoutSession.js +13 -1
  315. package/dist/models/SubscriptionModelUsage.d.ts +68 -0
  316. package/dist/models/SubscriptionModelUsage.js +74 -0
  317. package/dist/models/SubscriptionPlan.d.ts +4 -4
  318. package/dist/models/SubscriptionPlan.js +1 -1
  319. package/dist/models/SubscriptionPortalRequest.d.ts +1 -1
  320. package/dist/models/SubscriptionPortalRequest.js +1 -1
  321. package/dist/models/SubscriptionPortalSession.d.ts +1 -1
  322. package/dist/models/SubscriptionPortalSession.js +1 -1
  323. package/dist/models/SubscriptionPrice.d.ts +1 -1
  324. package/dist/models/SubscriptionPrice.js +1 -1
  325. package/dist/models/SubscriptionQuota.d.ts +10 -4
  326. package/dist/models/SubscriptionQuota.js +8 -4
  327. package/dist/models/SubscriptionTier.d.ts +53 -0
  328. package/dist/models/SubscriptionTier.js +62 -0
  329. package/dist/models/SubscriptionUpgradeRequest.d.ts +32 -0
  330. package/dist/models/SubscriptionUpgradeRequest.js +50 -0
  331. package/dist/models/SubscriptionUsage.d.ts +28 -3
  332. package/dist/models/SubscriptionUsage.js +15 -4
  333. package/dist/models/Tool.d.ts +46 -0
  334. package/dist/models/Tool.js +64 -0
  335. package/dist/models/ToolCall.d.ts +60 -0
  336. package/dist/models/ToolCall.js +64 -0
  337. package/dist/models/ToolCallFunction.d.ts +39 -0
  338. package/dist/models/ToolCallFunction.js +54 -0
  339. package/dist/models/ToolChoiceFunction.d.ts +46 -0
  340. package/dist/models/ToolChoiceFunction.js +64 -0
  341. package/dist/models/ToolChoiceFunctionFunction.d.ts +32 -0
  342. package/dist/models/ToolChoiceFunctionFunction.js +50 -0
  343. package/dist/models/ToolFunction.d.ts +47 -0
  344. package/dist/models/ToolFunction.js +54 -0
  345. package/dist/models/UpdateSpendingLimitRequest.d.ts +1 -1
  346. package/dist/models/UpdateSpendingLimitRequest.js +1 -1
  347. package/dist/models/Usage.d.ts +29 -1
  348. package/dist/models/Usage.js +12 -1
  349. package/dist/models/UsageBucket.d.ts +39 -6
  350. package/dist/models/UsageBucket.js +11 -1
  351. package/dist/models/UsageCompletionTokensDetails.d.ts +32 -0
  352. package/dist/models/UsageCompletionTokensDetails.js +48 -0
  353. package/dist/models/UsagePage.d.ts +2 -1
  354. package/dist/models/UsagePage.js +1 -1
  355. package/dist/models/UsagePromptTokensDetails.d.ts +33 -0
  356. package/dist/models/UsagePromptTokensDetails.js +48 -0
  357. package/dist/models/VideoCreateRequest.d.ts +1 -1
  358. package/dist/models/VideoCreateRequest.js +1 -1
  359. package/dist/models/VideoJob.d.ts +1 -1
  360. package/dist/models/VideoJob.js +1 -1
  361. package/dist/models/VideoList.d.ts +1 -1
  362. package/dist/models/VideoList.js +1 -1
  363. package/dist/models/WebhookEndpoint.d.ts +5 -1
  364. package/dist/models/WebhookEndpoint.js +6 -2
  365. package/dist/models/WebhookEndpointPage.d.ts +1 -1
  366. package/dist/models/WebhookEndpointPage.js +1 -1
  367. package/dist/models/index.d.ts +30 -0
  368. package/dist/models/index.js +30 -0
  369. package/dist/runtime.d.ts +1 -1
  370. package/dist/runtime.js +2 -2
  371. package/docs/AlertEmailToggles.md +40 -0
  372. package/docs/AlertSettings.md +40 -0
  373. package/docs/AlertSettingsUpdate.md +36 -0
  374. package/docs/AlertsApi.md +151 -0
  375. package/docs/ApiKey.md +65 -0
  376. package/docs/ApiKeyCreate.md +46 -0
  377. package/docs/ApiKeyCreated.md +67 -0
  378. package/docs/ApiKeyList.md +34 -0
  379. package/docs/ApiKeyScopes.md +38 -0
  380. package/docs/ApiKeyUpdate.md +45 -0
  381. package/docs/ApiKeysApi.md +389 -0
  382. package/docs/BillingApi.md +83 -3
  383. package/docs/ChatChoice.md +2 -0
  384. package/docs/ChatCompletionRequest.md +22 -0
  385. package/docs/ChatCompletionRequestResponseFormat.md +37 -0
  386. package/docs/ChatCompletionRequestToolChoice.md +37 -0
  387. package/docs/ChatMessage.md +4 -0
  388. package/docs/CostDetails.md +43 -0
  389. package/docs/InferenceApi.md +94 -71
  390. package/docs/JSONSchemaFormat.md +41 -0
  391. package/docs/Model.md +16 -0
  392. package/docs/ModelMetrics.md +55 -0
  393. package/docs/OpenAIErrorEnvelopeError.md +2 -0
  394. package/docs/Problem.md +4 -0
  395. package/docs/Referral.md +6 -2
  396. package/docs/RequestLogEntry.md +87 -0
  397. package/docs/RequestLogPage.md +38 -0
  398. package/docs/RequestsApi.md +282 -0
  399. package/docs/ResponseFormatJSONObject.md +35 -0
  400. package/docs/ResponseFormatJSONSchema.md +36 -0
  401. package/docs/ResponseFormatText.md +34 -0
  402. package/docs/Subscription.md +3 -1
  403. package/docs/SubscriptionCheckoutRequest.md +2 -0
  404. package/docs/SubscriptionCheckoutSession.md +4 -0
  405. package/docs/SubscriptionModelUsage.md +47 -0
  406. package/docs/SubscriptionPlan.md +1 -1
  407. package/docs/SubscriptionQuota.md +5 -3
  408. package/docs/SubscriptionTier.md +41 -0
  409. package/docs/SubscriptionUpgradeRequest.md +34 -0
  410. package/docs/SubscriptionUsage.md +10 -2
  411. package/docs/Tool.md +36 -0
  412. package/docs/ToolCall.md +41 -0
  413. package/docs/ToolCallFunction.md +36 -0
  414. package/docs/ToolChoiceFunction.md +36 -0
  415. package/docs/ToolChoiceFunctionFunction.md +34 -0
  416. package/docs/ToolFunction.md +38 -0
  417. package/docs/Usage.md +8 -0
  418. package/docs/UsageApi.md +17 -9
  419. package/docs/UsageBucket.md +11 -0
  420. package/docs/UsageCompletionTokensDetails.md +34 -0
  421. package/docs/UsagePromptTokensDetails.md +35 -0
  422. package/package.json +1 -1
  423. package/src/apis/AlertsApi.ts +145 -0
  424. package/src/apis/ApiKeysApi.ts +357 -0
  425. package/src/apis/BillingApi.ts +73 -7
  426. package/src/apis/InferenceApi.ts +32 -1
  427. package/src/apis/MetaApi.ts +1 -1
  428. package/src/apis/RequestsApi.ts +335 -0
  429. package/src/apis/UsageApi.ts +23 -1
  430. package/src/apis/WebhooksApi.ts +1 -1
  431. package/src/apis/index.ts +3 -0
  432. package/src/models/AlertEmailToggles.ts +93 -0
  433. package/src/models/AlertSettings.ts +101 -0
  434. package/src/models/AlertSettingsUpdate.ts +83 -0
  435. package/src/models/ApiKey.ts +205 -0
  436. package/src/models/ApiKeyCreate.ts +115 -0
  437. package/src/models/ApiKeyCreated.ts +214 -0
  438. package/src/models/ApiKeyList.ts +74 -0
  439. package/src/models/ApiKeyScopes.ts +106 -0
  440. package/src/models/ApiKeyUpdate.ts +105 -0
  441. package/src/models/Balance.ts +1 -1
  442. package/src/models/ChatChoice.ts +11 -1
  443. package/src/models/ChatCompletionRequest.ts +118 -2
  444. package/src/models/ChatCompletionRequestResponseFormat.ts +84 -0
  445. package/src/models/ChatCompletionRequestToolChoice.ts +70 -0
  446. package/src/models/ChatCompletionResponse.ts +1 -1
  447. package/src/models/ChatMessage.ts +35 -5
  448. package/src/models/CostDetails.ts +105 -0
  449. package/src/models/CreateCryptoDepositRequest.ts +5 -2
  450. package/src/models/CreateWebhookEndpointRequest.ts +6 -2
  451. package/src/models/CryptoDeposit.ts +4 -2
  452. package/src/models/Embedding.ts +1 -1
  453. package/src/models/EmbeddingsRequest.ts +1 -1
  454. package/src/models/EmbeddingsRequestInput.ts +1 -1
  455. package/src/models/EmbeddingsResponse.ts +1 -1
  456. package/src/models/EmbeddingsUsage.ts +1 -1
  457. package/src/models/GetHealth200Response.ts +1 -1
  458. package/src/models/ImagesGenerationsRequest.ts +2 -2
  459. package/src/models/ImagesResponse.ts +1 -1
  460. package/src/models/ImagesResponseDataInner.ts +1 -1
  461. package/src/models/ImagesResponseUsage.ts +1 -1
  462. package/src/models/InferencePreflight.ts +5 -2
  463. package/src/models/JSONSchemaFormat.ts +92 -0
  464. package/src/models/ListDeposits200Response.ts +1 -1
  465. package/src/models/Model.ts +78 -6
  466. package/src/models/ModelList.ts +1 -1
  467. package/src/models/ModelMetrics.ts +165 -0
  468. package/src/models/ModelParametersInner.ts +1 -1
  469. package/src/models/ModelPricing.ts +1 -1
  470. package/src/models/ModelRate.ts +1 -1
  471. package/src/models/OpenAIErrorEnvelope.ts +1 -1
  472. package/src/models/OpenAIErrorEnvelopeError.ts +10 -2
  473. package/src/models/PeakWindow.ts +1 -1
  474. package/src/models/Problem.ts +26 -1
  475. package/src/models/RefereeStatus.ts +1 -1
  476. package/src/models/Referral.ts +20 -2
  477. package/src/models/RequestLogEntry.ts +307 -0
  478. package/src/models/RequestLogPage.ts +92 -0
  479. package/src/models/ResponseFormatJSONObject.ts +78 -0
  480. package/src/models/ResponseFormatJSONSchema.ts +95 -0
  481. package/src/models/ResponseFormatText.ts +78 -0
  482. package/src/models/SpendingLimit.ts +1 -1
  483. package/src/models/StreamOptions.ts +1 -1
  484. package/src/models/Subscription.ts +18 -2
  485. package/src/models/SubscriptionCheckoutRequest.ts +23 -4
  486. package/src/models/SubscriptionCheckoutSession.ts +28 -1
  487. package/src/models/SubscriptionModelUsage.ts +120 -0
  488. package/src/models/SubscriptionPlan.ts +4 -4
  489. package/src/models/SubscriptionPortalRequest.ts +1 -1
  490. package/src/models/SubscriptionPortalSession.ts +1 -1
  491. package/src/models/SubscriptionPrice.ts +1 -1
  492. package/src/models/SubscriptionQuota.ts +16 -7
  493. package/src/models/SubscriptionTier.ts +108 -0
  494. package/src/models/SubscriptionUpgradeRequest.ts +66 -0
  495. package/src/models/SubscriptionUsage.ts +47 -6
  496. package/src/models/Tool.ts +95 -0
  497. package/src/models/ToolCall.ts +110 -0
  498. package/src/models/ToolCallFunction.ts +76 -0
  499. package/src/models/ToolChoiceFunction.ts +95 -0
  500. package/src/models/ToolChoiceFunctionFunction.ts +66 -0
  501. package/src/models/ToolFunction.ts +83 -0
  502. package/src/models/UpdateSpendingLimitRequest.ts +1 -1
  503. package/src/models/Usage.ts +56 -1
  504. package/src/models/UsageBucket.ts +49 -6
  505. package/src/models/UsageCompletionTokensDetails.ts +65 -0
  506. package/src/models/UsagePage.ts +2 -1
  507. package/src/models/UsagePromptTokensDetails.ts +66 -0
  508. package/src/models/VideoCreateRequest.ts +1 -1
  509. package/src/models/VideoJob.ts +1 -1
  510. package/src/models/VideoList.ts +1 -1
  511. package/src/models/WebhookEndpoint.ts +6 -2
  512. package/src/models/WebhookEndpointPage.ts +1 -1
  513. package/src/models/index.ts +30 -0
  514. package/src/runtime.ts +2 -2
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable */
3
3
  /**
4
4
  * deeprelay Public Developer API
5
- * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
5
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
6
6
  *
7
7
  * The version of the OpenAPI document: 1.0.0
8
8
  * Contact: support@deeprelay.ai
@@ -20,6 +20,13 @@ import {
20
20
  SubscriptionPlanToJSON,
21
21
  SubscriptionPlanToJSONTyped,
22
22
  } from './SubscriptionPlan';
23
+ import type { SubscriptionTier } from './SubscriptionTier';
24
+ import {
25
+ SubscriptionTierFromJSON,
26
+ SubscriptionTierFromJSONTyped,
27
+ SubscriptionTierToJSON,
28
+ SubscriptionTierToJSONTyped,
29
+ } from './SubscriptionTier';
23
30
  import type { SubscriptionUsage } from './SubscriptionUsage';
24
31
  import {
25
32
  SubscriptionUsageFromJSON,
@@ -36,7 +43,7 @@ import {
36
43
  } from './SubscriptionQuota';
37
44
 
38
45
  /**
39
- * The organization's flat subscription tier: entitlement, billing period, the configured quota, and consumption against it. The console and this endpoint assemble it from the same source, so the two surfaces cannot report different numbers.
46
+ * The organization's subscription: entitlement, billing period, the plan it is on with that plan's configured quota, consumption against it, and the plans this deployment offers. The console and this endpoint assemble it from the same source, so the two surfaces cannot report different numbers.
40
47
  *
41
48
  * @export
42
49
  * @interface Subscription
@@ -90,6 +97,12 @@ export interface Subscription {
90
97
  * @memberof Subscription
91
98
  */
92
99
  usage?: SubscriptionUsage;
100
+ /**
101
+ * Every plan this deployment offers, smallest first (Base, then Plus when it is configured), each with its price and quota. The keys are the accepted `plan_key` values for checkout and upgrade. Empty when nothing can be bought here.
102
+ * @type {Array<SubscriptionTier>}
103
+ * @memberof Subscription
104
+ */
105
+ plans: Array<SubscriptionTier>;
93
106
  }
94
107
 
95
108
  /**
@@ -101,6 +114,7 @@ export function instanceOfSubscription(value: object): value is Subscription {
101
114
  if ((!('cancelAtPeriodEnd' in (value as Record<string, any>)) && !('cancel_at_period_end' in (value as Record<string, any>))) || ((value as Record<string, any>)['cancelAtPeriodEnd'] === undefined && (value as Record<string, any>)['cancel_at_period_end'] === undefined)) return false;
102
115
  if (!('plan' in value) || value['plan'] === undefined) return false;
103
116
  if (!('quota' in value) || value['quota'] === undefined) return false;
117
+ if (!('plans' in value) || value['plans'] === undefined) return false;
104
118
  return true;
105
119
  }
106
120
 
@@ -122,6 +136,7 @@ export function SubscriptionFromJSONTyped(json: any, ignoreDiscriminator: boolea
122
136
  'plan': SubscriptionPlanFromJSON(json['plan']),
123
137
  'quota': SubscriptionQuotaFromJSON(json['quota']),
124
138
  'usage': json['usage'] == null ? undefined : SubscriptionUsageFromJSON(json['usage']),
139
+ 'plans': ((json['plans'] as Array<any>).map(SubscriptionTierFromJSON)),
125
140
  };
126
141
  }
127
142
 
@@ -144,6 +159,7 @@ export function SubscriptionToJSONTyped(value?: Subscription | null, ignoreDiscr
144
159
  'plan': SubscriptionPlanToJSON(value['plan']),
145
160
  'quota': SubscriptionQuotaToJSON(value['quota']),
146
161
  'usage': SubscriptionUsageToJSON(value['usage']),
162
+ 'plans': ((value['plans'] as Array<any>).map(SubscriptionTierToJSON)),
147
163
  };
148
164
  }
149
165
 
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable */
3
3
  /**
4
4
  * deeprelay Public Developer API
5
- * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
5
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
6
6
  *
7
7
  * The version of the OpenAPI document: 1.0.0
8
8
  * Contact: support@deeprelay.ai
@@ -21,25 +21,42 @@ import { mapValues } from '../runtime';
21
21
  */
22
22
  export interface SubscriptionCheckoutRequest {
23
23
  /**
24
- * Where the provider returns after a completed payment. Defaults to the deployment's configured URL.
24
+ * Where the provider returns after a completed payment. Defaults to the deployment's configured URL. Must be on the deployment's dashboard origin, else 422 `validation_failed`.
25
25
  * @type {string}
26
26
  * @memberof SubscriptionCheckoutRequest
27
27
  */
28
28
  successUrl?: string;
29
29
  /**
30
- * Where the provider returns if checkout is abandoned. Defaults to the deployment's configured URL.
30
+ * Where the provider returns if checkout is abandoned. Defaults to the deployment's configured URL. Must be on the deployment's dashboard origin, else 422 `validation_failed`.
31
31
  * @type {string}
32
32
  * @memberof SubscriptionCheckoutRequest
33
33
  */
34
34
  cancelUrl?: string;
35
35
  /**
36
- * Pins the plan the client displayed. An unknown key is a 400 rather than a silent purchase of a different tier.
36
+ * The plan to buy — `flat` (Base, the default) or `plus`. Pins the plan the client displayed: an unknown or un-offered key is a 400 rather than a silent purchase of a different tier.
37
37
  * @type {string}
38
38
  * @memberof SubscriptionCheckoutRequest
39
39
  */
40
40
  planKey?: string;
41
+ /**
42
+ * `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay). On a subscribed organization, the other currency's method switches the existing plan's billing.
43
+ * @type {SubscriptionCheckoutRequestMethodEnum}
44
+ * @memberof SubscriptionCheckoutRequest
45
+ */
46
+ method?: SubscriptionCheckoutRequestMethodEnum;
41
47
  }
42
48
 
49
+
50
+ /**
51
+ * @export
52
+ */
53
+ export const SubscriptionCheckoutRequestMethodEnum = {
54
+ Card: 'card',
55
+ Upi: 'upi'
56
+ } as const;
57
+ export type SubscriptionCheckoutRequestMethodEnum = typeof SubscriptionCheckoutRequestMethodEnum[keyof typeof SubscriptionCheckoutRequestMethodEnum];
58
+
59
+
43
60
  /**
44
61
  * Check if a given object implements the SubscriptionCheckoutRequest interface.
45
62
  */
@@ -60,6 +77,7 @@ export function SubscriptionCheckoutRequestFromJSONTyped(json: any, ignoreDiscri
60
77
  'successUrl': json['success_url'] == null ? undefined : json['success_url'],
61
78
  'cancelUrl': json['cancel_url'] == null ? undefined : json['cancel_url'],
62
79
  'planKey': json['plan_key'] == null ? undefined : json['plan_key'],
80
+ 'method': json['method'] == null ? undefined : json['method'],
63
81
  };
64
82
  }
65
83
 
@@ -77,6 +95,7 @@ export function SubscriptionCheckoutRequestToJSONTyped(value?: SubscriptionCheck
77
95
  'success_url': value['successUrl'],
78
96
  'cancel_url': value['cancelUrl'],
79
97
  'plan_key': value['planKey'],
98
+ 'method': value['method'],
80
99
  };
81
100
  }
82
101
 
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable */
3
3
  /**
4
4
  * deeprelay Public Developer API
5
- * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
5
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
6
6
  *
7
7
  * The version of the OpenAPI document: 1.0.0
8
8
  * Contact: support@deeprelay.ai
@@ -45,8 +45,31 @@ export interface SubscriptionCheckoutSession {
45
45
  * @memberof SubscriptionCheckoutSession
46
46
  */
47
47
  plan: SubscriptionPlan;
48
+ /**
49
+ * Set when the checkout switches an existing plan's billing currency.
50
+ * @type {SubscriptionCheckoutSessionSwitchToEnum}
51
+ * @memberof SubscriptionCheckoutSession
52
+ */
53
+ switchTo?: SubscriptionCheckoutSessionSwitchToEnum;
54
+ /**
55
+ * For a switch, when the new currency is first charged (the current renewal date).
56
+ * @type {Date}
57
+ * @memberof SubscriptionCheckoutSession
58
+ */
59
+ firstChargeAt?: Date;
48
60
  }
49
61
 
62
+
63
+ /**
64
+ * @export
65
+ */
66
+ export const SubscriptionCheckoutSessionSwitchToEnum = {
67
+ Card: 'card',
68
+ Upi: 'upi'
69
+ } as const;
70
+ export type SubscriptionCheckoutSessionSwitchToEnum = typeof SubscriptionCheckoutSessionSwitchToEnum[keyof typeof SubscriptionCheckoutSessionSwitchToEnum];
71
+
72
+
50
73
  /**
51
74
  * Check if a given object implements the SubscriptionCheckoutSession interface.
52
75
  */
@@ -70,6 +93,8 @@ export function SubscriptionCheckoutSessionFromJSONTyped(json: any, ignoreDiscri
70
93
  'checkoutUrl': json['checkout_url'],
71
94
  'sessionId': json['session_id'],
72
95
  'plan': SubscriptionPlanFromJSON(json['plan']),
96
+ 'switchTo': json['switch_to'] == null ? undefined : json['switch_to'],
97
+ 'firstChargeAt': json['first_charge_at'] == null ? undefined : (new Date(json['first_charge_at'])),
73
98
  };
74
99
  }
75
100
 
@@ -87,6 +112,8 @@ export function SubscriptionCheckoutSessionToJSONTyped(value?: SubscriptionCheck
87
112
  'checkout_url': value['checkoutUrl'],
88
113
  'session_id': value['sessionId'],
89
114
  'plan': SubscriptionPlanToJSON(value['plan']),
115
+ 'switch_to': value['switchTo'],
116
+ 'first_charge_at': value['firstChargeAt'] == null ? value['firstChargeAt'] : value['firstChargeAt'].toISOString(),
90
117
  };
91
118
  }
92
119
 
@@ -0,0 +1,120 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * deeprelay Public Developer API
5
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@deeprelay.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * One model's plan-covered usage in a window. Cached input is part of `input_tokens` and counts toward the allowance in full; it is broken out only so you can see how much of your input was cache reads.
18
+ * @export
19
+ * @interface SubscriptionModelUsage
20
+ */
21
+ export interface SubscriptionModelUsage {
22
+ /**
23
+ * Catalog model id, e.g. `deeprelay/kimi-k3`.
24
+ * @type {string}
25
+ * @memberof SubscriptionModelUsage
26
+ */
27
+ model: string;
28
+ /**
29
+ * Raw input tokens served, cached input included.
30
+ * @type {number}
31
+ * @memberof SubscriptionModelUsage
32
+ */
33
+ inputTokens: number;
34
+ /**
35
+ * The part of `input_tokens` served from a prompt cache. A subset, never an addition.
36
+ * @type {number}
37
+ * @memberof SubscriptionModelUsage
38
+ */
39
+ cachedInputTokens: number;
40
+ /**
41
+ * Raw output tokens served, reasoning included.
42
+ * @type {number}
43
+ * @memberof SubscriptionModelUsage
44
+ */
45
+ outputTokens: number;
46
+ /**
47
+ * The model's usage factor in thousandths (1000 = ×1, 24000 = ×24).
48
+ * @type {number}
49
+ * @memberof SubscriptionModelUsage
50
+ */
51
+ usageFactorMilli: number;
52
+ /**
53
+ * `input_tokens` × the usage factor: what this model drew from the input allowance.
54
+ * @type {number}
55
+ * @memberof SubscriptionModelUsage
56
+ */
57
+ weightedInputTokens: number;
58
+ /**
59
+ * `output_tokens` × the usage factor: what this model drew from the output allowance.
60
+ * @type {number}
61
+ * @memberof SubscriptionModelUsage
62
+ */
63
+ weightedOutputTokens: number;
64
+ }
65
+
66
+ /**
67
+ * Check if a given object implements the SubscriptionModelUsage interface.
68
+ */
69
+ export function instanceOfSubscriptionModelUsage(value: object): value is SubscriptionModelUsage {
70
+ if (!('model' in value) || value['model'] === undefined) return false;
71
+ if ((!('inputTokens' in (value as Record<string, any>)) && !('input_tokens' in (value as Record<string, any>))) || ((value as Record<string, any>)['inputTokens'] === undefined && (value as Record<string, any>)['input_tokens'] === undefined)) return false;
72
+ if ((!('cachedInputTokens' in (value as Record<string, any>)) && !('cached_input_tokens' in (value as Record<string, any>))) || ((value as Record<string, any>)['cachedInputTokens'] === undefined && (value as Record<string, any>)['cached_input_tokens'] === undefined)) return false;
73
+ if ((!('outputTokens' in (value as Record<string, any>)) && !('output_tokens' in (value as Record<string, any>))) || ((value as Record<string, any>)['outputTokens'] === undefined && (value as Record<string, any>)['output_tokens'] === undefined)) return false;
74
+ if ((!('usageFactorMilli' in (value as Record<string, any>)) && !('usage_factor_milli' in (value as Record<string, any>))) || ((value as Record<string, any>)['usageFactorMilli'] === undefined && (value as Record<string, any>)['usage_factor_milli'] === undefined)) return false;
75
+ if ((!('weightedInputTokens' in (value as Record<string, any>)) && !('weighted_input_tokens' in (value as Record<string, any>))) || ((value as Record<string, any>)['weightedInputTokens'] === undefined && (value as Record<string, any>)['weighted_input_tokens'] === undefined)) return false;
76
+ if ((!('weightedOutputTokens' in (value as Record<string, any>)) && !('weighted_output_tokens' in (value as Record<string, any>))) || ((value as Record<string, any>)['weightedOutputTokens'] === undefined && (value as Record<string, any>)['weighted_output_tokens'] === undefined)) return false;
77
+ return true;
78
+ }
79
+
80
+ export function SubscriptionModelUsageFromJSON(json: any): SubscriptionModelUsage {
81
+ return SubscriptionModelUsageFromJSONTyped(json, false);
82
+ }
83
+
84
+ export function SubscriptionModelUsageFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionModelUsage {
85
+ if (json == null) {
86
+ return json;
87
+ }
88
+ return {
89
+
90
+ 'model': json['model'],
91
+ 'inputTokens': json['input_tokens'],
92
+ 'cachedInputTokens': json['cached_input_tokens'],
93
+ 'outputTokens': json['output_tokens'],
94
+ 'usageFactorMilli': json['usage_factor_milli'],
95
+ 'weightedInputTokens': json['weighted_input_tokens'],
96
+ 'weightedOutputTokens': json['weighted_output_tokens'],
97
+ };
98
+ }
99
+
100
+ export function SubscriptionModelUsageToJSON(json: any): SubscriptionModelUsage {
101
+ return SubscriptionModelUsageToJSONTyped(json, false);
102
+ }
103
+
104
+ export function SubscriptionModelUsageToJSONTyped(value?: SubscriptionModelUsage | null, ignoreDiscriminator: boolean = false): any {
105
+ if (value == null) {
106
+ return value;
107
+ }
108
+
109
+ return {
110
+
111
+ 'model': value['model'],
112
+ 'input_tokens': value['inputTokens'],
113
+ 'cached_input_tokens': value['cachedInputTokens'],
114
+ 'output_tokens': value['outputTokens'],
115
+ 'usage_factor_milli': value['usageFactorMilli'],
116
+ 'weighted_input_tokens': value['weightedInputTokens'],
117
+ 'weighted_output_tokens': value['weightedOutputTokens'],
118
+ };
119
+ }
120
+
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable */
3
3
  /**
4
4
  * deeprelay Public Developer API
5
- * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
5
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
6
6
  *
7
7
  * The version of the OpenAPI document: 1.0.0
8
8
  * Contact: support@deeprelay.ai
@@ -22,20 +22,20 @@ import {
22
22
  } from './SubscriptionPrice';
23
23
 
24
24
  /**
25
- * What the organization is — or would be — subscribing to. Always present, including for an organization that never subscribed: it is what a point of purchase renders before sending anyone to pay.
25
+ * The plan the organization is on — or, for an organization that never subscribed, the Base plan it would get. Always present: it is what a point of purchase renders before sending anyone to pay.
26
26
  *
27
27
  * @export
28
28
  * @interface SubscriptionPlan
29
29
  */
30
30
  export interface SubscriptionPlan {
31
31
  /**
32
- * Stable identifier for the tier. Send it as `plan_key` on /billing/subscription/checkout to pin the plan you displayed.
32
+ * Stable identifier for the plan: `flat` (Base) or `plus`. Send it as `plan_key` on /billing/subscription/checkout to pin the plan you displayed, or on /billing/subscription/upgrade to name the target.
33
33
  * @type {string}
34
34
  * @memberof SubscriptionPlan
35
35
  */
36
36
  key: string;
37
37
  /**
38
- * Human-facing plan name.
38
+ * Human-facing plan name ("Base", "Plus").
39
39
  * @type {string}
40
40
  * @memberof SubscriptionPlan
41
41
  */
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable */
3
3
  /**
4
4
  * deeprelay Public Developer API
5
- * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
5
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
6
6
  *
7
7
  * The version of the OpenAPI document: 1.0.0
8
8
  * Contact: support@deeprelay.ai
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable */
3
3
  /**
4
4
  * deeprelay Public Developer API
5
- * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
5
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
6
6
  *
7
7
  * The version of the OpenAPI document: 1.0.0
8
8
  * Contact: support@deeprelay.ai
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable */
3
3
  /**
4
4
  * deeprelay Public Developer API
5
- * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
5
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
6
6
  *
7
7
  * The version of the OpenAPI document: 1.0.0
8
8
  * Contact: support@deeprelay.ai
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable */
3
3
  /**
4
4
  * deeprelay Public Developer API
5
- * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
5
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
6
6
  *
7
7
  * The version of the OpenAPI document: 1.0.0
8
8
  * Contact: support@deeprelay.ai
@@ -14,7 +14,7 @@
14
14
 
15
15
  import { mapValues } from '../runtime';
16
16
  /**
17
- * The plan's configured allowances — the denominators of the usage meter. Always present, including for an organization that has not subscribed, where it describes what subscribing would provide.
17
+ * A plan's configured allowances — the denominators of the usage meter. On `/billing/subscription` it is the quota of the plan the organization is on; always present, including for an organization that has not subscribed, where it describes what the Base plan would provide. Each entry of `plans` carries its own.
18
18
  *
19
19
  * Token figures are WEIGHTED tokens: every model carries a usage factor, so a model at factor 2 spends two of these per token it serves.
20
20
  *
@@ -35,11 +35,17 @@ export interface SubscriptionQuota {
35
35
  */
36
36
  outputTokensMonthly: number;
37
37
  /**
38
- * Weighted input+output tokens allowed over a ROLLING 7-day window. This cap slides with the clock; it does not reset with the billing period.
38
+ * Weighted input tokens allowed over a ROLLING 7-day window. This cap slides with the clock; it does not reset with the billing period. 0 means no weekly input cap is configured on this deployment.
39
39
  * @type {number}
40
40
  * @memberof SubscriptionQuota
41
41
  */
42
- weeklyTokens: number;
42
+ weeklyInputTokens: number;
43
+ /**
44
+ * Weighted output tokens allowed over a ROLLING 7-day window, independent of the weekly input cap. Slides with the clock; it does not reset with the billing period. Reasoning tokens are output tokens. 0 means no weekly output cap is configured.
45
+ * @type {number}
46
+ * @memberof SubscriptionQuota
47
+ */
48
+ weeklyOutputTokens: number;
43
49
  /**
44
50
  * Per-period backstop on list-price metered cost, in micro-cents (1e-6 cent). 0 means no backstop is configured on this deployment.
45
51
  * @type {number}
@@ -61,7 +67,8 @@ export interface SubscriptionQuota {
61
67
  export function instanceOfSubscriptionQuota(value: object): value is SubscriptionQuota {
62
68
  if ((!('inputTokensMonthly' in (value as Record<string, any>)) && !('input_tokens_monthly' in (value as Record<string, any>))) || ((value as Record<string, any>)['inputTokensMonthly'] === undefined && (value as Record<string, any>)['input_tokens_monthly'] === undefined)) return false;
63
69
  if ((!('outputTokensMonthly' in (value as Record<string, any>)) && !('output_tokens_monthly' in (value as Record<string, any>))) || ((value as Record<string, any>)['outputTokensMonthly'] === undefined && (value as Record<string, any>)['output_tokens_monthly'] === undefined)) return false;
64
- if ((!('weeklyTokens' in (value as Record<string, any>)) && !('weekly_tokens' in (value as Record<string, any>))) || ((value as Record<string, any>)['weeklyTokens'] === undefined && (value as Record<string, any>)['weekly_tokens'] === undefined)) return false;
70
+ if ((!('weeklyInputTokens' in (value as Record<string, any>)) && !('weekly_input_tokens' in (value as Record<string, any>))) || ((value as Record<string, any>)['weeklyInputTokens'] === undefined && (value as Record<string, any>)['weekly_input_tokens'] === undefined)) return false;
71
+ if ((!('weeklyOutputTokens' in (value as Record<string, any>)) && !('weekly_output_tokens' in (value as Record<string, any>))) || ((value as Record<string, any>)['weeklyOutputTokens'] === undefined && (value as Record<string, any>)['weekly_output_tokens'] === undefined)) return false;
65
72
  if ((!('maxUsageMicroCents' in (value as Record<string, any>)) && !('max_usage_micro_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['maxUsageMicroCents'] === undefined && (value as Record<string, any>)['max_usage_micro_cents'] === undefined)) return false;
66
73
  if ((!('paygDiscountBp' in (value as Record<string, any>)) && !('payg_discount_bp' in (value as Record<string, any>))) || ((value as Record<string, any>)['paygDiscountBp'] === undefined && (value as Record<string, any>)['payg_discount_bp'] === undefined)) return false;
67
74
  return true;
@@ -79,7 +86,8 @@ export function SubscriptionQuotaFromJSONTyped(json: any, ignoreDiscriminator: b
79
86
 
80
87
  'inputTokensMonthly': json['input_tokens_monthly'],
81
88
  'outputTokensMonthly': json['output_tokens_monthly'],
82
- 'weeklyTokens': json['weekly_tokens'],
89
+ 'weeklyInputTokens': json['weekly_input_tokens'],
90
+ 'weeklyOutputTokens': json['weekly_output_tokens'],
83
91
  'maxUsageMicroCents': json['max_usage_micro_cents'],
84
92
  'paygDiscountBp': json['payg_discount_bp'],
85
93
  };
@@ -98,7 +106,8 @@ export function SubscriptionQuotaToJSONTyped(value?: SubscriptionQuota | null, i
98
106
 
99
107
  'input_tokens_monthly': value['inputTokensMonthly'],
100
108
  'output_tokens_monthly': value['outputTokensMonthly'],
101
- 'weekly_tokens': value['weeklyTokens'],
109
+ 'weekly_input_tokens': value['weeklyInputTokens'],
110
+ 'weekly_output_tokens': value['weeklyOutputTokens'],
102
111
  'max_usage_micro_cents': value['maxUsageMicroCents'],
103
112
  'payg_discount_bp': value['paygDiscountBp'],
104
113
  };
@@ -0,0 +1,108 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * deeprelay Public Developer API
5
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@deeprelay.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { SubscriptionPrice } from './SubscriptionPrice';
17
+ import {
18
+ SubscriptionPriceFromJSON,
19
+ SubscriptionPriceFromJSONTyped,
20
+ SubscriptionPriceToJSON,
21
+ SubscriptionPriceToJSONTyped,
22
+ } from './SubscriptionPrice';
23
+ import type { SubscriptionQuota } from './SubscriptionQuota';
24
+ import {
25
+ SubscriptionQuotaFromJSON,
26
+ SubscriptionQuotaFromJSONTyped,
27
+ SubscriptionQuotaToJSON,
28
+ SubscriptionQuotaToJSONTyped,
29
+ } from './SubscriptionQuota';
30
+
31
+ /**
32
+ * One plan as the plan catalogue lists it: identity, price and the allowance it buys. Every offered plan covers the same models at the same usage factors — Plus is Base with a larger allowance.
33
+ *
34
+ * @export
35
+ * @interface SubscriptionTier
36
+ */
37
+ export interface SubscriptionTier {
38
+ /**
39
+ * Stable plan identifier — `flat` (Base) or `plus`.
40
+ * @type {string}
41
+ * @memberof SubscriptionTier
42
+ */
43
+ key: string;
44
+ /**
45
+ * Human-facing plan name.
46
+ * @type {string}
47
+ * @memberof SubscriptionTier
48
+ */
49
+ name: string;
50
+ /**
51
+ *
52
+ * @type {SubscriptionPrice}
53
+ * @memberof SubscriptionTier
54
+ */
55
+ price?: SubscriptionPrice;
56
+ /**
57
+ *
58
+ * @type {SubscriptionQuota}
59
+ * @memberof SubscriptionTier
60
+ */
61
+ quota: SubscriptionQuota;
62
+ }
63
+
64
+ /**
65
+ * Check if a given object implements the SubscriptionTier interface.
66
+ */
67
+ export function instanceOfSubscriptionTier(value: object): value is SubscriptionTier {
68
+ if (!('key' in value) || value['key'] === undefined) return false;
69
+ if (!('name' in value) || value['name'] === undefined) return false;
70
+ if (!('quota' in value) || value['quota'] === undefined) return false;
71
+ return true;
72
+ }
73
+
74
+ export function SubscriptionTierFromJSON(json: any): SubscriptionTier {
75
+ return SubscriptionTierFromJSONTyped(json, false);
76
+ }
77
+
78
+ export function SubscriptionTierFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionTier {
79
+ if (json == null) {
80
+ return json;
81
+ }
82
+ return {
83
+
84
+ 'key': json['key'],
85
+ 'name': json['name'],
86
+ 'price': json['price'] == null ? undefined : SubscriptionPriceFromJSON(json['price']),
87
+ 'quota': SubscriptionQuotaFromJSON(json['quota']),
88
+ };
89
+ }
90
+
91
+ export function SubscriptionTierToJSON(json: any): SubscriptionTier {
92
+ return SubscriptionTierToJSONTyped(json, false);
93
+ }
94
+
95
+ export function SubscriptionTierToJSONTyped(value?: SubscriptionTier | null, ignoreDiscriminator: boolean = false): any {
96
+ if (value == null) {
97
+ return value;
98
+ }
99
+
100
+ return {
101
+
102
+ 'key': value['key'],
103
+ 'name': value['name'],
104
+ 'price': SubscriptionPriceToJSON(value['price']),
105
+ 'quota': SubscriptionQuotaToJSON(value['quota']),
106
+ };
107
+ }
108
+
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * deeprelay Public Developer API
5
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@deeprelay.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface SubscriptionUpgradeRequest
20
+ */
21
+ export interface SubscriptionUpgradeRequest {
22
+ /**
23
+ * The plan to move to (`plus`). Must be bigger than the plan the organization is on.
24
+ * @type {string}
25
+ * @memberof SubscriptionUpgradeRequest
26
+ */
27
+ planKey: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the SubscriptionUpgradeRequest interface.
32
+ */
33
+ export function instanceOfSubscriptionUpgradeRequest(value: object): value is SubscriptionUpgradeRequest {
34
+ if ((!('planKey' in (value as Record<string, any>)) && !('plan_key' in (value as Record<string, any>))) || ((value as Record<string, any>)['planKey'] === undefined && (value as Record<string, any>)['plan_key'] === undefined)) return false;
35
+ return true;
36
+ }
37
+
38
+ export function SubscriptionUpgradeRequestFromJSON(json: any): SubscriptionUpgradeRequest {
39
+ return SubscriptionUpgradeRequestFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function SubscriptionUpgradeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionUpgradeRequest {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'planKey': json['plan_key'],
49
+ };
50
+ }
51
+
52
+ export function SubscriptionUpgradeRequestToJSON(json: any): SubscriptionUpgradeRequest {
53
+ return SubscriptionUpgradeRequestToJSONTyped(json, false);
54
+ }
55
+
56
+ export function SubscriptionUpgradeRequestToJSONTyped(value?: SubscriptionUpgradeRequest | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'plan_key': value['planKey'],
64
+ };
65
+ }
66
+