@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.
- package/.openapi-generator/FILES +48 -0
- package/README.md +41 -2
- package/dist/apis/BillingApi.d.ts +70 -0
- package/dist/apis/BillingApi.js +197 -0
- package/dist/apis/FunctionsApi.d.ts +228 -0
- package/dist/apis/FunctionsApi.js +627 -0
- package/dist/apis/InstancesApi.d.ts +18 -0
- package/dist/apis/InstancesApi.js +49 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/BillingApi.d.ts +70 -0
- package/dist/esm/apis/BillingApi.js +197 -0
- package/dist/esm/apis/FunctionsApi.d.ts +228 -0
- package/dist/esm/apis/FunctionsApi.js +623 -0
- package/dist/esm/apis/InstancesApi.d.ts +18 -0
- package/dist/esm/apis/InstancesApi.js +49 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AutolaunchRule.d.ts +2 -1
- package/dist/esm/models/BillingDetails.d.ts +98 -0
- package/dist/esm/models/BillingDetails.js +85 -0
- package/dist/esm/models/CreateFunctionRequest.d.ts +32 -0
- package/dist/esm/models/CreateFunctionRequest.js +43 -0
- package/dist/esm/models/CreateFunctionRunRequest.d.ts +38 -0
- package/dist/esm/models/CreateFunctionRunRequest.js +45 -0
- package/dist/esm/models/CreateFunctionVersionRequest.d.ts +110 -0
- package/dist/esm/models/CreateFunctionVersionRequest.js +79 -0
- package/dist/esm/models/Function.d.ts +163 -0
- package/dist/esm/models/Function.js +109 -0
- package/dist/esm/models/FunctionList.d.ts +33 -0
- package/dist/esm/models/FunctionList.js +44 -0
- package/dist/esm/models/FunctionReplicaCounts.d.ts +44 -0
- package/dist/esm/models/FunctionReplicaCounts.js +51 -0
- package/dist/esm/models/FunctionRun.d.ts +130 -0
- package/dist/esm/models/FunctionRun.js +94 -0
- package/dist/esm/models/FunctionRunError.d.ts +44 -0
- package/dist/esm/models/FunctionRunError.js +49 -0
- package/dist/esm/models/FunctionRunList.d.ts +39 -0
- package/dist/esm/models/FunctionRunList.js +48 -0
- package/dist/esm/models/FunctionRunLogChunk.d.ts +59 -0
- package/dist/esm/models/FunctionRunLogChunk.js +63 -0
- package/dist/esm/models/FunctionRunLogs.d.ts +45 -0
- package/dist/esm/models/FunctionRunLogs.js +52 -0
- package/dist/esm/models/FunctionUpload.d.ts +51 -0
- package/dist/esm/models/FunctionUpload.js +59 -0
- package/dist/esm/models/FunctionVersion.d.ts +137 -0
- package/dist/esm/models/FunctionVersion.js +109 -0
- package/dist/esm/models/GpuSuggestion.d.ts +82 -0
- package/dist/esm/models/GpuSuggestion.js +77 -0
- package/dist/esm/models/GpuSuggestionCheaper.d.ts +62 -0
- package/dist/esm/models/GpuSuggestionCheaper.js +63 -0
- package/dist/esm/models/GpuSuggestionGpu.d.ts +50 -0
- package/dist/esm/models/GpuSuggestionGpu.js +55 -0
- package/dist/esm/models/Instance.d.ts +7 -0
- package/dist/esm/models/Instance.js +3 -0
- package/dist/esm/models/InstanceGpuMemory.d.ts +51 -0
- package/dist/esm/models/InstanceGpuMemory.js +55 -0
- package/dist/esm/models/Invoice.d.ts +68 -0
- package/dist/esm/models/Invoice.js +67 -0
- package/dist/esm/models/InvoiceList.d.ts +45 -0
- package/dist/esm/models/InvoiceList.js +50 -0
- package/dist/esm/models/ModelPricing.d.ts +46 -0
- package/dist/esm/models/ModelPricing.js +21 -0
- package/dist/esm/models/ModelRate.d.ts +62 -0
- package/dist/esm/models/ModelRate.js +51 -0
- package/dist/esm/models/PeakWindow.d.ts +38 -0
- package/dist/esm/models/PeakWindow.js +47 -0
- package/dist/esm/models/UpdateBillingDetailsRequest.d.ts +80 -0
- package/dist/esm/models/UpdateBillingDetailsRequest.js +57 -0
- package/dist/esm/models/index.d.ts +23 -0
- package/dist/esm/models/index.js +23 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/AutolaunchRule.d.ts +2 -1
- package/dist/models/BillingDetails.d.ts +98 -0
- package/dist/models/BillingDetails.js +92 -0
- package/dist/models/CreateFunctionRequest.d.ts +32 -0
- package/dist/models/CreateFunctionRequest.js +50 -0
- package/dist/models/CreateFunctionRunRequest.d.ts +38 -0
- package/dist/models/CreateFunctionRunRequest.js +52 -0
- package/dist/models/CreateFunctionVersionRequest.d.ts +110 -0
- package/dist/models/CreateFunctionVersionRequest.js +86 -0
- package/dist/models/Function.d.ts +163 -0
- package/dist/models/Function.js +117 -0
- package/dist/models/FunctionList.d.ts +33 -0
- package/dist/models/FunctionList.js +51 -0
- package/dist/models/FunctionReplicaCounts.d.ts +44 -0
- package/dist/models/FunctionReplicaCounts.js +58 -0
- package/dist/models/FunctionRun.d.ts +130 -0
- package/dist/models/FunctionRun.js +102 -0
- package/dist/models/FunctionRunError.d.ts +44 -0
- package/dist/models/FunctionRunError.js +56 -0
- package/dist/models/FunctionRunList.d.ts +39 -0
- package/dist/models/FunctionRunList.js +55 -0
- package/dist/models/FunctionRunLogChunk.d.ts +59 -0
- package/dist/models/FunctionRunLogChunk.js +71 -0
- package/dist/models/FunctionRunLogs.d.ts +45 -0
- package/dist/models/FunctionRunLogs.js +59 -0
- package/dist/models/FunctionUpload.d.ts +51 -0
- package/dist/models/FunctionUpload.js +67 -0
- package/dist/models/FunctionVersion.d.ts +137 -0
- package/dist/models/FunctionVersion.js +117 -0
- package/dist/models/GpuSuggestion.d.ts +82 -0
- package/dist/models/GpuSuggestion.js +85 -0
- package/dist/models/GpuSuggestionCheaper.d.ts +62 -0
- package/dist/models/GpuSuggestionCheaper.js +70 -0
- package/dist/models/GpuSuggestionGpu.d.ts +50 -0
- package/dist/models/GpuSuggestionGpu.js +62 -0
- package/dist/models/Instance.d.ts +7 -0
- package/dist/models/Instance.js +3 -0
- package/dist/models/InstanceGpuMemory.d.ts +51 -0
- package/dist/models/InstanceGpuMemory.js +62 -0
- package/dist/models/Invoice.d.ts +68 -0
- package/dist/models/Invoice.js +74 -0
- package/dist/models/InvoiceList.d.ts +45 -0
- package/dist/models/InvoiceList.js +57 -0
- package/dist/models/ModelPricing.d.ts +46 -0
- package/dist/models/ModelPricing.js +22 -0
- package/dist/models/ModelRate.d.ts +62 -0
- package/dist/models/ModelRate.js +58 -0
- package/dist/models/PeakWindow.d.ts +38 -0
- package/dist/models/PeakWindow.js +54 -0
- package/dist/models/UpdateBillingDetailsRequest.d.ts +80 -0
- package/dist/models/UpdateBillingDetailsRequest.js +64 -0
- package/dist/models/index.d.ts +23 -0
- package/dist/models/index.js +23 -0
- package/dist/runtime.js +1 -1
- package/docs/BillingApi.md +299 -0
- package/docs/BillingDetails.md +56 -0
- package/docs/CreateFunctionRequest.md +34 -0
- package/docs/CreateFunctionRunRequest.md +36 -0
- package/docs/CreateFunctionVersionRequest.md +60 -0
- package/docs/Function.md +75 -0
- package/docs/FunctionList.md +34 -0
- package/docs/FunctionReplicaCounts.md +39 -0
- package/docs/FunctionRun.md +63 -0
- package/docs/FunctionRunError.md +38 -0
- package/docs/FunctionRunList.md +36 -0
- package/docs/FunctionRunLogChunk.md +40 -0
- package/docs/FunctionRunLogs.md +38 -0
- package/docs/FunctionUpload.md +38 -0
- package/docs/FunctionVersion.md +66 -0
- package/docs/FunctionsApi.md +880 -0
- package/docs/GpuSuggestion.md +47 -0
- package/docs/GpuSuggestionCheaper.md +45 -0
- package/docs/GpuSuggestionGpu.md +41 -0
- package/docs/Instance.md +2 -0
- package/docs/InstanceGpuMemory.md +41 -0
- package/docs/InstancesApi.md +75 -0
- package/docs/Invoice.md +46 -0
- package/docs/InvoiceList.md +38 -0
- package/docs/ModelPricing.md +12 -0
- package/docs/ModelRate.md +45 -0
- package/docs/PeakWindow.md +37 -0
- package/docs/UpdateBillingDetailsRequest.md +50 -0
- package/package.json +1 -1
- package/src/apis/BillingApi.ts +247 -0
- package/src/apis/FunctionsApi.ts +828 -0
- package/src/apis/InstancesApi.ts +64 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AutolaunchRule.ts +2 -1
- package/src/models/BillingDetails.ts +164 -0
- package/src/models/CreateFunctionRequest.ts +66 -0
- package/src/models/CreateFunctionRunRequest.ts +74 -0
- package/src/models/CreateFunctionVersionRequest.ts +175 -0
- package/src/models/Function.ts +255 -0
- package/src/models/FunctionList.ts +74 -0
- package/src/models/FunctionReplicaCounts.ts +84 -0
- package/src/models/FunctionRun.ts +207 -0
- package/src/models/FunctionRunError.ts +83 -0
- package/src/models/FunctionRunList.ts +83 -0
- package/src/models/FunctionRunLogChunk.ts +105 -0
- package/src/models/FunctionRunLogs.ts +92 -0
- package/src/models/FunctionUpload.ts +96 -0
- package/src/models/FunctionVersion.ts +226 -0
- package/src/models/GpuSuggestion.ts +150 -0
- package/src/models/GpuSuggestionCheaper.ts +111 -0
- package/src/models/GpuSuggestionGpu.ts +93 -0
- package/src/models/Instance.ts +15 -0
- package/src/models/InstanceGpuMemory.ts +94 -0
- package/src/models/Invoice.ts +120 -0
- package/src/models/InvoiceList.ts +91 -0
- package/src/models/ModelPricing.ts +74 -0
- package/src/models/ModelRate.ts +105 -0
- package/src/models/PeakWindow.ts +75 -0
- package/src/models/UpdateBillingDetailsRequest.ts +129 -0
- package/src/models/index.ts +23 -0
- 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
|
+
|
package/docs/InstancesApi.md
CHANGED
|
@@ -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)
|
package/docs/Invoice.md
ADDED
|
@@ -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<Invoice>](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
|
+
|
package/docs/ModelPricing.md
CHANGED
|
@@ -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<PeakWindow>](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
|
+
|