@gpuai/sdk 0.3.18 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/.openapi-generator/FILES +48 -0
  2. package/README.md +41 -2
  3. package/dist/apis/BillingApi.d.ts +70 -0
  4. package/dist/apis/BillingApi.js +197 -0
  5. package/dist/apis/FunctionsApi.d.ts +228 -0
  6. package/dist/apis/FunctionsApi.js +627 -0
  7. package/dist/apis/InstancesApi.d.ts +18 -0
  8. package/dist/apis/InstancesApi.js +49 -0
  9. package/dist/apis/index.d.ts +1 -0
  10. package/dist/apis/index.js +1 -0
  11. package/dist/esm/apis/BillingApi.d.ts +70 -0
  12. package/dist/esm/apis/BillingApi.js +197 -0
  13. package/dist/esm/apis/FunctionsApi.d.ts +228 -0
  14. package/dist/esm/apis/FunctionsApi.js +623 -0
  15. package/dist/esm/apis/InstancesApi.d.ts +18 -0
  16. package/dist/esm/apis/InstancesApi.js +49 -0
  17. package/dist/esm/apis/index.d.ts +1 -0
  18. package/dist/esm/apis/index.js +1 -0
  19. package/dist/esm/models/AutolaunchRule.d.ts +2 -1
  20. package/dist/esm/models/BillingDetails.d.ts +98 -0
  21. package/dist/esm/models/BillingDetails.js +85 -0
  22. package/dist/esm/models/CreateFunctionRequest.d.ts +32 -0
  23. package/dist/esm/models/CreateFunctionRequest.js +43 -0
  24. package/dist/esm/models/CreateFunctionRunRequest.d.ts +38 -0
  25. package/dist/esm/models/CreateFunctionRunRequest.js +45 -0
  26. package/dist/esm/models/CreateFunctionVersionRequest.d.ts +110 -0
  27. package/dist/esm/models/CreateFunctionVersionRequest.js +79 -0
  28. package/dist/esm/models/Function.d.ts +163 -0
  29. package/dist/esm/models/Function.js +109 -0
  30. package/dist/esm/models/FunctionList.d.ts +33 -0
  31. package/dist/esm/models/FunctionList.js +44 -0
  32. package/dist/esm/models/FunctionReplicaCounts.d.ts +44 -0
  33. package/dist/esm/models/FunctionReplicaCounts.js +51 -0
  34. package/dist/esm/models/FunctionRun.d.ts +130 -0
  35. package/dist/esm/models/FunctionRun.js +94 -0
  36. package/dist/esm/models/FunctionRunError.d.ts +44 -0
  37. package/dist/esm/models/FunctionRunError.js +49 -0
  38. package/dist/esm/models/FunctionRunList.d.ts +39 -0
  39. package/dist/esm/models/FunctionRunList.js +48 -0
  40. package/dist/esm/models/FunctionRunLogChunk.d.ts +59 -0
  41. package/dist/esm/models/FunctionRunLogChunk.js +63 -0
  42. package/dist/esm/models/FunctionRunLogs.d.ts +45 -0
  43. package/dist/esm/models/FunctionRunLogs.js +52 -0
  44. package/dist/esm/models/FunctionUpload.d.ts +51 -0
  45. package/dist/esm/models/FunctionUpload.js +59 -0
  46. package/dist/esm/models/FunctionVersion.d.ts +137 -0
  47. package/dist/esm/models/FunctionVersion.js +109 -0
  48. package/dist/esm/models/GpuSuggestion.d.ts +82 -0
  49. package/dist/esm/models/GpuSuggestion.js +77 -0
  50. package/dist/esm/models/GpuSuggestionCheaper.d.ts +62 -0
  51. package/dist/esm/models/GpuSuggestionCheaper.js +63 -0
  52. package/dist/esm/models/GpuSuggestionGpu.d.ts +50 -0
  53. package/dist/esm/models/GpuSuggestionGpu.js +55 -0
  54. package/dist/esm/models/Instance.d.ts +7 -0
  55. package/dist/esm/models/Instance.js +3 -0
  56. package/dist/esm/models/InstanceGpuMemory.d.ts +51 -0
  57. package/dist/esm/models/InstanceGpuMemory.js +55 -0
  58. package/dist/esm/models/Invoice.d.ts +68 -0
  59. package/dist/esm/models/Invoice.js +67 -0
  60. package/dist/esm/models/InvoiceList.d.ts +45 -0
  61. package/dist/esm/models/InvoiceList.js +50 -0
  62. package/dist/esm/models/ModelPricing.d.ts +46 -0
  63. package/dist/esm/models/ModelPricing.js +21 -0
  64. package/dist/esm/models/ModelRate.d.ts +62 -0
  65. package/dist/esm/models/ModelRate.js +51 -0
  66. package/dist/esm/models/PeakWindow.d.ts +38 -0
  67. package/dist/esm/models/PeakWindow.js +47 -0
  68. package/dist/esm/models/UpdateBillingDetailsRequest.d.ts +80 -0
  69. package/dist/esm/models/UpdateBillingDetailsRequest.js +57 -0
  70. package/dist/esm/models/index.d.ts +23 -0
  71. package/dist/esm/models/index.js +23 -0
  72. package/dist/esm/runtime.js +1 -1
  73. package/dist/models/AutolaunchRule.d.ts +2 -1
  74. package/dist/models/BillingDetails.d.ts +98 -0
  75. package/dist/models/BillingDetails.js +92 -0
  76. package/dist/models/CreateFunctionRequest.d.ts +32 -0
  77. package/dist/models/CreateFunctionRequest.js +50 -0
  78. package/dist/models/CreateFunctionRunRequest.d.ts +38 -0
  79. package/dist/models/CreateFunctionRunRequest.js +52 -0
  80. package/dist/models/CreateFunctionVersionRequest.d.ts +110 -0
  81. package/dist/models/CreateFunctionVersionRequest.js +86 -0
  82. package/dist/models/Function.d.ts +163 -0
  83. package/dist/models/Function.js +117 -0
  84. package/dist/models/FunctionList.d.ts +33 -0
  85. package/dist/models/FunctionList.js +51 -0
  86. package/dist/models/FunctionReplicaCounts.d.ts +44 -0
  87. package/dist/models/FunctionReplicaCounts.js +58 -0
  88. package/dist/models/FunctionRun.d.ts +130 -0
  89. package/dist/models/FunctionRun.js +102 -0
  90. package/dist/models/FunctionRunError.d.ts +44 -0
  91. package/dist/models/FunctionRunError.js +56 -0
  92. package/dist/models/FunctionRunList.d.ts +39 -0
  93. package/dist/models/FunctionRunList.js +55 -0
  94. package/dist/models/FunctionRunLogChunk.d.ts +59 -0
  95. package/dist/models/FunctionRunLogChunk.js +71 -0
  96. package/dist/models/FunctionRunLogs.d.ts +45 -0
  97. package/dist/models/FunctionRunLogs.js +59 -0
  98. package/dist/models/FunctionUpload.d.ts +51 -0
  99. package/dist/models/FunctionUpload.js +67 -0
  100. package/dist/models/FunctionVersion.d.ts +137 -0
  101. package/dist/models/FunctionVersion.js +117 -0
  102. package/dist/models/GpuSuggestion.d.ts +82 -0
  103. package/dist/models/GpuSuggestion.js +85 -0
  104. package/dist/models/GpuSuggestionCheaper.d.ts +62 -0
  105. package/dist/models/GpuSuggestionCheaper.js +70 -0
  106. package/dist/models/GpuSuggestionGpu.d.ts +50 -0
  107. package/dist/models/GpuSuggestionGpu.js +62 -0
  108. package/dist/models/Instance.d.ts +7 -0
  109. package/dist/models/Instance.js +3 -0
  110. package/dist/models/InstanceGpuMemory.d.ts +51 -0
  111. package/dist/models/InstanceGpuMemory.js +62 -0
  112. package/dist/models/Invoice.d.ts +68 -0
  113. package/dist/models/Invoice.js +74 -0
  114. package/dist/models/InvoiceList.d.ts +45 -0
  115. package/dist/models/InvoiceList.js +57 -0
  116. package/dist/models/ModelPricing.d.ts +46 -0
  117. package/dist/models/ModelPricing.js +22 -0
  118. package/dist/models/ModelRate.d.ts +62 -0
  119. package/dist/models/ModelRate.js +58 -0
  120. package/dist/models/PeakWindow.d.ts +38 -0
  121. package/dist/models/PeakWindow.js +54 -0
  122. package/dist/models/UpdateBillingDetailsRequest.d.ts +80 -0
  123. package/dist/models/UpdateBillingDetailsRequest.js +64 -0
  124. package/dist/models/index.d.ts +23 -0
  125. package/dist/models/index.js +23 -0
  126. package/dist/runtime.js +1 -1
  127. package/docs/BillingApi.md +299 -0
  128. package/docs/BillingDetails.md +56 -0
  129. package/docs/CreateFunctionRequest.md +34 -0
  130. package/docs/CreateFunctionRunRequest.md +36 -0
  131. package/docs/CreateFunctionVersionRequest.md +60 -0
  132. package/docs/Function.md +75 -0
  133. package/docs/FunctionList.md +34 -0
  134. package/docs/FunctionReplicaCounts.md +39 -0
  135. package/docs/FunctionRun.md +63 -0
  136. package/docs/FunctionRunError.md +38 -0
  137. package/docs/FunctionRunList.md +36 -0
  138. package/docs/FunctionRunLogChunk.md +40 -0
  139. package/docs/FunctionRunLogs.md +38 -0
  140. package/docs/FunctionUpload.md +38 -0
  141. package/docs/FunctionVersion.md +66 -0
  142. package/docs/FunctionsApi.md +880 -0
  143. package/docs/GpuSuggestion.md +47 -0
  144. package/docs/GpuSuggestionCheaper.md +45 -0
  145. package/docs/GpuSuggestionGpu.md +41 -0
  146. package/docs/Instance.md +2 -0
  147. package/docs/InstanceGpuMemory.md +41 -0
  148. package/docs/InstancesApi.md +75 -0
  149. package/docs/Invoice.md +46 -0
  150. package/docs/InvoiceList.md +38 -0
  151. package/docs/ModelPricing.md +12 -0
  152. package/docs/ModelRate.md +45 -0
  153. package/docs/PeakWindow.md +37 -0
  154. package/docs/UpdateBillingDetailsRequest.md +50 -0
  155. package/package.json +1 -1
  156. package/src/apis/BillingApi.ts +247 -0
  157. package/src/apis/FunctionsApi.ts +828 -0
  158. package/src/apis/InstancesApi.ts +64 -0
  159. package/src/apis/index.ts +1 -0
  160. package/src/models/AutolaunchRule.ts +2 -1
  161. package/src/models/BillingDetails.ts +164 -0
  162. package/src/models/CreateFunctionRequest.ts +66 -0
  163. package/src/models/CreateFunctionRunRequest.ts +74 -0
  164. package/src/models/CreateFunctionVersionRequest.ts +175 -0
  165. package/src/models/Function.ts +255 -0
  166. package/src/models/FunctionList.ts +74 -0
  167. package/src/models/FunctionReplicaCounts.ts +84 -0
  168. package/src/models/FunctionRun.ts +207 -0
  169. package/src/models/FunctionRunError.ts +83 -0
  170. package/src/models/FunctionRunList.ts +83 -0
  171. package/src/models/FunctionRunLogChunk.ts +105 -0
  172. package/src/models/FunctionRunLogs.ts +92 -0
  173. package/src/models/FunctionUpload.ts +96 -0
  174. package/src/models/FunctionVersion.ts +226 -0
  175. package/src/models/GpuSuggestion.ts +150 -0
  176. package/src/models/GpuSuggestionCheaper.ts +111 -0
  177. package/src/models/GpuSuggestionGpu.ts +93 -0
  178. package/src/models/Instance.ts +15 -0
  179. package/src/models/InstanceGpuMemory.ts +94 -0
  180. package/src/models/Invoice.ts +120 -0
  181. package/src/models/InvoiceList.ts +91 -0
  182. package/src/models/ModelPricing.ts +74 -0
  183. package/src/models/ModelRate.ts +105 -0
  184. package/src/models/PeakWindow.ts +75 -0
  185. package/src/models/UpdateBillingDetailsRequest.ts +129 -0
  186. package/src/models/index.ts +23 -0
  187. package/src/runtime.ts +1 -1
@@ -0,0 +1,109 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.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
+ import { FunctionUploadFromJSON, FunctionUploadToJSON, } from './FunctionUpload';
15
+ /**
16
+ * @export
17
+ */
18
+ export const FunctionVersionStatusEnum = {
19
+ PendingUpload: 'pending_upload',
20
+ Ready: 'ready'
21
+ };
22
+ /**
23
+ * Check if a given object implements the FunctionVersion interface.
24
+ */
25
+ export function instanceOfFunctionVersion(value) {
26
+ if (!('id' in value) || value['id'] === undefined)
27
+ return false;
28
+ if ((!('functionId' in value) && !('function_id' in value)) || (value['functionId'] === undefined && value['function_id'] === undefined))
29
+ return false;
30
+ if (!('status' in value) || value['status'] === undefined)
31
+ return false;
32
+ if ((!('contentHash' in value) && !('content_hash' in value)) || (value['contentHash'] === undefined && value['content_hash'] === undefined))
33
+ return false;
34
+ if ((!('pythonVersion' in value) && !('python_version' in value)) || (value['pythonVersion'] === undefined && value['python_version'] === undefined))
35
+ return false;
36
+ if ((!('cloudpickleVersion' in value) && !('cloudpickle_version' in value)) || (value['cloudpickleVersion'] === undefined && value['cloudpickle_version'] === undefined))
37
+ return false;
38
+ if (!('pip' in value) || value['pip'] === undefined)
39
+ return false;
40
+ if ((!('gpuCount' in value) && !('gpu_count' in value)) || (value['gpuCount'] === undefined && value['gpu_count'] === undefined))
41
+ return false;
42
+ if ((!('minVramGb' in value) && !('min_vram_gb' in value)) || (value['minVramGb'] === undefined && value['min_vram_gb'] === undefined))
43
+ return false;
44
+ if (!('regions' in value) || value['regions'] === undefined)
45
+ return false;
46
+ if (!('timeout' in value) || value['timeout'] === undefined)
47
+ return false;
48
+ if ((!('idleTimeout' in value) && !('idle_timeout' in value)) || (value['idleTimeout'] === undefined && value['idle_timeout'] === undefined))
49
+ return false;
50
+ if ((!('maxConcurrency' in value) && !('max_concurrency' in value)) || (value['maxConcurrency'] === undefined && value['max_concurrency'] === undefined))
51
+ return false;
52
+ if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
53
+ return false;
54
+ return true;
55
+ }
56
+ export function FunctionVersionFromJSON(json) {
57
+ return FunctionVersionFromJSONTyped(json, false);
58
+ }
59
+ export function FunctionVersionFromJSONTyped(json, ignoreDiscriminator) {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+ 'id': json['id'],
65
+ 'functionId': json['function_id'],
66
+ 'status': json['status'],
67
+ 'contentHash': json['content_hash'],
68
+ 'upload': json['upload'] === undefined ? undefined : json['upload'] === null ? null : FunctionUploadFromJSON(json['upload']),
69
+ 'pythonVersion': json['python_version'],
70
+ 'cloudpickleVersion': json['cloudpickle_version'],
71
+ 'pip': json['pip'],
72
+ 'gpu': json['gpu'] === undefined ? undefined : json['gpu'] === null ? null : json['gpu'],
73
+ 'gpuCount': json['gpu_count'],
74
+ 'minVramGb': json['min_vram_gb'],
75
+ 'regions': json['regions'],
76
+ 'maxPricePerHour': json['max_price_per_hour'] === undefined ? undefined : json['max_price_per_hour'] === null ? null : json['max_price_per_hour'],
77
+ 'timeout': json['timeout'],
78
+ 'idleTimeout': json['idle_timeout'],
79
+ 'maxConcurrency': json['max_concurrency'],
80
+ 'createdAt': (new Date(json['created_at'])),
81
+ };
82
+ }
83
+ export function FunctionVersionToJSON(json) {
84
+ return FunctionVersionToJSONTyped(json, false);
85
+ }
86
+ export function FunctionVersionToJSONTyped(value, ignoreDiscriminator = false) {
87
+ if (value == null) {
88
+ return value;
89
+ }
90
+ return {
91
+ 'id': value['id'],
92
+ 'function_id': value['functionId'],
93
+ 'status': value['status'],
94
+ 'content_hash': value['contentHash'],
95
+ 'upload': FunctionUploadToJSON(value['upload']),
96
+ 'python_version': value['pythonVersion'],
97
+ 'cloudpickle_version': value['cloudpickleVersion'],
98
+ 'pip': value['pip'],
99
+ 'gpu': value['gpu'],
100
+ 'gpu_count': value['gpuCount'],
101
+ 'min_vram_gb': value['minVramGb'],
102
+ 'regions': value['regions'],
103
+ 'max_price_per_hour': value['maxPricePerHour'],
104
+ 'timeout': value['timeout'],
105
+ 'idle_timeout': value['idleTimeout'],
106
+ 'max_concurrency': value['maxConcurrency'],
107
+ 'created_at': value['createdAt'].toISOString(),
108
+ };
109
+ }
@@ -0,0 +1,82 @@
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 type { GpuSuggestionCheaper } from './GpuSuggestionCheaper';
13
+ import type { GpuSuggestionGpu } from './GpuSuggestionGpu';
14
+ /**
15
+ * Whether a lower-priced GPU model would have fit an instance's observed peak GPU memory. It names GPU models and prices only.
16
+ *
17
+ * @export
18
+ * @interface GpuSuggestion
19
+ */
20
+ export interface GpuSuggestion {
21
+ /**
22
+ * `suggestion` when a cheaper model fits and the saving is at least 10% and $0.05 per hour. `insufficient_data` until the instance has at least 30 samples over at least an hour. `no_cheaper_fit` otherwise.
23
+ *
24
+ * @type {GpuSuggestionStatusEnum}
25
+ * @memberof GpuSuggestion
26
+ */
27
+ status: GpuSuggestionStatusEnum;
28
+ /**
29
+ * Highest GPU memory seen, in MiB. Null with no telemetry.
30
+ * @type {number}
31
+ * @memberof GpuSuggestion
32
+ */
33
+ peakUsedMb: number | null;
34
+ /**
35
+ * The peak plus headroom (25% and 1024 MiB), in MiB: the memory a suggested model must have. Null until there is enough telemetry.
36
+ *
37
+ * @type {number}
38
+ * @memberof GpuSuggestion
39
+ */
40
+ requiredMb: number | null;
41
+ /**
42
+ *
43
+ * @type {number}
44
+ * @memberof GpuSuggestion
45
+ */
46
+ samples: number;
47
+ /**
48
+ * Minutes between the first and the latest telemetry sample.
49
+ * @type {number}
50
+ * @memberof GpuSuggestion
51
+ */
52
+ observedMinutes: number;
53
+ /**
54
+ *
55
+ * @type {GpuSuggestionGpu}
56
+ * @memberof GpuSuggestion
57
+ */
58
+ current: GpuSuggestionGpu;
59
+ /**
60
+ * Set only when status is `suggestion`.
61
+ * @type {GpuSuggestionCheaper}
62
+ * @memberof GpuSuggestion
63
+ */
64
+ suggestion: GpuSuggestionCheaper | null;
65
+ }
66
+ /**
67
+ * @export
68
+ */
69
+ export declare const GpuSuggestionStatusEnum: {
70
+ readonly Suggestion: "suggestion";
71
+ readonly InsufficientData: "insufficient_data";
72
+ readonly NoCheaperFit: "no_cheaper_fit";
73
+ };
74
+ export type GpuSuggestionStatusEnum = typeof GpuSuggestionStatusEnum[keyof typeof GpuSuggestionStatusEnum];
75
+ /**
76
+ * Check if a given object implements the GpuSuggestion interface.
77
+ */
78
+ export declare function instanceOfGpuSuggestion(value: object): value is GpuSuggestion;
79
+ export declare function GpuSuggestionFromJSON(json: any): GpuSuggestion;
80
+ export declare function GpuSuggestionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GpuSuggestion;
81
+ export declare function GpuSuggestionToJSON(json: any): GpuSuggestion;
82
+ export declare function GpuSuggestionToJSONTyped(value?: GpuSuggestion | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,77 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.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
+ import { GpuSuggestionCheaperFromJSON, GpuSuggestionCheaperToJSON, } from './GpuSuggestionCheaper';
15
+ import { GpuSuggestionGpuFromJSON, GpuSuggestionGpuToJSON, } from './GpuSuggestionGpu';
16
+ /**
17
+ * @export
18
+ */
19
+ export const GpuSuggestionStatusEnum = {
20
+ Suggestion: 'suggestion',
21
+ InsufficientData: 'insufficient_data',
22
+ NoCheaperFit: 'no_cheaper_fit'
23
+ };
24
+ /**
25
+ * Check if a given object implements the GpuSuggestion interface.
26
+ */
27
+ export function instanceOfGpuSuggestion(value) {
28
+ if (!('status' in value) || value['status'] === undefined)
29
+ return false;
30
+ if ((!('peakUsedMb' in value) && !('peak_used_mb' in value)) || (value['peakUsedMb'] === undefined && value['peak_used_mb'] === undefined))
31
+ return false;
32
+ if ((!('requiredMb' in value) && !('required_mb' in value)) || (value['requiredMb'] === undefined && value['required_mb'] === undefined))
33
+ return false;
34
+ if (!('samples' in value) || value['samples'] === undefined)
35
+ return false;
36
+ if ((!('observedMinutes' in value) && !('observed_minutes' in value)) || (value['observedMinutes'] === undefined && value['observed_minutes'] === undefined))
37
+ return false;
38
+ if (!('current' in value) || value['current'] === undefined)
39
+ return false;
40
+ if (!('suggestion' in value) || value['suggestion'] === undefined)
41
+ return false;
42
+ return true;
43
+ }
44
+ export function GpuSuggestionFromJSON(json) {
45
+ return GpuSuggestionFromJSONTyped(json, false);
46
+ }
47
+ export function GpuSuggestionFromJSONTyped(json, ignoreDiscriminator) {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+ 'status': json['status'],
53
+ 'peakUsedMb': json['peak_used_mb'],
54
+ 'requiredMb': json['required_mb'],
55
+ 'samples': json['samples'],
56
+ 'observedMinutes': json['observed_minutes'],
57
+ 'current': GpuSuggestionGpuFromJSON(json['current']),
58
+ 'suggestion': GpuSuggestionCheaperFromJSON(json['suggestion']),
59
+ };
60
+ }
61
+ export function GpuSuggestionToJSON(json) {
62
+ return GpuSuggestionToJSONTyped(json, false);
63
+ }
64
+ export function GpuSuggestionToJSONTyped(value, ignoreDiscriminator = false) {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+ return {
69
+ 'status': value['status'],
70
+ 'peak_used_mb': value['peakUsedMb'],
71
+ 'required_mb': value['requiredMb'],
72
+ 'samples': value['samples'],
73
+ 'observed_minutes': value['observedMinutes'],
74
+ 'current': GpuSuggestionGpuToJSON(value['current']),
75
+ 'suggestion': GpuSuggestionCheaperToJSON(value['suggestion']),
76
+ };
77
+ }
@@ -0,0 +1,62 @@
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
+ /**
13
+ * The suggested GPU model and what it would save.
14
+ * @export
15
+ * @interface GpuSuggestionCheaper
16
+ */
17
+ export interface GpuSuggestionCheaper {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof GpuSuggestionCheaper
22
+ */
23
+ gpuType: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof GpuSuggestionCheaper
28
+ */
29
+ gpuName: string;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof GpuSuggestionCheaper
34
+ */
35
+ vramGb: number;
36
+ /**
37
+ * The cheapest current listing for this model, per hour.
38
+ * @type {number}
39
+ * @memberof GpuSuggestionCheaper
40
+ */
41
+ pricePerHour: number;
42
+ /**
43
+ * The instance's hourly price minus this model's.
44
+ * @type {number}
45
+ * @memberof GpuSuggestionCheaper
46
+ */
47
+ savingPerHour: number;
48
+ /**
49
+ * The saving as a percentage of the instance's hourly price.
50
+ * @type {number}
51
+ * @memberof GpuSuggestionCheaper
52
+ */
53
+ savingPct: number;
54
+ }
55
+ /**
56
+ * Check if a given object implements the GpuSuggestionCheaper interface.
57
+ */
58
+ export declare function instanceOfGpuSuggestionCheaper(value: object): value is GpuSuggestionCheaper;
59
+ export declare function GpuSuggestionCheaperFromJSON(json: any): GpuSuggestionCheaper;
60
+ export declare function GpuSuggestionCheaperFromJSONTyped(json: any, ignoreDiscriminator: boolean): GpuSuggestionCheaper;
61
+ export declare function GpuSuggestionCheaperToJSON(json: any): GpuSuggestionCheaper;
62
+ export declare function GpuSuggestionCheaperToJSONTyped(value?: GpuSuggestionCheaper | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,63 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.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
+ * Check if a given object implements the GpuSuggestionCheaper interface.
16
+ */
17
+ export function instanceOfGpuSuggestionCheaper(value) {
18
+ if ((!('gpuType' in value) && !('gpu_type' in value)) || (value['gpuType'] === undefined && value['gpu_type'] === undefined))
19
+ return false;
20
+ if ((!('gpuName' in value) && !('gpu_name' in value)) || (value['gpuName'] === undefined && value['gpu_name'] === undefined))
21
+ return false;
22
+ if ((!('vramGb' in value) && !('vram_gb' in value)) || (value['vramGb'] === undefined && value['vram_gb'] === undefined))
23
+ return false;
24
+ if ((!('pricePerHour' in value) && !('price_per_hour' in value)) || (value['pricePerHour'] === undefined && value['price_per_hour'] === undefined))
25
+ return false;
26
+ if ((!('savingPerHour' in value) && !('saving_per_hour' in value)) || (value['savingPerHour'] === undefined && value['saving_per_hour'] === undefined))
27
+ return false;
28
+ if ((!('savingPct' in value) && !('saving_pct' in value)) || (value['savingPct'] === undefined && value['saving_pct'] === undefined))
29
+ return false;
30
+ return true;
31
+ }
32
+ export function GpuSuggestionCheaperFromJSON(json) {
33
+ return GpuSuggestionCheaperFromJSONTyped(json, false);
34
+ }
35
+ export function GpuSuggestionCheaperFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'gpuType': json['gpu_type'],
41
+ 'gpuName': json['gpu_name'],
42
+ 'vramGb': json['vram_gb'],
43
+ 'pricePerHour': json['price_per_hour'],
44
+ 'savingPerHour': json['saving_per_hour'],
45
+ 'savingPct': json['saving_pct'],
46
+ };
47
+ }
48
+ export function GpuSuggestionCheaperToJSON(json) {
49
+ return GpuSuggestionCheaperToJSONTyped(json, false);
50
+ }
51
+ export function GpuSuggestionCheaperToJSONTyped(value, ignoreDiscriminator = false) {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+ 'gpu_type': value['gpuType'],
57
+ 'gpu_name': value['gpuName'],
58
+ 'vram_gb': value['vramGb'],
59
+ 'price_per_hour': value['pricePerHour'],
60
+ 'saving_per_hour': value['savingPerHour'],
61
+ 'saving_pct': value['savingPct'],
62
+ };
63
+ }
@@ -0,0 +1,50 @@
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
+ /**
13
+ * A GPU model at an hourly price.
14
+ * @export
15
+ * @interface GpuSuggestionGpu
16
+ */
17
+ export interface GpuSuggestionGpu {
18
+ /**
19
+ * The GPU model id, as in GET /v1/gpu-types.
20
+ * @type {string}
21
+ * @memberof GpuSuggestionGpu
22
+ */
23
+ gpuType: string;
24
+ /**
25
+ * The GPU model's display name.
26
+ * @type {string}
27
+ * @memberof GpuSuggestionGpu
28
+ */
29
+ gpuName: string;
30
+ /**
31
+ * Memory per GPU, in GB.
32
+ * @type {number}
33
+ * @memberof GpuSuggestionGpu
34
+ */
35
+ vramGb: number;
36
+ /**
37
+ * Hourly price for the same number of GPUs as the instance.
38
+ * @type {number}
39
+ * @memberof GpuSuggestionGpu
40
+ */
41
+ pricePerHour: number;
42
+ }
43
+ /**
44
+ * Check if a given object implements the GpuSuggestionGpu interface.
45
+ */
46
+ export declare function instanceOfGpuSuggestionGpu(value: object): value is GpuSuggestionGpu;
47
+ export declare function GpuSuggestionGpuFromJSON(json: any): GpuSuggestionGpu;
48
+ export declare function GpuSuggestionGpuFromJSONTyped(json: any, ignoreDiscriminator: boolean): GpuSuggestionGpu;
49
+ export declare function GpuSuggestionGpuToJSON(json: any): GpuSuggestionGpu;
50
+ export declare function GpuSuggestionGpuToJSONTyped(value?: GpuSuggestionGpu | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.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
+ * Check if a given object implements the GpuSuggestionGpu interface.
16
+ */
17
+ export function instanceOfGpuSuggestionGpu(value) {
18
+ if ((!('gpuType' in value) && !('gpu_type' in value)) || (value['gpuType'] === undefined && value['gpu_type'] === undefined))
19
+ return false;
20
+ if ((!('gpuName' in value) && !('gpu_name' in value)) || (value['gpuName'] === undefined && value['gpu_name'] === undefined))
21
+ return false;
22
+ if ((!('vramGb' in value) && !('vram_gb' in value)) || (value['vramGb'] === undefined && value['vram_gb'] === undefined))
23
+ return false;
24
+ if ((!('pricePerHour' in value) && !('price_per_hour' in value)) || (value['pricePerHour'] === undefined && value['price_per_hour'] === undefined))
25
+ return false;
26
+ return true;
27
+ }
28
+ export function GpuSuggestionGpuFromJSON(json) {
29
+ return GpuSuggestionGpuFromJSONTyped(json, false);
30
+ }
31
+ export function GpuSuggestionGpuFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'gpuType': json['gpu_type'],
37
+ 'gpuName': json['gpu_name'],
38
+ 'vramGb': json['vram_gb'],
39
+ 'pricePerHour': json['price_per_hour'],
40
+ };
41
+ }
42
+ export function GpuSuggestionGpuToJSON(json) {
43
+ return GpuSuggestionGpuToJSONTyped(json, false);
44
+ }
45
+ export function GpuSuggestionGpuToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'gpu_type': value['gpuType'],
51
+ 'gpu_name': value['gpuName'],
52
+ 'vram_gb': value['vramGb'],
53
+ 'price_per_hour': value['pricePerHour'],
54
+ };
55
+ }
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { InstanceConnection } from './InstanceConnection';
13
+ import type { InstanceGpuMemory } from './InstanceGpuMemory';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -64,6 +65,12 @@ export interface Instance {
64
65
  * @memberof Instance
65
66
  */
66
67
  pricePerHour: number;
68
+ /**
69
+ *
70
+ * @type {InstanceGpuMemory}
71
+ * @memberof Instance
72
+ */
73
+ gpuMemory?: InstanceGpuMemory;
67
74
  /**
68
75
  *
69
76
  * @type {InstanceConnection}
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { InstanceConnectionFromJSON, InstanceConnectionToJSON, } from './InstanceConnection';
15
+ import { InstanceGpuMemoryFromJSON, InstanceGpuMemoryToJSON, } from './InstanceGpuMemory';
15
16
  /**
16
17
  * @export
17
18
  */
@@ -70,6 +71,7 @@ export function InstanceFromJSONTyped(json, ignoreDiscriminator) {
70
71
  'region': json['region'],
71
72
  'tier': json['tier'],
72
73
  'pricePerHour': json['price_per_hour'],
74
+ 'gpuMemory': json['gpu_memory'] == null ? undefined : InstanceGpuMemoryFromJSON(json['gpu_memory']),
73
75
  'connection': json['connection'] == null ? undefined : InstanceConnectionFromJSON(json['connection']),
74
76
  'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
75
77
  'image': json['image'] == null ? undefined : json['image'],
@@ -99,6 +101,7 @@ export function InstanceToJSONTyped(value, ignoreDiscriminator = false) {
99
101
  'region': value['region'],
100
102
  'tier': value['tier'],
101
103
  'price_per_hour': value['pricePerHour'],
104
+ 'gpu_memory': InstanceGpuMemoryToJSON(value['gpuMemory']),
102
105
  'connection': InstanceConnectionToJSON(value['connection']),
103
106
  'disk_gb': value['diskGb'],
104
107
  'image': value['image'],
@@ -0,0 +1,51 @@
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
+ /**
13
+ * The highest GPU memory use seen on an instance since launch, from the telemetry every instance reports about every two minutes. On an instance with several GPUs it is the busiest GPU. Absent on an instance until its first sample arrives.
14
+ *
15
+ * @export
16
+ * @interface InstanceGpuMemory
17
+ */
18
+ export interface InstanceGpuMemory {
19
+ /**
20
+ * Highest memory in use on the GPU, in MiB.
21
+ * @type {number}
22
+ * @memberof InstanceGpuMemory
23
+ */
24
+ peakUsedMb: number;
25
+ /**
26
+ * The GPU's total memory, in MiB.
27
+ * @type {number}
28
+ * @memberof InstanceGpuMemory
29
+ */
30
+ totalMb: number;
31
+ /**
32
+ * How many telemetry samples the peak is taken from.
33
+ * @type {number}
34
+ * @memberof InstanceGpuMemory
35
+ */
36
+ samples: number;
37
+ /**
38
+ *
39
+ * @type {Date}
40
+ * @memberof InstanceGpuMemory
41
+ */
42
+ lastSampleAt: Date;
43
+ }
44
+ /**
45
+ * Check if a given object implements the InstanceGpuMemory interface.
46
+ */
47
+ export declare function instanceOfInstanceGpuMemory(value: object): value is InstanceGpuMemory;
48
+ export declare function InstanceGpuMemoryFromJSON(json: any): InstanceGpuMemory;
49
+ export declare function InstanceGpuMemoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): InstanceGpuMemory;
50
+ export declare function InstanceGpuMemoryToJSON(json: any): InstanceGpuMemory;
51
+ export declare function InstanceGpuMemoryToJSONTyped(value?: InstanceGpuMemory | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.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
+ * Check if a given object implements the InstanceGpuMemory interface.
16
+ */
17
+ export function instanceOfInstanceGpuMemory(value) {
18
+ if ((!('peakUsedMb' in value) && !('peak_used_mb' in value)) || (value['peakUsedMb'] === undefined && value['peak_used_mb'] === undefined))
19
+ return false;
20
+ if ((!('totalMb' in value) && !('total_mb' in value)) || (value['totalMb'] === undefined && value['total_mb'] === undefined))
21
+ return false;
22
+ if (!('samples' in value) || value['samples'] === undefined)
23
+ return false;
24
+ if ((!('lastSampleAt' in value) && !('last_sample_at' in value)) || (value['lastSampleAt'] === undefined && value['last_sample_at'] === undefined))
25
+ return false;
26
+ return true;
27
+ }
28
+ export function InstanceGpuMemoryFromJSON(json) {
29
+ return InstanceGpuMemoryFromJSONTyped(json, false);
30
+ }
31
+ export function InstanceGpuMemoryFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'peakUsedMb': json['peak_used_mb'],
37
+ 'totalMb': json['total_mb'],
38
+ 'samples': json['samples'],
39
+ 'lastSampleAt': (new Date(json['last_sample_at'])),
40
+ };
41
+ }
42
+ export function InstanceGpuMemoryToJSON(json) {
43
+ return InstanceGpuMemoryToJSONTyped(json, false);
44
+ }
45
+ export function InstanceGpuMemoryToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'peak_used_mb': value['peakUsedMb'],
51
+ 'total_mb': value['totalMb'],
52
+ 'samples': value['samples'],
53
+ 'last_sample_at': value['lastSampleAt'].toISOString(),
54
+ };
55
+ }