@gpuai/sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (562) hide show
  1. package/.openapi-generator/FILES +188 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +24 -0
  4. package/LICENSE +204 -0
  5. package/README.md +245 -0
  6. package/dist/apis/BillingApi.d.ts +101 -0
  7. package/dist/apis/BillingApi.js +271 -0
  8. package/dist/apis/CommunityApi.d.ts +174 -0
  9. package/dist/apis/CommunityApi.js +468 -0
  10. package/dist/apis/EnvironmentsApi.d.ts +32 -0
  11. package/dist/apis/EnvironmentsApi.js +70 -0
  12. package/dist/apis/FineTuningApi.d.ts +123 -0
  13. package/dist/apis/FineTuningApi.js +352 -0
  14. package/dist/apis/GpuTypesApi.d.ts +34 -0
  15. package/dist/apis/GpuTypesApi.js +74 -0
  16. package/dist/apis/InferenceApi.d.ts +179 -0
  17. package/dist/apis/InferenceApi.js +479 -0
  18. package/dist/apis/InstancesApi.d.ts +121 -0
  19. package/dist/apis/InstancesApi.js +304 -0
  20. package/dist/apis/MetaApi.d.ts +42 -0
  21. package/dist/apis/MetaApi.js +103 -0
  22. package/dist/apis/OperationsApi.d.ts +33 -0
  23. package/dist/apis/OperationsApi.js +79 -0
  24. package/dist/apis/PricingApi.d.ts +48 -0
  25. package/dist/apis/PricingApi.js +95 -0
  26. package/dist/apis/SshKeysApi.d.ts +84 -0
  27. package/dist/apis/SshKeysApi.js +226 -0
  28. package/dist/apis/TemplatesApi.d.ts +46 -0
  29. package/dist/apis/TemplatesApi.js +122 -0
  30. package/dist/apis/UsageApi.d.ts +56 -0
  31. package/dist/apis/UsageApi.js +109 -0
  32. package/dist/apis/WebhooksApi.d.ts +82 -0
  33. package/dist/apis/WebhooksApi.js +224 -0
  34. package/dist/apis/index.d.ts +14 -0
  35. package/dist/apis/index.js +32 -0
  36. package/dist/esm/apis/BillingApi.d.ts +101 -0
  37. package/dist/esm/apis/BillingApi.js +267 -0
  38. package/dist/esm/apis/CommunityApi.d.ts +174 -0
  39. package/dist/esm/apis/CommunityApi.js +464 -0
  40. package/dist/esm/apis/EnvironmentsApi.d.ts +32 -0
  41. package/dist/esm/apis/EnvironmentsApi.js +66 -0
  42. package/dist/esm/apis/FineTuningApi.d.ts +123 -0
  43. package/dist/esm/apis/FineTuningApi.js +348 -0
  44. package/dist/esm/apis/GpuTypesApi.d.ts +34 -0
  45. package/dist/esm/apis/GpuTypesApi.js +70 -0
  46. package/dist/esm/apis/InferenceApi.d.ts +179 -0
  47. package/dist/esm/apis/InferenceApi.js +475 -0
  48. package/dist/esm/apis/InstancesApi.d.ts +121 -0
  49. package/dist/esm/apis/InstancesApi.js +300 -0
  50. package/dist/esm/apis/MetaApi.d.ts +42 -0
  51. package/dist/esm/apis/MetaApi.js +99 -0
  52. package/dist/esm/apis/OperationsApi.d.ts +33 -0
  53. package/dist/esm/apis/OperationsApi.js +75 -0
  54. package/dist/esm/apis/PricingApi.d.ts +48 -0
  55. package/dist/esm/apis/PricingApi.js +91 -0
  56. package/dist/esm/apis/SshKeysApi.d.ts +84 -0
  57. package/dist/esm/apis/SshKeysApi.js +222 -0
  58. package/dist/esm/apis/TemplatesApi.d.ts +46 -0
  59. package/dist/esm/apis/TemplatesApi.js +118 -0
  60. package/dist/esm/apis/UsageApi.d.ts +56 -0
  61. package/dist/esm/apis/UsageApi.js +105 -0
  62. package/dist/esm/apis/WebhooksApi.d.ts +82 -0
  63. package/dist/esm/apis/WebhooksApi.js +220 -0
  64. package/dist/esm/apis/index.d.ts +14 -0
  65. package/dist/esm/apis/index.js +16 -0
  66. package/dist/esm/index.d.ts +3 -0
  67. package/dist/esm/index.js +5 -0
  68. package/dist/esm/models/ChatChoice.d.ts +55 -0
  69. package/dist/esm/models/ChatChoice.js +55 -0
  70. package/dist/esm/models/ChatCompletionRequest.d.ts +64 -0
  71. package/dist/esm/models/ChatCompletionRequest.js +57 -0
  72. package/dist/esm/models/ChatCompletionResponse.d.ts +71 -0
  73. package/dist/esm/models/ChatCompletionResponse.js +73 -0
  74. package/dist/esm/models/ChatMessage.d.ts +47 -0
  75. package/dist/esm/models/ChatMessage.js +55 -0
  76. package/dist/esm/models/CommunityEarnings.d.ts +45 -0
  77. package/dist/esm/models/CommunityEarnings.js +52 -0
  78. package/dist/esm/models/CommunityEarningsEntry.d.ts +62 -0
  79. package/dist/esm/models/CommunityEarningsEntry.js +63 -0
  80. package/dist/esm/models/CommunityMachine.d.ts +125 -0
  81. package/dist/esm/models/CommunityMachine.js +97 -0
  82. package/dist/esm/models/CommunityMachineDelistResult.d.ts +46 -0
  83. package/dist/esm/models/CommunityMachineDelistResult.js +54 -0
  84. package/dist/esm/models/CommunityMachineRegistration.d.ts +39 -0
  85. package/dist/esm/models/CommunityMachineRegistration.js +48 -0
  86. package/dist/esm/models/CommunitySupplier.d.ts +64 -0
  87. package/dist/esm/models/CommunitySupplier.js +66 -0
  88. package/dist/esm/models/CreateCryptoDepositRequest.d.ts +64 -0
  89. package/dist/esm/models/CreateCryptoDepositRequest.js +68 -0
  90. package/dist/esm/models/CreateFineTuningJobRequest.d.ts +64 -0
  91. package/dist/esm/models/CreateFineTuningJobRequest.js +59 -0
  92. package/dist/esm/models/CreateFineTuningJobRequestGpuai.d.ts +38 -0
  93. package/dist/esm/models/CreateFineTuningJobRequestGpuai.js +43 -0
  94. package/dist/esm/models/CreateFineTuningJobRequestMethod.d.ts +47 -0
  95. package/dist/esm/models/CreateFineTuningJobRequestMethod.js +53 -0
  96. package/dist/esm/models/CreateFineTuningJobRequestMethodLora.d.ts +44 -0
  97. package/dist/esm/models/CreateFineTuningJobRequestMethodLora.js +45 -0
  98. package/dist/esm/models/CreateInstanceRequest.d.ts +108 -0
  99. package/dist/esm/models/CreateInstanceRequest.js +76 -0
  100. package/dist/esm/models/CreateSshKeyRequest.d.ts +38 -0
  101. package/dist/esm/models/CreateSshKeyRequest.js +47 -0
  102. package/dist/esm/models/CreateWebhookEndpointRequest.d.ts +48 -0
  103. package/dist/esm/models/CreateWebhookEndpointRequest.js +56 -0
  104. package/dist/esm/models/CryptoDeposit.d.ts +114 -0
  105. package/dist/esm/models/CryptoDeposit.js +90 -0
  106. package/dist/esm/models/Environments.d.ts +61 -0
  107. package/dist/esm/models/Environments.js +57 -0
  108. package/dist/esm/models/FileObject.d.ts +76 -0
  109. package/dist/esm/models/FileObject.js +79 -0
  110. package/dist/esm/models/FineTuningJob.d.ts +133 -0
  111. package/dist/esm/models/FineTuningJob.js +102 -0
  112. package/dist/esm/models/FineTuningJobError.d.ts +44 -0
  113. package/dist/esm/models/FineTuningJobError.js +45 -0
  114. package/dist/esm/models/FineTuningJobEvent.d.ts +86 -0
  115. package/dist/esm/models/FineTuningJobEvent.js +79 -0
  116. package/dist/esm/models/FineTuningJobEventList.d.ts +52 -0
  117. package/dist/esm/models/FineTuningJobEventList.js +60 -0
  118. package/dist/esm/models/FineTuningJobList.d.ts +52 -0
  119. package/dist/esm/models/FineTuningJobList.js +60 -0
  120. package/dist/esm/models/FineTuningJobMethod.d.ts +47 -0
  121. package/dist/esm/models/FineTuningJobMethod.js +51 -0
  122. package/dist/esm/models/FrameworkVersion.d.ts +50 -0
  123. package/dist/esm/models/FrameworkVersion.js +53 -0
  124. package/dist/esm/models/GPUType.d.ts +74 -0
  125. package/dist/esm/models/GPUType.js +59 -0
  126. package/dist/esm/models/GPUTypePage.d.ts +39 -0
  127. package/dist/esm/models/GPUTypePage.js +48 -0
  128. package/dist/esm/models/GetHealth200Response.d.ts +39 -0
  129. package/dist/esm/models/GetHealth200Response.js +47 -0
  130. package/dist/esm/models/ImagesGenerationsRequest.d.ts +63 -0
  131. package/dist/esm/models/ImagesGenerationsRequest.js +59 -0
  132. package/dist/esm/models/ImagesResponse.d.ts +46 -0
  133. package/dist/esm/models/ImagesResponse.js +53 -0
  134. package/dist/esm/models/ImagesResponseDataInner.d.ts +32 -0
  135. package/dist/esm/models/ImagesResponseDataInner.js +43 -0
  136. package/dist/esm/models/ImagesResponseUsage.d.ts +32 -0
  137. package/dist/esm/models/ImagesResponseUsage.js +43 -0
  138. package/dist/esm/models/IncludeItem.d.ts +38 -0
  139. package/dist/esm/models/IncludeItem.js +45 -0
  140. package/dist/esm/models/Instance.d.ts +132 -0
  141. package/dist/esm/models/Instance.js +103 -0
  142. package/dist/esm/models/InstanceConnection.d.ts +68 -0
  143. package/dist/esm/models/InstanceConnection.js +53 -0
  144. package/dist/esm/models/InstancePage.d.ts +39 -0
  145. package/dist/esm/models/InstancePage.js +48 -0
  146. package/dist/esm/models/ListCommunityMachines200Response.d.ts +33 -0
  147. package/dist/esm/models/ListCommunityMachines200Response.js +44 -0
  148. package/dist/esm/models/ListDeposits200Response.d.ts +33 -0
  149. package/dist/esm/models/ListDeposits200Response.js +44 -0
  150. package/dist/esm/models/Model.d.ts +131 -0
  151. package/dist/esm/models/Model.js +103 -0
  152. package/dist/esm/models/ModelList.d.ts +46 -0
  153. package/dist/esm/models/ModelList.js +56 -0
  154. package/dist/esm/models/ModelParametersInner.d.ts +72 -0
  155. package/dist/esm/models/ModelParametersInner.js +64 -0
  156. package/dist/esm/models/ModelPricing.d.ts +80 -0
  157. package/dist/esm/models/ModelPricing.js +57 -0
  158. package/dist/esm/models/OpenAIErrorEnvelope.d.ts +33 -0
  159. package/dist/esm/models/OpenAIErrorEnvelope.js +44 -0
  160. package/dist/esm/models/OpenAIErrorEnvelopeError.d.ts +50 -0
  161. package/dist/esm/models/OpenAIErrorEnvelopeError.js +53 -0
  162. package/dist/esm/models/Operation.d.ts +107 -0
  163. package/dist/esm/models/Operation.js +86 -0
  164. package/dist/esm/models/OperationError.d.ts +38 -0
  165. package/dist/esm/models/OperationError.js +43 -0
  166. package/dist/esm/models/OperationResult.d.ts +50 -0
  167. package/dist/esm/models/OperationResult.js +47 -0
  168. package/dist/esm/models/Pricing.d.ts +133 -0
  169. package/dist/esm/models/Pricing.js +100 -0
  170. package/dist/esm/models/PricingPage.d.ts +39 -0
  171. package/dist/esm/models/PricingPage.js +48 -0
  172. package/dist/esm/models/Problem.d.ts +83 -0
  173. package/dist/esm/models/Problem.js +83 -0
  174. package/dist/esm/models/RegisterCommunityMachineRequest.d.ts +70 -0
  175. package/dist/esm/models/RegisterCommunityMachineRequest.js +58 -0
  176. package/dist/esm/models/SSHKey.d.ts +50 -0
  177. package/dist/esm/models/SSHKey.js +55 -0
  178. package/dist/esm/models/SSHKeyPage.d.ts +39 -0
  179. package/dist/esm/models/SSHKeyPage.js +48 -0
  180. package/dist/esm/models/SpendingLimit.d.ts +101 -0
  181. package/dist/esm/models/SpendingLimit.js +85 -0
  182. package/dist/esm/models/StreamOptions.d.ts +32 -0
  183. package/dist/esm/models/StreamOptions.js +41 -0
  184. package/dist/esm/models/SupplierMachineView.d.ts +162 -0
  185. package/dist/esm/models/SupplierMachineView.js +114 -0
  186. package/dist/esm/models/Template.d.ts +121 -0
  187. package/dist/esm/models/Template.js +90 -0
  188. package/dist/esm/models/TemplateEnvInner.d.ts +50 -0
  189. package/dist/esm/models/TemplateEnvInner.js +47 -0
  190. package/dist/esm/models/TemplateList.d.ts +46 -0
  191. package/dist/esm/models/TemplateList.js +56 -0
  192. package/dist/esm/models/TemplatePortsInner.d.ts +52 -0
  193. package/dist/esm/models/TemplatePortsInner.js +52 -0
  194. package/dist/esm/models/UpdateCommunityMachineRequest.d.ts +32 -0
  195. package/dist/esm/models/UpdateCommunityMachineRequest.js +43 -0
  196. package/dist/esm/models/UpdateInstanceRequest.d.ts +32 -0
  197. package/dist/esm/models/UpdateInstanceRequest.js +41 -0
  198. package/dist/esm/models/UpdateSpendingLimitRequest.d.ts +59 -0
  199. package/dist/esm/models/UpdateSpendingLimitRequest.js +57 -0
  200. package/dist/esm/models/Usage.d.ts +44 -0
  201. package/dist/esm/models/Usage.js +51 -0
  202. package/dist/esm/models/UsageBucket.d.ts +56 -0
  203. package/dist/esm/models/UsageBucket.js +55 -0
  204. package/dist/esm/models/UsagePage.d.ts +39 -0
  205. package/dist/esm/models/UsagePage.js +48 -0
  206. package/dist/esm/models/VMImage.d.ts +50 -0
  207. package/dist/esm/models/VMImage.js +53 -0
  208. package/dist/esm/models/VideoCreateRequest.d.ts +50 -0
  209. package/dist/esm/models/VideoCreateRequest.js +51 -0
  210. package/dist/esm/models/VideoJob.d.ts +117 -0
  211. package/dist/esm/models/VideoJob.js +94 -0
  212. package/dist/esm/models/VideoList.d.ts +52 -0
  213. package/dist/esm/models/VideoList.js +60 -0
  214. package/dist/esm/models/WebhookEndpoint.d.ts +72 -0
  215. package/dist/esm/models/WebhookEndpoint.js +70 -0
  216. package/dist/esm/models/WebhookEndpointPage.d.ts +39 -0
  217. package/dist/esm/models/WebhookEndpointPage.js +48 -0
  218. package/dist/esm/models/index.d.ts +75 -0
  219. package/dist/esm/models/index.js +77 -0
  220. package/dist/esm/runtime.d.ts +185 -0
  221. package/dist/esm/runtime.js +354 -0
  222. package/dist/index.d.ts +3 -0
  223. package/dist/index.js +21 -0
  224. package/dist/models/ChatChoice.d.ts +55 -0
  225. package/dist/models/ChatChoice.js +63 -0
  226. package/dist/models/ChatCompletionRequest.d.ts +64 -0
  227. package/dist/models/ChatCompletionRequest.js +64 -0
  228. package/dist/models/ChatCompletionResponse.d.ts +71 -0
  229. package/dist/models/ChatCompletionResponse.js +81 -0
  230. package/dist/models/ChatMessage.d.ts +47 -0
  231. package/dist/models/ChatMessage.js +63 -0
  232. package/dist/models/CommunityEarnings.d.ts +45 -0
  233. package/dist/models/CommunityEarnings.js +59 -0
  234. package/dist/models/CommunityEarningsEntry.d.ts +62 -0
  235. package/dist/models/CommunityEarningsEntry.js +70 -0
  236. package/dist/models/CommunityMachine.d.ts +125 -0
  237. package/dist/models/CommunityMachine.js +105 -0
  238. package/dist/models/CommunityMachineDelistResult.d.ts +46 -0
  239. package/dist/models/CommunityMachineDelistResult.js +62 -0
  240. package/dist/models/CommunityMachineRegistration.d.ts +39 -0
  241. package/dist/models/CommunityMachineRegistration.js +55 -0
  242. package/dist/models/CommunitySupplier.d.ts +64 -0
  243. package/dist/models/CommunitySupplier.js +74 -0
  244. package/dist/models/CreateCryptoDepositRequest.d.ts +64 -0
  245. package/dist/models/CreateCryptoDepositRequest.js +76 -0
  246. package/dist/models/CreateFineTuningJobRequest.d.ts +64 -0
  247. package/dist/models/CreateFineTuningJobRequest.js +66 -0
  248. package/dist/models/CreateFineTuningJobRequestGpuai.d.ts +38 -0
  249. package/dist/models/CreateFineTuningJobRequestGpuai.js +50 -0
  250. package/dist/models/CreateFineTuningJobRequestMethod.d.ts +47 -0
  251. package/dist/models/CreateFineTuningJobRequestMethod.js +61 -0
  252. package/dist/models/CreateFineTuningJobRequestMethodLora.d.ts +44 -0
  253. package/dist/models/CreateFineTuningJobRequestMethodLora.js +52 -0
  254. package/dist/models/CreateInstanceRequest.d.ts +108 -0
  255. package/dist/models/CreateInstanceRequest.js +84 -0
  256. package/dist/models/CreateSshKeyRequest.d.ts +38 -0
  257. package/dist/models/CreateSshKeyRequest.js +54 -0
  258. package/dist/models/CreateWebhookEndpointRequest.d.ts +48 -0
  259. package/dist/models/CreateWebhookEndpointRequest.js +64 -0
  260. package/dist/models/CryptoDeposit.d.ts +114 -0
  261. package/dist/models/CryptoDeposit.js +98 -0
  262. package/dist/models/Environments.d.ts +61 -0
  263. package/dist/models/Environments.js +64 -0
  264. package/dist/models/FileObject.d.ts +76 -0
  265. package/dist/models/FileObject.js +87 -0
  266. package/dist/models/FineTuningJob.d.ts +133 -0
  267. package/dist/models/FineTuningJob.js +110 -0
  268. package/dist/models/FineTuningJobError.d.ts +44 -0
  269. package/dist/models/FineTuningJobError.js +52 -0
  270. package/dist/models/FineTuningJobEvent.d.ts +86 -0
  271. package/dist/models/FineTuningJobEvent.js +87 -0
  272. package/dist/models/FineTuningJobEventList.d.ts +52 -0
  273. package/dist/models/FineTuningJobEventList.js +68 -0
  274. package/dist/models/FineTuningJobList.d.ts +52 -0
  275. package/dist/models/FineTuningJobList.js +68 -0
  276. package/dist/models/FineTuningJobMethod.d.ts +47 -0
  277. package/dist/models/FineTuningJobMethod.js +59 -0
  278. package/dist/models/FrameworkVersion.d.ts +50 -0
  279. package/dist/models/FrameworkVersion.js +60 -0
  280. package/dist/models/GPUType.d.ts +74 -0
  281. package/dist/models/GPUType.js +66 -0
  282. package/dist/models/GPUTypePage.d.ts +39 -0
  283. package/dist/models/GPUTypePage.js +55 -0
  284. package/dist/models/GetHealth200Response.d.ts +39 -0
  285. package/dist/models/GetHealth200Response.js +55 -0
  286. package/dist/models/ImagesGenerationsRequest.d.ts +63 -0
  287. package/dist/models/ImagesGenerationsRequest.js +67 -0
  288. package/dist/models/ImagesResponse.d.ts +46 -0
  289. package/dist/models/ImagesResponse.js +60 -0
  290. package/dist/models/ImagesResponseDataInner.d.ts +32 -0
  291. package/dist/models/ImagesResponseDataInner.js +50 -0
  292. package/dist/models/ImagesResponseUsage.d.ts +32 -0
  293. package/dist/models/ImagesResponseUsage.js +50 -0
  294. package/dist/models/IncludeItem.d.ts +38 -0
  295. package/dist/models/IncludeItem.js +52 -0
  296. package/dist/models/Instance.d.ts +132 -0
  297. package/dist/models/Instance.js +111 -0
  298. package/dist/models/InstanceConnection.d.ts +68 -0
  299. package/dist/models/InstanceConnection.js +60 -0
  300. package/dist/models/InstancePage.d.ts +39 -0
  301. package/dist/models/InstancePage.js +55 -0
  302. package/dist/models/ListCommunityMachines200Response.d.ts +33 -0
  303. package/dist/models/ListCommunityMachines200Response.js +51 -0
  304. package/dist/models/ListDeposits200Response.d.ts +33 -0
  305. package/dist/models/ListDeposits200Response.js +51 -0
  306. package/dist/models/Model.d.ts +131 -0
  307. package/dist/models/Model.js +111 -0
  308. package/dist/models/ModelList.d.ts +46 -0
  309. package/dist/models/ModelList.js +64 -0
  310. package/dist/models/ModelParametersInner.d.ts +72 -0
  311. package/dist/models/ModelParametersInner.js +72 -0
  312. package/dist/models/ModelPricing.d.ts +80 -0
  313. package/dist/models/ModelPricing.js +64 -0
  314. package/dist/models/OpenAIErrorEnvelope.d.ts +33 -0
  315. package/dist/models/OpenAIErrorEnvelope.js +51 -0
  316. package/dist/models/OpenAIErrorEnvelopeError.d.ts +50 -0
  317. package/dist/models/OpenAIErrorEnvelopeError.js +60 -0
  318. package/dist/models/Operation.d.ts +107 -0
  319. package/dist/models/Operation.js +94 -0
  320. package/dist/models/OperationError.d.ts +38 -0
  321. package/dist/models/OperationError.js +50 -0
  322. package/dist/models/OperationResult.d.ts +50 -0
  323. package/dist/models/OperationResult.js +54 -0
  324. package/dist/models/Pricing.d.ts +133 -0
  325. package/dist/models/Pricing.js +108 -0
  326. package/dist/models/PricingPage.d.ts +39 -0
  327. package/dist/models/PricingPage.js +55 -0
  328. package/dist/models/Problem.d.ts +83 -0
  329. package/dist/models/Problem.js +91 -0
  330. package/dist/models/RegisterCommunityMachineRequest.d.ts +70 -0
  331. package/dist/models/RegisterCommunityMachineRequest.js +66 -0
  332. package/dist/models/SSHKey.d.ts +50 -0
  333. package/dist/models/SSHKey.js +62 -0
  334. package/dist/models/SSHKeyPage.d.ts +39 -0
  335. package/dist/models/SSHKeyPage.js +55 -0
  336. package/dist/models/SpendingLimit.d.ts +101 -0
  337. package/dist/models/SpendingLimit.js +93 -0
  338. package/dist/models/StreamOptions.d.ts +32 -0
  339. package/dist/models/StreamOptions.js +48 -0
  340. package/dist/models/SupplierMachineView.d.ts +162 -0
  341. package/dist/models/SupplierMachineView.js +122 -0
  342. package/dist/models/Template.d.ts +121 -0
  343. package/dist/models/Template.js +98 -0
  344. package/dist/models/TemplateEnvInner.d.ts +50 -0
  345. package/dist/models/TemplateEnvInner.js +54 -0
  346. package/dist/models/TemplateList.d.ts +46 -0
  347. package/dist/models/TemplateList.js +64 -0
  348. package/dist/models/TemplatePortsInner.d.ts +52 -0
  349. package/dist/models/TemplatePortsInner.js +60 -0
  350. package/dist/models/UpdateCommunityMachineRequest.d.ts +32 -0
  351. package/dist/models/UpdateCommunityMachineRequest.js +50 -0
  352. package/dist/models/UpdateInstanceRequest.d.ts +32 -0
  353. package/dist/models/UpdateInstanceRequest.js +48 -0
  354. package/dist/models/UpdateSpendingLimitRequest.d.ts +59 -0
  355. package/dist/models/UpdateSpendingLimitRequest.js +65 -0
  356. package/dist/models/Usage.d.ts +44 -0
  357. package/dist/models/Usage.js +58 -0
  358. package/dist/models/UsageBucket.d.ts +56 -0
  359. package/dist/models/UsageBucket.js +62 -0
  360. package/dist/models/UsagePage.d.ts +39 -0
  361. package/dist/models/UsagePage.js +55 -0
  362. package/dist/models/VMImage.d.ts +50 -0
  363. package/dist/models/VMImage.js +60 -0
  364. package/dist/models/VideoCreateRequest.d.ts +50 -0
  365. package/dist/models/VideoCreateRequest.js +58 -0
  366. package/dist/models/VideoJob.d.ts +117 -0
  367. package/dist/models/VideoJob.js +102 -0
  368. package/dist/models/VideoList.d.ts +52 -0
  369. package/dist/models/VideoList.js +68 -0
  370. package/dist/models/WebhookEndpoint.d.ts +72 -0
  371. package/dist/models/WebhookEndpoint.js +78 -0
  372. package/dist/models/WebhookEndpointPage.d.ts +39 -0
  373. package/dist/models/WebhookEndpointPage.js +55 -0
  374. package/dist/models/index.d.ts +75 -0
  375. package/dist/models/index.js +93 -0
  376. package/dist/runtime.d.ts +185 -0
  377. package/dist/runtime.js +371 -0
  378. package/docs/BillingApi.md +371 -0
  379. package/docs/ChatChoice.md +38 -0
  380. package/docs/ChatCompletionRequest.md +44 -0
  381. package/docs/ChatCompletionResponse.md +44 -0
  382. package/docs/ChatMessage.md +36 -0
  383. package/docs/CommunityApi.md +679 -0
  384. package/docs/CommunityEarnings.md +38 -0
  385. package/docs/CommunityEarningsEntry.md +44 -0
  386. package/docs/CommunityMachine.md +57 -0
  387. package/docs/CommunityMachineDelistResult.md +37 -0
  388. package/docs/CommunityMachineRegistration.md +36 -0
  389. package/docs/CommunitySupplier.md +43 -0
  390. package/docs/CreateCryptoDepositRequest.md +38 -0
  391. package/docs/CreateFineTuningJobRequest.md +45 -0
  392. package/docs/CreateFineTuningJobRequestGpuai.md +36 -0
  393. package/docs/CreateFineTuningJobRequestMethod.md +36 -0
  394. package/docs/CreateFineTuningJobRequestMethodLora.md +38 -0
  395. package/docs/CreateInstanceRequest.md +56 -0
  396. package/docs/CreateSshKeyRequest.md +36 -0
  397. package/docs/CreateWebhookEndpointRequest.md +36 -0
  398. package/docs/CryptoDeposit.md +55 -0
  399. package/docs/Environments.md +41 -0
  400. package/docs/EnvironmentsApi.md +69 -0
  401. package/docs/FileObject.md +45 -0
  402. package/docs/FineTuningApi.md +468 -0
  403. package/docs/FineTuningJob.md +61 -0
  404. package/docs/FineTuningJobError.md +38 -0
  405. package/docs/FineTuningJobEvent.md +46 -0
  406. package/docs/FineTuningJobEventList.md +38 -0
  407. package/docs/FineTuningJobList.md +38 -0
  408. package/docs/FineTuningJobMethod.md +36 -0
  409. package/docs/FrameworkVersion.md +40 -0
  410. package/docs/GPUType.md +48 -0
  411. package/docs/GPUTypePage.md +36 -0
  412. package/docs/GetHealth200Response.md +34 -0
  413. package/docs/GpuTypesApi.md +78 -0
  414. package/docs/ImagesGenerationsRequest.md +42 -0
  415. package/docs/ImagesResponse.md +38 -0
  416. package/docs/ImagesResponseDataInner.md +34 -0
  417. package/docs/ImagesResponseUsage.md +34 -0
  418. package/docs/IncludeItem.md +36 -0
  419. package/docs/InferenceApi.md +704 -0
  420. package/docs/Instance.md +60 -0
  421. package/docs/InstanceConnection.md +46 -0
  422. package/docs/InstancePage.md +36 -0
  423. package/docs/InstancesApi.md +392 -0
  424. package/docs/ListCommunityMachines200Response.md +34 -0
  425. package/docs/ListDeposits200Response.md +34 -0
  426. package/docs/MetaApi.md +124 -0
  427. package/docs/Model.md +58 -0
  428. package/docs/ModelList.md +36 -0
  429. package/docs/ModelParametersInner.md +44 -0
  430. package/docs/ModelPricing.md +50 -0
  431. package/docs/OpenAIErrorEnvelope.md +34 -0
  432. package/docs/OpenAIErrorEnvelopeError.md +40 -0
  433. package/docs/Operation.md +52 -0
  434. package/docs/OperationError.md +36 -0
  435. package/docs/OperationResult.md +41 -0
  436. package/docs/OperationsApi.md +80 -0
  437. package/docs/Pricing.md +62 -0
  438. package/docs/PricingApi.md +92 -0
  439. package/docs/PricingPage.md +36 -0
  440. package/docs/Problem.md +44 -0
  441. package/docs/RegisterCommunityMachineRequest.md +45 -0
  442. package/docs/SSHKey.md +40 -0
  443. package/docs/SSHKeyPage.md +36 -0
  444. package/docs/SpendingLimit.md +54 -0
  445. package/docs/SshKeysApi.md +305 -0
  446. package/docs/StreamOptions.md +34 -0
  447. package/docs/SupplierMachineView.md +69 -0
  448. package/docs/Template.md +59 -0
  449. package/docs/TemplateEnvInner.md +40 -0
  450. package/docs/TemplateList.md +36 -0
  451. package/docs/TemplatePortsInner.md +38 -0
  452. package/docs/TemplatesApi.md +145 -0
  453. package/docs/UpdateCommunityMachineRequest.md +34 -0
  454. package/docs/UpdateInstanceRequest.md +34 -0
  455. package/docs/UpdateSpendingLimitRequest.md +40 -0
  456. package/docs/Usage.md +38 -0
  457. package/docs/UsageApi.md +95 -0
  458. package/docs/UsageBucket.md +42 -0
  459. package/docs/UsagePage.md +36 -0
  460. package/docs/VMImage.md +40 -0
  461. package/docs/VideoCreateRequest.md +40 -0
  462. package/docs/VideoJob.md +56 -0
  463. package/docs/VideoList.md +38 -0
  464. package/docs/WebhookEndpoint.md +44 -0
  465. package/docs/WebhookEndpointPage.md +36 -0
  466. package/docs/WebhooksApi.md +302 -0
  467. package/package.json +22 -0
  468. package/src/apis/BillingApi.ts +327 -0
  469. package/src/apis/CommunityApi.ts +577 -0
  470. package/src/apis/EnvironmentsApi.ts +71 -0
  471. package/src/apis/FineTuningApi.ts +447 -0
  472. package/src/apis/GpuTypesApi.ts +82 -0
  473. package/src/apis/InferenceApi.ts +614 -0
  474. package/src/apis/InstancesApi.ts +390 -0
  475. package/src/apis/MetaApi.ts +101 -0
  476. package/src/apis/OperationsApi.ts +89 -0
  477. package/src/apis/PricingApi.ts +113 -0
  478. package/src/apis/SshKeysApi.ts +279 -0
  479. package/src/apis/TemplatesApi.ts +139 -0
  480. package/src/apis/UsageApi.ts +129 -0
  481. package/src/apis/WebhooksApi.ts +277 -0
  482. package/src/apis/index.ts +16 -0
  483. package/src/index.ts +5 -0
  484. package/src/models/ChatChoice.ts +102 -0
  485. package/src/models/ChatCompletionRequest.ts +122 -0
  486. package/src/models/ChatCompletionResponse.ts +138 -0
  487. package/src/models/ChatMessage.ts +87 -0
  488. package/src/models/CommunityEarnings.ts +92 -0
  489. package/src/models/CommunityEarningsEntry.ts +111 -0
  490. package/src/models/CommunityMachine.ts +190 -0
  491. package/src/models/CommunityMachineDelistResult.ts +86 -0
  492. package/src/models/CommunityMachineRegistration.ts +83 -0
  493. package/src/models/CommunitySupplier.ts +113 -0
  494. package/src/models/CreateCryptoDepositRequest.ts +108 -0
  495. package/src/models/CreateFineTuningJobRequest.ts +123 -0
  496. package/src/models/CreateFineTuningJobRequestGpuai.ts +73 -0
  497. package/src/models/CreateFineTuningJobRequestMethod.ts +93 -0
  498. package/src/models/CreateFineTuningJobRequestMethodLora.ts +81 -0
  499. package/src/models/CreateInstanceRequest.ts +167 -0
  500. package/src/models/CreateSshKeyRequest.ts +75 -0
  501. package/src/models/CreateWebhookEndpointRequest.ts +88 -0
  502. package/src/models/CryptoDeposit.ts +177 -0
  503. package/src/models/Environments.ts +115 -0
  504. package/src/models/FileObject.ts +133 -0
  505. package/src/models/FineTuningJob.ts +216 -0
  506. package/src/models/FineTuningJobError.ts +81 -0
  507. package/src/models/FineTuningJobEvent.ts +140 -0
  508. package/src/models/FineTuningJobEventList.ts +104 -0
  509. package/src/models/FineTuningJobList.ts +104 -0
  510. package/src/models/FineTuningJobMethod.ts +92 -0
  511. package/src/models/FrameworkVersion.ts +92 -0
  512. package/src/models/GPUType.ts +123 -0
  513. package/src/models/GPUTypePage.ts +83 -0
  514. package/src/models/GetHealth200Response.ts +75 -0
  515. package/src/models/ImagesGenerationsRequest.ts +109 -0
  516. package/src/models/ImagesResponse.ts +99 -0
  517. package/src/models/ImagesResponseDataInner.ts +66 -0
  518. package/src/models/ImagesResponseUsage.ts +66 -0
  519. package/src/models/IncludeItem.ts +74 -0
  520. package/src/models/Instance.ts +210 -0
  521. package/src/models/InstanceConnection.ts +113 -0
  522. package/src/models/InstancePage.ts +83 -0
  523. package/src/models/ListCommunityMachines200Response.ts +74 -0
  524. package/src/models/ListDeposits200Response.ts +74 -0
  525. package/src/models/Model.ts +214 -0
  526. package/src/models/ModelList.ts +95 -0
  527. package/src/models/ModelParametersInner.ts +120 -0
  528. package/src/models/ModelPricing.ts +129 -0
  529. package/src/models/OpenAIErrorEnvelope.ts +74 -0
  530. package/src/models/OpenAIErrorEnvelopeError.ts +92 -0
  531. package/src/models/Operation.ts +179 -0
  532. package/src/models/OperationError.ts +73 -0
  533. package/src/models/OperationResult.ts +89 -0
  534. package/src/models/Pricing.ts +206 -0
  535. package/src/models/PricingPage.ts +83 -0
  536. package/src/models/Problem.ts +135 -0
  537. package/src/models/RegisterCommunityMachineRequest.ts +116 -0
  538. package/src/models/SSHKey.ts +93 -0
  539. package/src/models/SSHKeyPage.ts +83 -0
  540. package/src/models/SpendingLimit.ts +165 -0
  541. package/src/models/StreamOptions.ts +65 -0
  542. package/src/models/SupplierMachineView.ts +241 -0
  543. package/src/models/Template.ts +200 -0
  544. package/src/models/TemplateEnvInner.ts +89 -0
  545. package/src/models/TemplateList.ts +95 -0
  546. package/src/models/TemplatePortsInner.ts +92 -0
  547. package/src/models/UpdateCommunityMachineRequest.ts +66 -0
  548. package/src/models/UpdateInstanceRequest.ts +65 -0
  549. package/src/models/UpdateSpendingLimitRequest.ts +102 -0
  550. package/src/models/Usage.ts +84 -0
  551. package/src/models/UsageBucket.ts +100 -0
  552. package/src/models/UsagePage.ts +83 -0
  553. package/src/models/VMImage.ts +92 -0
  554. package/src/models/VideoCreateRequest.ts +91 -0
  555. package/src/models/VideoJob.ts +184 -0
  556. package/src/models/VideoList.ts +104 -0
  557. package/src/models/WebhookEndpoint.ts +123 -0
  558. package/src/models/WebhookEndpointPage.ts +83 -0
  559. package/src/models/index.ts +77 -0
  560. package/src/runtime.ts +454 -0
  561. package/tsconfig.esm.json +7 -0
  562. package/tsconfig.json +16 -0
@@ -0,0 +1,468 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * GPU.ai Public Developer API
6
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@gpu.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.CommunityApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const CommunityEarnings_1 = require("../models/CommunityEarnings");
28
+ const CommunityMachineDelistResult_1 = require("../models/CommunityMachineDelistResult");
29
+ const CommunityMachineRegistration_1 = require("../models/CommunityMachineRegistration");
30
+ const CommunitySupplier_1 = require("../models/CommunitySupplier");
31
+ const ListCommunityMachines200Response_1 = require("../models/ListCommunityMachines200Response");
32
+ const RegisterCommunityMachineRequest_1 = require("../models/RegisterCommunityMachineRequest");
33
+ const SupplierMachineView_1 = require("../models/SupplierMachineView");
34
+ const UpdateCommunityMachineRequest_1 = require("../models/UpdateCommunityMachineRequest");
35
+ /**
36
+ *
37
+ */
38
+ class CommunityApi extends runtime.BaseAPI {
39
+ /**
40
+ * Creates request options for delistCommunityMachine without sending the request
41
+ */
42
+ delistCommunityMachineRequestOpts(requestParameters) {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ if (requestParameters['id'] == null) {
45
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling delistCommunityMachine().');
46
+ }
47
+ const queryParameters = {};
48
+ const headerParameters = {};
49
+ if (this.configuration && this.configuration.accessToken) {
50
+ const token = this.configuration.accessToken;
51
+ const tokenString = yield token("bearerAuth", []);
52
+ if (tokenString) {
53
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
54
+ }
55
+ }
56
+ let urlPath = `/community/machines/{id}/delist`;
57
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
58
+ return {
59
+ path: urlPath,
60
+ method: 'POST',
61
+ headers: headerParameters,
62
+ query: queryParameters,
63
+ };
64
+ });
65
+ }
66
+ /**
67
+ * Removes a machine the caller\'s org owns from supply (ONBD-04). Drain-not-kill: an occupied machine becomes `draining` (its customer rental keeps running until it ends naturally) and an idle machine becomes `delisted`. The endpoint never force-terminates a running rental. A missing or cross-org machine returns 404 with an indistinguishable body so existence never leaks across orgs. Requires the `community` scope (or `full_access`).
68
+ * Delist a Community Cloud machine
69
+ */
70
+ delistCommunityMachineRaw(requestParameters, initOverrides) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ const requestOptions = yield this.delistCommunityMachineRequestOpts(requestParameters);
73
+ const response = yield this.request(requestOptions, initOverrides);
74
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, CommunityMachineDelistResult_1.CommunityMachineDelistResultFromJSON)(jsonValue));
75
+ });
76
+ }
77
+ /**
78
+ * Removes a machine the caller\'s org owns from supply (ONBD-04). Drain-not-kill: an occupied machine becomes `draining` (its customer rental keeps running until it ends naturally) and an idle machine becomes `delisted`. The endpoint never force-terminates a running rental. A missing or cross-org machine returns 404 with an indistinguishable body so existence never leaks across orgs. Requires the `community` scope (or `full_access`).
79
+ * Delist a Community Cloud machine
80
+ */
81
+ delistCommunityMachine(requestParameters, initOverrides) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ const response = yield this.delistCommunityMachineRaw(requestParameters, initOverrides);
84
+ return yield response.value();
85
+ });
86
+ }
87
+ /**
88
+ * Creates request options for enableCommunitySupplier without sending the request
89
+ */
90
+ enableCommunitySupplierRequestOpts(requestParameters) {
91
+ return __awaiter(this, void 0, void 0, function* () {
92
+ const queryParameters = {};
93
+ const headerParameters = {};
94
+ if (requestParameters['idempotencyKey'] != null) {
95
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
96
+ }
97
+ if (this.configuration && this.configuration.accessToken) {
98
+ const token = this.configuration.accessToken;
99
+ const tokenString = yield token("bearerAuth", []);
100
+ if (tokenString) {
101
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
102
+ }
103
+ }
104
+ let urlPath = `/community/suppliers`;
105
+ return {
106
+ path: urlPath,
107
+ method: 'POST',
108
+ headers: headerParameters,
109
+ query: queryParameters,
110
+ };
111
+ });
112
+ }
113
+ /**
114
+ * Idempotently enables the Community Cloud supplier role for the organization the API key belongs to. A repeat call is a no-op that returns the same supplier record (200, not 201). Requires the `community` scope (or `full_access`).
115
+ * Enable the Community Cloud supplier role
116
+ */
117
+ enableCommunitySupplierRaw(requestParameters, initOverrides) {
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ const requestOptions = yield this.enableCommunitySupplierRequestOpts(requestParameters);
120
+ const response = yield this.request(requestOptions, initOverrides);
121
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, CommunitySupplier_1.CommunitySupplierFromJSON)(jsonValue));
122
+ });
123
+ }
124
+ /**
125
+ * Idempotently enables the Community Cloud supplier role for the organization the API key belongs to. A repeat call is a no-op that returns the same supplier record (200, not 201). Requires the `community` scope (or `full_access`).
126
+ * Enable the Community Cloud supplier role
127
+ */
128
+ enableCommunitySupplier() {
129
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
130
+ const response = yield this.enableCommunitySupplierRaw(requestParameters, initOverrides);
131
+ return yield response.value();
132
+ });
133
+ }
134
+ /**
135
+ * Creates request options for getCommunityEarnings without sending the request
136
+ */
137
+ getCommunityEarningsRequestOpts(requestParameters) {
138
+ return __awaiter(this, void 0, void 0, function* () {
139
+ const queryParameters = {};
140
+ if (requestParameters['limit'] != null) {
141
+ queryParameters['limit'] = requestParameters['limit'];
142
+ }
143
+ const headerParameters = {};
144
+ if (this.configuration && this.configuration.accessToken) {
145
+ const token = this.configuration.accessToken;
146
+ const tokenString = yield token("bearerAuth", []);
147
+ if (tokenString) {
148
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
149
+ }
150
+ }
151
+ let urlPath = `/community/earnings`;
152
+ return {
153
+ path: urlPath,
154
+ method: 'GET',
155
+ headers: headerParameters,
156
+ query: queryParameters,
157
+ };
158
+ });
159
+ }
160
+ /**
161
+ * Returns the caller org\'s supplier earnings — lifetime accrued and unpaid totals in cents plus recent ledger entries, newest first. An optional `limit` caps the ledger rows (server-clamped). Requires the `community` scope (read).
162
+ * Get your Community Cloud earnings
163
+ */
164
+ getCommunityEarningsRaw(requestParameters, initOverrides) {
165
+ return __awaiter(this, void 0, void 0, function* () {
166
+ const requestOptions = yield this.getCommunityEarningsRequestOpts(requestParameters);
167
+ const response = yield this.request(requestOptions, initOverrides);
168
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, CommunityEarnings_1.CommunityEarningsFromJSON)(jsonValue));
169
+ });
170
+ }
171
+ /**
172
+ * Returns the caller org\'s supplier earnings — lifetime accrued and unpaid totals in cents plus recent ledger entries, newest first. An optional `limit` caps the ledger rows (server-clamped). Requires the `community` scope (read).
173
+ * Get your Community Cloud earnings
174
+ */
175
+ getCommunityEarnings() {
176
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
177
+ const response = yield this.getCommunityEarningsRaw(requestParameters, initOverrides);
178
+ return yield response.value();
179
+ });
180
+ }
181
+ /**
182
+ * Creates request options for getCommunityMachine without sending the request
183
+ */
184
+ getCommunityMachineRequestOpts(requestParameters) {
185
+ return __awaiter(this, void 0, void 0, function* () {
186
+ if (requestParameters['id'] == null) {
187
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCommunityMachine().');
188
+ }
189
+ const queryParameters = {};
190
+ const headerParameters = {};
191
+ if (this.configuration && this.configuration.accessToken) {
192
+ const token = this.configuration.accessToken;
193
+ const tokenString = yield token("bearerAuth", []);
194
+ if (tokenString) {
195
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
196
+ }
197
+ }
198
+ let urlPath = `/community/machines/{id}`;
199
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
200
+ return {
201
+ path: urlPath,
202
+ method: 'GET',
203
+ headers: headerParameters,
204
+ query: queryParameters,
205
+ };
206
+ });
207
+ }
208
+ /**
209
+ * Returns one machine the caller\'s org owns, as a supplier-facing view (`occupied`/`online` projections — the renting customer\'s instance id is never exposed). A missing or cross-org machine returns 404 with an indistinguishable body. Requires the `community` scope (read).
210
+ * Get one of your Community Cloud machines
211
+ */
212
+ getCommunityMachineRaw(requestParameters, initOverrides) {
213
+ return __awaiter(this, void 0, void 0, function* () {
214
+ const requestOptions = yield this.getCommunityMachineRequestOpts(requestParameters);
215
+ const response = yield this.request(requestOptions, initOverrides);
216
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, SupplierMachineView_1.SupplierMachineViewFromJSON)(jsonValue));
217
+ });
218
+ }
219
+ /**
220
+ * Returns one machine the caller\'s org owns, as a supplier-facing view (`occupied`/`online` projections — the renting customer\'s instance id is never exposed). A missing or cross-org machine returns 404 with an indistinguishable body. Requires the `community` scope (read).
221
+ * Get one of your Community Cloud machines
222
+ */
223
+ getCommunityMachine(requestParameters, initOverrides) {
224
+ return __awaiter(this, void 0, void 0, function* () {
225
+ const response = yield this.getCommunityMachineRaw(requestParameters, initOverrides);
226
+ return yield response.value();
227
+ });
228
+ }
229
+ /**
230
+ * Creates request options for getCommunitySupplierMe without sending the request
231
+ */
232
+ getCommunitySupplierMeRequestOpts() {
233
+ return __awaiter(this, void 0, void 0, function* () {
234
+ const queryParameters = {};
235
+ const headerParameters = {};
236
+ if (this.configuration && this.configuration.accessToken) {
237
+ const token = this.configuration.accessToken;
238
+ const tokenString = yield token("bearerAuth", []);
239
+ if (tokenString) {
240
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
241
+ }
242
+ }
243
+ let urlPath = `/community/suppliers/me`;
244
+ return {
245
+ path: urlPath,
246
+ method: 'GET',
247
+ headers: headerParameters,
248
+ query: queryParameters,
249
+ };
250
+ });
251
+ }
252
+ /**
253
+ * Returns the community supplier record for the organization the API key belongs to, or 404 `not-a-supplier` when the role has not been enabled. Requires the `community` scope (read).
254
+ * Get the caller\'s Community Cloud supplier
255
+ */
256
+ getCommunitySupplierMeRaw(initOverrides) {
257
+ return __awaiter(this, void 0, void 0, function* () {
258
+ const requestOptions = yield this.getCommunitySupplierMeRequestOpts();
259
+ const response = yield this.request(requestOptions, initOverrides);
260
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, CommunitySupplier_1.CommunitySupplierFromJSON)(jsonValue));
261
+ });
262
+ }
263
+ /**
264
+ * Returns the community supplier record for the organization the API key belongs to, or 404 `not-a-supplier` when the role has not been enabled. Requires the `community` scope (read).
265
+ * Get the caller\'s Community Cloud supplier
266
+ */
267
+ getCommunitySupplierMe(initOverrides) {
268
+ return __awaiter(this, void 0, void 0, function* () {
269
+ const response = yield this.getCommunitySupplierMeRaw(initOverrides);
270
+ return yield response.value();
271
+ });
272
+ }
273
+ /**
274
+ * Creates request options for listCommunityMachines without sending the request
275
+ */
276
+ listCommunityMachinesRequestOpts() {
277
+ return __awaiter(this, void 0, void 0, function* () {
278
+ const queryParameters = {};
279
+ const headerParameters = {};
280
+ if (this.configuration && this.configuration.accessToken) {
281
+ const token = this.configuration.accessToken;
282
+ const tokenString = yield token("bearerAuth", []);
283
+ if (tokenString) {
284
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
285
+ }
286
+ }
287
+ let urlPath = `/community/machines`;
288
+ return {
289
+ path: urlPath,
290
+ method: 'GET',
291
+ headers: headerParameters,
292
+ query: queryParameters,
293
+ };
294
+ });
295
+ }
296
+ /**
297
+ * Returns every machine the caller\'s org has registered, newest first, as supplier-facing views (`occupied`/`online` projections — the renting customer\'s instance id is never exposed). Requires the `community` scope (read).
298
+ * List your Community Cloud machines
299
+ */
300
+ listCommunityMachinesRaw(initOverrides) {
301
+ return __awaiter(this, void 0, void 0, function* () {
302
+ const requestOptions = yield this.listCommunityMachinesRequestOpts();
303
+ const response = yield this.request(requestOptions, initOverrides);
304
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ListCommunityMachines200Response_1.ListCommunityMachines200ResponseFromJSON)(jsonValue));
305
+ });
306
+ }
307
+ /**
308
+ * Returns every machine the caller\'s org has registered, newest first, as supplier-facing views (`occupied`/`online` projections — the renting customer\'s instance id is never exposed). Requires the `community` scope (read).
309
+ * List your Community Cloud machines
310
+ */
311
+ listCommunityMachines(initOverrides) {
312
+ return __awaiter(this, void 0, void 0, function* () {
313
+ const response = yield this.listCommunityMachinesRaw(initOverrides);
314
+ return yield response.value();
315
+ });
316
+ }
317
+ /**
318
+ * Creates request options for reclaimCommunityMachine without sending the request
319
+ */
320
+ reclaimCommunityMachineRequestOpts(requestParameters) {
321
+ return __awaiter(this, void 0, void 0, function* () {
322
+ if (requestParameters['id'] == null) {
323
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling reclaimCommunityMachine().');
324
+ }
325
+ const queryParameters = {};
326
+ const headerParameters = {};
327
+ if (this.configuration && this.configuration.accessToken) {
328
+ const token = this.configuration.accessToken;
329
+ const tokenString = yield token("bearerAuth", []);
330
+ if (tokenString) {
331
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
332
+ }
333
+ }
334
+ let urlPath = `/community/machines/{id}/reclaim`;
335
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
336
+ return {
337
+ path: urlPath,
338
+ method: 'POST',
339
+ headers: headerParameters,
340
+ query: queryParameters,
341
+ };
342
+ });
343
+ }
344
+ /**
345
+ * The spot interruption mechanic — the supplier takes back a machine they listed as interruptible (tier=spot). Drain-not-kill: an occupied machine becomes `draining` (the renter gets the grace window, surfaced to the spot router as a preemption warning) and an idle machine becomes `delisted`. An on-demand machine cannot be reclaimed (409 `machine-not-spot`) — use delist instead. Requires the `community` scope (or `full_access`).
346
+ * Reclaim a spot-tier Community Cloud machine
347
+ */
348
+ reclaimCommunityMachineRaw(requestParameters, initOverrides) {
349
+ return __awaiter(this, void 0, void 0, function* () {
350
+ const requestOptions = yield this.reclaimCommunityMachineRequestOpts(requestParameters);
351
+ const response = yield this.request(requestOptions, initOverrides);
352
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, CommunityMachineDelistResult_1.CommunityMachineDelistResultFromJSON)(jsonValue));
353
+ });
354
+ }
355
+ /**
356
+ * The spot interruption mechanic — the supplier takes back a machine they listed as interruptible (tier=spot). Drain-not-kill: an occupied machine becomes `draining` (the renter gets the grace window, surfaced to the spot router as a preemption warning) and an idle machine becomes `delisted`. An on-demand machine cannot be reclaimed (409 `machine-not-spot`) — use delist instead. Requires the `community` scope (or `full_access`).
357
+ * Reclaim a spot-tier Community Cloud machine
358
+ */
359
+ reclaimCommunityMachine(requestParameters, initOverrides) {
360
+ return __awaiter(this, void 0, void 0, function* () {
361
+ const response = yield this.reclaimCommunityMachineRaw(requestParameters, initOverrides);
362
+ return yield response.value();
363
+ });
364
+ }
365
+ /**
366
+ * Creates request options for registerCommunityMachine without sending the request
367
+ */
368
+ registerCommunityMachineRequestOpts(requestParameters) {
369
+ return __awaiter(this, void 0, void 0, function* () {
370
+ const queryParameters = {};
371
+ const headerParameters = {};
372
+ headerParameters['Content-Type'] = 'application/json';
373
+ if (requestParameters['idempotencyKey'] != null) {
374
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
375
+ }
376
+ if (this.configuration && this.configuration.accessToken) {
377
+ const token = this.configuration.accessToken;
378
+ const tokenString = yield token("bearerAuth", []);
379
+ if (tokenString) {
380
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
381
+ }
382
+ }
383
+ let urlPath = `/community/machines`;
384
+ return {
385
+ path: urlPath,
386
+ method: 'POST',
387
+ headers: headerParameters,
388
+ query: queryParameters,
389
+ body: (0, RegisterCommunityMachineRequest_1.RegisterCommunityMachineRequestToJSON)(requestParameters['registerCommunityMachineRequest']),
390
+ };
391
+ });
392
+ }
393
+ /**
394
+ * Registers a self-declared machine under the caller\'s community supplier and mints a one-time enrollment token. All spec fields are optional — an empty body registers a placeholder in `pending_verification`. The `enrollment_token` is shown exactly once and never returned again. Requires the `community` scope (or `full_access`).
395
+ * Register a Community Cloud machine
396
+ */
397
+ registerCommunityMachineRaw(requestParameters, initOverrides) {
398
+ return __awaiter(this, void 0, void 0, function* () {
399
+ const requestOptions = yield this.registerCommunityMachineRequestOpts(requestParameters);
400
+ const response = yield this.request(requestOptions, initOverrides);
401
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, CommunityMachineRegistration_1.CommunityMachineRegistrationFromJSON)(jsonValue));
402
+ });
403
+ }
404
+ /**
405
+ * Registers a self-declared machine under the caller\'s community supplier and mints a one-time enrollment token. All spec fields are optional — an empty body registers a placeholder in `pending_verification`. The `enrollment_token` is shown exactly once and never returned again. Requires the `community` scope (or `full_access`).
406
+ * Register a Community Cloud machine
407
+ */
408
+ registerCommunityMachine() {
409
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
410
+ const response = yield this.registerCommunityMachineRaw(requestParameters, initOverrides);
411
+ return yield response.value();
412
+ });
413
+ }
414
+ /**
415
+ * Creates request options for updateCommunityMachine without sending the request
416
+ */
417
+ updateCommunityMachineRequestOpts(requestParameters) {
418
+ return __awaiter(this, void 0, void 0, function* () {
419
+ if (requestParameters['id'] == null) {
420
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateCommunityMachine().');
421
+ }
422
+ if (requestParameters['updateCommunityMachineRequest'] == null) {
423
+ throw new runtime.RequiredError('updateCommunityMachineRequest', 'Required parameter "updateCommunityMachineRequest" was null or undefined when calling updateCommunityMachine().');
424
+ }
425
+ const queryParameters = {};
426
+ const headerParameters = {};
427
+ headerParameters['Content-Type'] = 'application/json';
428
+ if (this.configuration && this.configuration.accessToken) {
429
+ const token = this.configuration.accessToken;
430
+ const tokenString = yield token("bearerAuth", []);
431
+ if (tokenString) {
432
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
433
+ }
434
+ }
435
+ let urlPath = `/community/machines/{id}`;
436
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
437
+ return {
438
+ path: urlPath,
439
+ method: 'PATCH',
440
+ headers: headerParameters,
441
+ query: queryParameters,
442
+ body: (0, UpdateCommunityMachineRequest_1.UpdateCommunityMachineRequestToJSON)(requestParameters['updateCommunityMachineRequest']),
443
+ };
444
+ });
445
+ }
446
+ /**
447
+ * Sets the machine\'s hourly price. `price_per_hour` is the WHOLE-MACHINE rate (never per-GPU). Prices below the platform floor are rejected with a `price-below-floor` problem carrying the concrete `floor_per_hour` extension member. A price change never affects an in-flight rental (its rate was snapshotted at provision); the catalog reprices on the next poll. Requires the `community` scope (or `full_access`).
448
+ * Update a Community Cloud machine\'s price
449
+ */
450
+ updateCommunityMachineRaw(requestParameters, initOverrides) {
451
+ return __awaiter(this, void 0, void 0, function* () {
452
+ const requestOptions = yield this.updateCommunityMachineRequestOpts(requestParameters);
453
+ const response = yield this.request(requestOptions, initOverrides);
454
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, SupplierMachineView_1.SupplierMachineViewFromJSON)(jsonValue));
455
+ });
456
+ }
457
+ /**
458
+ * Sets the machine\'s hourly price. `price_per_hour` is the WHOLE-MACHINE rate (never per-GPU). Prices below the platform floor are rejected with a `price-below-floor` problem carrying the concrete `floor_per_hour` extension member. A price change never affects an in-flight rental (its rate was snapshotted at provision); the catalog reprices on the next poll. Requires the `community` scope (or `full_access`).
459
+ * Update a Community Cloud machine\'s price
460
+ */
461
+ updateCommunityMachine(requestParameters, initOverrides) {
462
+ return __awaiter(this, void 0, void 0, function* () {
463
+ const response = yield this.updateCommunityMachineRaw(requestParameters, initOverrides);
464
+ return yield response.value();
465
+ });
466
+ }
467
+ }
468
+ exports.CommunityApi = CommunityApi;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import { type Environments } from '../models/Environments';
14
+ /**
15
+ *
16
+ */
17
+ export declare class EnvironmentsApi extends runtime.BaseAPI {
18
+ /**
19
+ * Creates request options for getEnvironments without sending the request
20
+ */
21
+ getEnvironmentsRequestOpts(): Promise<runtime.RequestOpts>;
22
+ /**
23
+ * The server-controlled launch environment catalog — the certified framework roster, the selectable version(s) per framework (the version picker), the \"What\'s included\" software lists, and the raw-VM OS catalog. These are exactly the values accepted by the `environment` field of POST /v1/instances.
24
+ * List launch environments (no auth required)
25
+ */
26
+ getEnvironmentsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Environments>>;
27
+ /**
28
+ * The server-controlled launch environment catalog — the certified framework roster, the selectable version(s) per framework (the version picker), the \"What\'s included\" software lists, and the raw-VM OS catalog. These are exactly the values accepted by the `environment` field of POST /v1/instances.
29
+ * List launch environments (no auth required)
30
+ */
31
+ getEnvironments(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Environments>;
32
+ }
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * GPU.ai Public Developer API
6
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@gpu.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.EnvironmentsApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const Environments_1 = require("../models/Environments");
28
+ /**
29
+ *
30
+ */
31
+ class EnvironmentsApi extends runtime.BaseAPI {
32
+ /**
33
+ * Creates request options for getEnvironments without sending the request
34
+ */
35
+ getEnvironmentsRequestOpts() {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ const queryParameters = {};
38
+ const headerParameters = {};
39
+ let urlPath = `/environments`;
40
+ return {
41
+ path: urlPath,
42
+ method: 'GET',
43
+ headers: headerParameters,
44
+ query: queryParameters,
45
+ };
46
+ });
47
+ }
48
+ /**
49
+ * The server-controlled launch environment catalog — the certified framework roster, the selectable version(s) per framework (the version picker), the \"What\'s included\" software lists, and the raw-VM OS catalog. These are exactly the values accepted by the `environment` field of POST /v1/instances.
50
+ * List launch environments (no auth required)
51
+ */
52
+ getEnvironmentsRaw(initOverrides) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ const requestOptions = yield this.getEnvironmentsRequestOpts();
55
+ const response = yield this.request(requestOptions, initOverrides);
56
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, Environments_1.EnvironmentsFromJSON)(jsonValue));
57
+ });
58
+ }
59
+ /**
60
+ * The server-controlled launch environment catalog — the certified framework roster, the selectable version(s) per framework (the version picker), the \"What\'s included\" software lists, and the raw-VM OS catalog. These are exactly the values accepted by the `environment` field of POST /v1/instances.
61
+ * List launch environments (no auth required)
62
+ */
63
+ getEnvironments(initOverrides) {
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ const response = yield this.getEnvironmentsRaw(initOverrides);
66
+ return yield response.value();
67
+ });
68
+ }
69
+ }
70
+ exports.EnvironmentsApi = EnvironmentsApi;