@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,47 @@
1
+
2
+ # GpuSuggestion
3
+
4
+ Whether a lower-priced GPU model would have fit an instance\'s observed peak GPU memory. It names GPU models and prices only.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `status` | string
11
+ `peakUsedMb` | number
12
+ `requiredMb` | number
13
+ `samples` | number
14
+ `observedMinutes` | number
15
+ `current` | [GpuSuggestionGpu](GpuSuggestionGpu.md)
16
+ `suggestion` | [GpuSuggestionCheaper](GpuSuggestionCheaper.md)
17
+
18
+ ## Example
19
+
20
+ ```typescript
21
+ import type { GpuSuggestion } from '@gpuai/sdk'
22
+
23
+ // TODO: Update the object below with actual values
24
+ const example = {
25
+ "status": null,
26
+ "peakUsedMb": null,
27
+ "requiredMb": null,
28
+ "samples": null,
29
+ "observedMinutes": null,
30
+ "current": null,
31
+ "suggestion": null,
32
+ } satisfies GpuSuggestion
33
+
34
+ console.log(example)
35
+
36
+ // Convert the instance to a JSON string
37
+ const exampleJSON: string = JSON.stringify(example)
38
+ console.log(exampleJSON)
39
+
40
+ // Parse the JSON string back to an object
41
+ const exampleParsed = JSON.parse(exampleJSON) as GpuSuggestion
42
+ console.log(exampleParsed)
43
+ ```
44
+
45
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
46
+
47
+
@@ -0,0 +1,45 @@
1
+
2
+ # GpuSuggestionCheaper
3
+
4
+ The suggested GPU model and what it would save.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `gpuType` | string
11
+ `gpuName` | string
12
+ `vramGb` | number
13
+ `pricePerHour` | number
14
+ `savingPerHour` | number
15
+ `savingPct` | number
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import type { GpuSuggestionCheaper } from '@gpuai/sdk'
21
+
22
+ // TODO: Update the object below with actual values
23
+ const example = {
24
+ "gpuType": null,
25
+ "gpuName": null,
26
+ "vramGb": null,
27
+ "pricePerHour": null,
28
+ "savingPerHour": null,
29
+ "savingPct": null,
30
+ } satisfies GpuSuggestionCheaper
31
+
32
+ console.log(example)
33
+
34
+ // Convert the instance to a JSON string
35
+ const exampleJSON: string = JSON.stringify(example)
36
+ console.log(exampleJSON)
37
+
38
+ // Parse the JSON string back to an object
39
+ const exampleParsed = JSON.parse(exampleJSON) as GpuSuggestionCheaper
40
+ console.log(exampleParsed)
41
+ ```
42
+
43
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
44
+
45
+
@@ -0,0 +1,41 @@
1
+
2
+ # GpuSuggestionGpu
3
+
4
+ A GPU model at an hourly price.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `gpuType` | string
11
+ `gpuName` | string
12
+ `vramGb` | number
13
+ `pricePerHour` | number
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import type { GpuSuggestionGpu } from '@gpuai/sdk'
19
+
20
+ // TODO: Update the object below with actual values
21
+ const example = {
22
+ "gpuType": null,
23
+ "gpuName": null,
24
+ "vramGb": null,
25
+ "pricePerHour": null,
26
+ } satisfies GpuSuggestionGpu
27
+
28
+ console.log(example)
29
+
30
+ // Convert the instance to a JSON string
31
+ const exampleJSON: string = JSON.stringify(example)
32
+ console.log(exampleJSON)
33
+
34
+ // Parse the JSON string back to an object
35
+ const exampleParsed = JSON.parse(exampleJSON) as GpuSuggestionGpu
36
+ console.log(exampleParsed)
37
+ ```
38
+
39
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
40
+
41
+
package/docs/Instance.md CHANGED
@@ -14,6 +14,7 @@ Name | Type
14
14
  `region` | string
15
15
  `tier` | string
16
16
  `pricePerHour` | number
17
+ `gpuMemory` | [InstanceGpuMemory](InstanceGpuMemory.md)
17
18
  `connection` | [InstanceConnection](InstanceConnection.md)
18
19
  `diskGb` | number
19
20
  `image` | string
@@ -41,6 +42,7 @@ const example = {
41
42
  "region": null,
42
43
  "tier": null,
43
44
  "pricePerHour": null,
45
+ "gpuMemory": null,
44
46
  "connection": null,
45
47
  "diskGb": null,
46
48
  "image": null,
@@ -0,0 +1,41 @@
1
+
2
+ # InstanceGpuMemory
3
+
4
+ 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.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `peakUsedMb` | number
11
+ `totalMb` | number
12
+ `samples` | number
13
+ `lastSampleAt` | Date
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import type { InstanceGpuMemory } from '@gpuai/sdk'
19
+
20
+ // TODO: Update the object below with actual values
21
+ const example = {
22
+ "peakUsedMb": null,
23
+ "totalMb": null,
24
+ "samples": null,
25
+ "lastSampleAt": null,
26
+ } satisfies InstanceGpuMemory
27
+
28
+ console.log(example)
29
+
30
+ // Convert the instance to a JSON string
31
+ const exampleJSON: string = JSON.stringify(example)
32
+ console.log(exampleJSON)
33
+
34
+ // Parse the JSON string back to an object
35
+ const exampleParsed = JSON.parse(exampleJSON) as InstanceGpuMemory
36
+ console.log(exampleParsed)
37
+ ```
38
+
39
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
40
+
41
+
@@ -7,6 +7,7 @@ All URIs are relative to *https://api.gpu.ai/v1*
7
7
  | [**createInstance**](InstancesApi.md#createinstanceoperation) | **POST** /instances | Create an instance (async — returns 202 + Operation-Id header) |
8
8
  | [**deleteInstance**](InstancesApi.md#deleteinstance) | **DELETE** /instances/{id} | Terminate an instance (idempotent) |
9
9
  | [**getInstance**](InstancesApi.md#getinstance) | **GET** /instances/{id} | Get an instance |
10
+ | [**getInstanceGpuSuggestion**](InstancesApi.md#getinstancegpusuggestion) | **GET** /instances/{id}/gpu-suggestion | Suggest a lower-priced GPU for an instance |
10
11
  | [**listInstances**](InstancesApi.md#listinstances) | **GET** /instances | List instances |
11
12
  | [**updateInstance**](InstancesApi.md#updateinstanceoperation) | **PATCH** /instances/{id} | Update an instance (rename only in v1) |
12
13
 
@@ -238,6 +239,80 @@ example().catch(console.error);
238
239
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
239
240
 
240
241
 
242
+ ## getInstanceGpuSuggestion
243
+
244
+ > GpuSuggestion getInstanceGpuSuggestion(id)
245
+
246
+ Suggest a lower-priced GPU for an instance
247
+
248
+ Compares the highest GPU memory this instance has used (its `gpu_memory` peak, plus headroom) with the GPU models currently listed, and names the cheapest model that would have fit when the saving is worth a look. It never changes anything: it reports what the telemetry shows. Memory use can grow later, so treat it as a starting point. `status` is `insufficient_data` until the instance has about an hour of telemetry, `no_cheaper_fit` when no cheaper listed model covers the peak, and `suggestion` when one does. Requires the `instances:read` scope. An instance owned by another organization returns 404.
249
+
250
+ ### Example
251
+
252
+ ```ts
253
+ import {
254
+ Configuration,
255
+ InstancesApi,
256
+ } from '@gpuai/sdk';
257
+ import type { GetInstanceGpuSuggestionRequest } from '@gpuai/sdk';
258
+
259
+ async function example() {
260
+ console.log("🚀 Testing @gpuai/sdk SDK...");
261
+ const config = new Configuration({
262
+ // Configure HTTP bearer authorization: bearerAuth
263
+ accessToken: "YOUR BEARER TOKEN",
264
+ });
265
+ const api = new InstancesApi(config);
266
+
267
+ const body = {
268
+ // string
269
+ id: id_example,
270
+ } satisfies GetInstanceGpuSuggestionRequest;
271
+
272
+ try {
273
+ const data = await api.getInstanceGpuSuggestion(body);
274
+ console.log(data);
275
+ } catch (error) {
276
+ console.error(error);
277
+ }
278
+ }
279
+
280
+ // Run the test
281
+ example().catch(console.error);
282
+ ```
283
+
284
+ ### Parameters
285
+
286
+
287
+ | Name | Type | Description | Notes |
288
+ |------------- | ------------- | ------------- | -------------|
289
+ | **id** | `string` | | [Defaults to `undefined`] |
290
+
291
+ ### Return type
292
+
293
+ [**GpuSuggestion**](GpuSuggestion.md)
294
+
295
+ ### Authorization
296
+
297
+ [bearerAuth](../README.md#bearerAuth)
298
+
299
+ ### HTTP request headers
300
+
301
+ - **Content-Type**: Not defined
302
+ - **Accept**: `application/json`, `application/problem+json`
303
+
304
+
305
+ ### HTTP response details
306
+ | Status code | Description | Response headers |
307
+ |-------------|-------------|------------------|
308
+ | **200** | OK | - |
309
+ | **404** | The instance does not exist or is not owned by the caller\'s organization. | - |
310
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
311
+ | **0** | Error response (RFC 7807) | - |
312
+
313
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
314
+
315
+
241
316
  ## listInstances
242
317
 
243
318
  > InstancePage listInstances(cursor, limit, status)
@@ -0,0 +1,46 @@
1
+
2
+ # Invoice
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | string
10
+ `number` | string
11
+ `issuedAt` | Date
12
+ `amountCents` | number
13
+ `currency` | string
14
+ `paymentMethod` | string
15
+ `description` | string
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import type { Invoice } from '@gpuai/sdk'
21
+
22
+ // TODO: Update the object below with actual values
23
+ const example = {
24
+ "id": null,
25
+ "number": GPUAI-000123,
26
+ "issuedAt": null,
27
+ "amountCents": null,
28
+ "currency": usd,
29
+ "paymentMethod": Card,
30
+ "description": null,
31
+ } satisfies Invoice
32
+
33
+ console.log(example)
34
+
35
+ // Convert the instance to a JSON string
36
+ const exampleJSON: string = JSON.stringify(example)
37
+ console.log(exampleJSON)
38
+
39
+ // Parse the JSON string back to an object
40
+ const exampleParsed = JSON.parse(exampleJSON) as Invoice
41
+ console.log(exampleParsed)
42
+ ```
43
+
44
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
45
+
46
+
@@ -0,0 +1,38 @@
1
+
2
+ # InvoiceList
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `invoices` | [Array&lt;Invoice&gt;](Invoice.md)
10
+ `hasMore` | boolean
11
+ `nextCursor` | string
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { InvoiceList } from '@gpuai/sdk'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "invoices": null,
21
+ "hasMore": null,
22
+ "nextCursor": null,
23
+ } satisfies InvoiceList
24
+
25
+ console.log(example)
26
+
27
+ // Convert the instance to a JSON string
28
+ const exampleJSON: string = JSON.stringify(example)
29
+ console.log(exampleJSON)
30
+
31
+ // Parse the JSON string back to an object
32
+ const exampleParsed = JSON.parse(exampleJSON) as InvoiceList
33
+ console.log(exampleParsed)
34
+ ```
35
+
36
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
37
+
38
+
@@ -9,12 +9,18 @@ Name | Type
9
9
  `currency` | string
10
10
  `inputPer1mTokensCents` | number
11
11
  `outputPer1mTokensCents` | number
12
+ `cachedInputPer1mTokensMicrocents` | number
13
+ `cachedInputPer1mTokensCents` | number
12
14
  `perImageCents` | number
13
15
  `perImageMicrocents` | number
14
16
  `perMpxlMicrocents` | number
15
17
  `perVideoMicrocents` | number
16
18
  `perVideoSecondCents` | number
17
19
  `perVideoSecondMicrocents` | number
20
+ `period` | string
21
+ `peakWindowsUtc` | [Array&lt;PeakWindow&gt;](PeakWindow.md)
22
+ `peak` | [ModelRate](ModelRate.md)
23
+ `offPeak` | [ModelRate](ModelRate.md)
18
24
 
19
25
  ## Example
20
26
 
@@ -26,12 +32,18 @@ const example = {
26
32
  "currency": null,
27
33
  "inputPer1mTokensCents": null,
28
34
  "outputPer1mTokensCents": null,
35
+ "cachedInputPer1mTokensMicrocents": null,
36
+ "cachedInputPer1mTokensCents": null,
29
37
  "perImageCents": null,
30
38
  "perImageMicrocents": null,
31
39
  "perMpxlMicrocents": null,
32
40
  "perVideoMicrocents": null,
33
41
  "perVideoSecondCents": null,
34
42
  "perVideoSecondMicrocents": null,
43
+ "period": null,
44
+ "peakWindowsUtc": null,
45
+ "peak": null,
46
+ "offPeak": null,
35
47
  } satisfies ModelPricing
36
48
 
37
49
  console.log(example)
@@ -0,0 +1,45 @@
1
+
2
+ # ModelRate
3
+
4
+ One per-1M-token rate triple, in rounded cents and exact micro-cents (1e-6 cent). Prefer the micro-cent fields for arithmetic; cached rates are routinely sub-cent and their cents field is then omitted.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `inputPer1mTokensCents` | number
11
+ `inputPer1mTokensMicrocents` | number
12
+ `cachedInputPer1mTokensCents` | number
13
+ `cachedInputPer1mTokensMicrocents` | number
14
+ `outputPer1mTokensCents` | number
15
+ `outputPer1mTokensMicrocents` | number
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import type { ModelRate } from '@gpuai/sdk'
21
+
22
+ // TODO: Update the object below with actual values
23
+ const example = {
24
+ "inputPer1mTokensCents": null,
25
+ "inputPer1mTokensMicrocents": null,
26
+ "cachedInputPer1mTokensCents": null,
27
+ "cachedInputPer1mTokensMicrocents": null,
28
+ "outputPer1mTokensCents": null,
29
+ "outputPer1mTokensMicrocents": null,
30
+ } satisfies ModelRate
31
+
32
+ console.log(example)
33
+
34
+ // Convert the instance to a JSON string
35
+ const exampleJSON: string = JSON.stringify(example)
36
+ console.log(exampleJSON)
37
+
38
+ // Parse the JSON string back to an object
39
+ const exampleParsed = JSON.parse(exampleJSON) as ModelRate
40
+ console.log(exampleParsed)
41
+ ```
42
+
43
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
44
+
45
+
@@ -0,0 +1,37 @@
1
+
2
+ # PeakWindow
3
+
4
+ One daily UTC time range during which a model\'s peak rates apply.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `start` | string
11
+ `end` | string
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { PeakWindow } from '@gpuai/sdk'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "start": null,
21
+ "end": null,
22
+ } satisfies PeakWindow
23
+
24
+ console.log(example)
25
+
26
+ // Convert the instance to a JSON string
27
+ const exampleJSON: string = JSON.stringify(example)
28
+ console.log(exampleJSON)
29
+
30
+ // Parse the JSON string back to an object
31
+ const exampleParsed = JSON.parse(exampleJSON) as PeakWindow
32
+ console.log(exampleParsed)
33
+ ```
34
+
35
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
36
+
37
+
@@ -0,0 +1,50 @@
1
+
2
+ # UpdateBillingDetailsRequest
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `legalName` | string
10
+ `addressLine1` | string
11
+ `addressLine2` | string
12
+ `city` | string
13
+ `region` | string
14
+ `postalCode` | string
15
+ `country` | string
16
+ `taxIdType` | string
17
+ `taxId` | string
18
+
19
+ ## Example
20
+
21
+ ```typescript
22
+ import type { UpdateBillingDetailsRequest } from '@gpuai/sdk'
23
+
24
+ // TODO: Update the object below with actual values
25
+ const example = {
26
+ "legalName": null,
27
+ "addressLine1": null,
28
+ "addressLine2": null,
29
+ "city": null,
30
+ "region": null,
31
+ "postalCode": null,
32
+ "country": null,
33
+ "taxIdType": null,
34
+ "taxId": null,
35
+ } satisfies UpdateBillingDetailsRequest
36
+
37
+ console.log(example)
38
+
39
+ // Convert the instance to a JSON string
40
+ const exampleJSON: string = JSON.stringify(example)
41
+ console.log(exampleJSON)
42
+
43
+ // Parse the JSON string back to an object
44
+ const exampleParsed = JSON.parse(exampleJSON) as UpdateBillingDetailsRequest
45
+ console.log(exampleParsed)
46
+ ```
47
+
48
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
49
+
50
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpuai/sdk",
3
- "version": "0.3.18",
3
+ "version": "0.4.1",
4
4
  "description": "TypeScript SDK for the GPU.ai Public Developer API",
5
5
  "author": "GPU.ai Support <support@gpu.ai>",
6
6
  "repository": {