@gpuai/sdk 0.3.3 → 0.3.4

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @gpuai/sdk@0.3.3
1
+ # @gpuai/sdk@0.3.4
2
2
 
3
3
  A TypeScript SDK client for the api.gpu.ai API.
4
4
 
@@ -196,7 +196,7 @@ and is automatically generated by the
196
196
  [OpenAPI Generator](https://openapi-generator.tech) project:
197
197
 
198
198
  - API version: `1.0.0`
199
- - Package version: `0.3.3`
199
+ - Package version: `0.3.4`
200
200
  - Generator version: `7.24.0`
201
201
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
202
202
 
@@ -88,13 +88,19 @@ export interface CreateInstanceRequest {
88
88
  */
89
89
  diskGb?: number;
90
90
  /**
91
- * Per-deploy env overrides; only keys the template marks user_overridable are accepted (others 422). Secret values are redacted from operation metadata.
91
+ * Environment variables. With `template_id`: per-deploy overrides only keys the template marks user_overridable are accepted (others 422), and secret values are redacted from operation metadata. With `image`: plain container env vars — keys must be POSIX names and the platform's reserved namespace (`PUBLIC_KEY`, `GPUAI_*`) is refused (422).
92
92
  * @type {{ [key: string]: string; }}
93
93
  * @memberof CreateInstanceRequest
94
94
  */
95
95
  env?: {
96
96
  [key: string]: string;
97
97
  };
98
+ /**
99
+ * Launch from your own container image, e.g. `pytorch/pytorch:2.4.1-cuda12.4-cudnn9-devel` or `ghcr.io/acme/trainer:v1`. The image must be publicly pullable (private registries are not yet supported) and provide linux/amd64 — both are verified synchronously before anything is provisioned: an unknown image returns 422 `image_unavailable` and a registry outage 502 `registry_unreachable`, with no operation created and nothing billed. The launch is pinned to the exact manifest digest verified, so a tag re-push cannot change what boots. After SSH/tunnel setup the image's own ENTRYPOINT/CMD is started (its output is in /var/log/gpuai-entrypoint.log on the instance); an image with neither is a plain SSH environment. Placement narrows to container-native capacity — a gpu_type only available on VM capacity returns 422 `image_unavailable`. Mutually exclusive with `template_id` and `environment` (422). A malformed reference (bad charset, localhost/private-IP registry) returns 400.
100
+ * @type {string}
101
+ * @memberof CreateInstanceRequest
102
+ */
103
+ image?: string;
98
104
  }
99
105
  /**
100
106
  * @export
@@ -51,6 +51,7 @@ export function CreateInstanceRequestFromJSONTyped(json, ignoreDiscriminator) {
51
51
  'offeringId': json['offering_id'] == null ? undefined : json['offering_id'],
52
52
  'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
53
53
  'env': json['env'] == null ? undefined : json['env'],
54
+ 'image': json['image'] == null ? undefined : json['image'],
54
55
  };
55
56
  }
56
57
  export function CreateInstanceRequestToJSON(json) {
@@ -74,5 +75,6 @@ export function CreateInstanceRequestToJSONTyped(value, ignoreDiscriminator = fa
74
75
  'offering_id': value['offeringId'],
75
76
  'disk_gb': value['diskGb'],
76
77
  'env': value['env'],
78
+ 'image': value['image'],
77
79
  };
78
80
  }
@@ -76,6 +76,12 @@ export interface Instance {
76
76
  * @memberof Instance
77
77
  */
78
78
  diskGb?: number;
79
+ /**
80
+ * The customer-supplied container image this instance was launched from, digest-pinned at verification time (e.g. `ghcr.io/acme/trainer:v1@sha256:…`). Present only on custom-image launches; template and certified launches never expose their images here.
81
+ * @type {string}
82
+ * @memberof Instance
83
+ */
84
+ image?: string;
79
85
  /**
80
86
  * Why the instance is in the error state, e.g. "provisioning stalled: the instance started but never became reachable". Present only on errored instances.
81
87
  * @type {string}
@@ -72,6 +72,7 @@ export function InstanceFromJSONTyped(json, ignoreDiscriminator) {
72
72
  'pricePerHour': json['price_per_hour'],
73
73
  'connection': json['connection'] == null ? undefined : InstanceConnectionFromJSON(json['connection']),
74
74
  'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
75
+ 'image': json['image'] == null ? undefined : json['image'],
75
76
  'statusReason': json['status_reason'] == null ? undefined : json['status_reason'],
76
77
  'createdAt': (new Date(json['created_at'])),
77
78
  'readyAt': json['ready_at'] == null ? undefined : (new Date(json['ready_at'])),
@@ -98,6 +99,7 @@ export function InstanceToJSONTyped(value, ignoreDiscriminator = false) {
98
99
  'price_per_hour': value['pricePerHour'],
99
100
  'connection': InstanceConnectionToJSON(value['connection']),
100
101
  'disk_gb': value['diskGb'],
102
+ 'image': value['image'],
101
103
  'status_reason': value['statusReason'],
102
104
  'created_at': value['createdAt'].toISOString(),
103
105
  'ready_at': value['readyAt'] == null ? value['readyAt'] : value['readyAt'].toISOString(),
@@ -88,13 +88,19 @@ export interface CreateInstanceRequest {
88
88
  */
89
89
  diskGb?: number;
90
90
  /**
91
- * Per-deploy env overrides; only keys the template marks user_overridable are accepted (others 422). Secret values are redacted from operation metadata.
91
+ * Environment variables. With `template_id`: per-deploy overrides only keys the template marks user_overridable are accepted (others 422), and secret values are redacted from operation metadata. With `image`: plain container env vars — keys must be POSIX names and the platform's reserved namespace (`PUBLIC_KEY`, `GPUAI_*`) is refused (422).
92
92
  * @type {{ [key: string]: string; }}
93
93
  * @memberof CreateInstanceRequest
94
94
  */
95
95
  env?: {
96
96
  [key: string]: string;
97
97
  };
98
+ /**
99
+ * Launch from your own container image, e.g. `pytorch/pytorch:2.4.1-cuda12.4-cudnn9-devel` or `ghcr.io/acme/trainer:v1`. The image must be publicly pullable (private registries are not yet supported) and provide linux/amd64 — both are verified synchronously before anything is provisioned: an unknown image returns 422 `image_unavailable` and a registry outage 502 `registry_unreachable`, with no operation created and nothing billed. The launch is pinned to the exact manifest digest verified, so a tag re-push cannot change what boots. After SSH/tunnel setup the image's own ENTRYPOINT/CMD is started (its output is in /var/log/gpuai-entrypoint.log on the instance); an image with neither is a plain SSH environment. Placement narrows to container-native capacity — a gpu_type only available on VM capacity returns 422 `image_unavailable`. Mutually exclusive with `template_id` and `environment` (422). A malformed reference (bad charset, localhost/private-IP registry) returns 400.
100
+ * @type {string}
101
+ * @memberof CreateInstanceRequest
102
+ */
103
+ image?: string;
98
104
  }
99
105
  /**
100
106
  * @export
@@ -59,6 +59,7 @@ function CreateInstanceRequestFromJSONTyped(json, ignoreDiscriminator) {
59
59
  'offeringId': json['offering_id'] == null ? undefined : json['offering_id'],
60
60
  'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
61
61
  'env': json['env'] == null ? undefined : json['env'],
62
+ 'image': json['image'] == null ? undefined : json['image'],
62
63
  };
63
64
  }
64
65
  function CreateInstanceRequestToJSON(json) {
@@ -82,5 +83,6 @@ function CreateInstanceRequestToJSONTyped(value, ignoreDiscriminator = false) {
82
83
  'offering_id': value['offeringId'],
83
84
  'disk_gb': value['diskGb'],
84
85
  'env': value['env'],
86
+ 'image': value['image'],
85
87
  };
86
88
  }
@@ -76,6 +76,12 @@ export interface Instance {
76
76
  * @memberof Instance
77
77
  */
78
78
  diskGb?: number;
79
+ /**
80
+ * The customer-supplied container image this instance was launched from, digest-pinned at verification time (e.g. `ghcr.io/acme/trainer:v1@sha256:…`). Present only on custom-image launches; template and certified launches never expose their images here.
81
+ * @type {string}
82
+ * @memberof Instance
83
+ */
84
+ image?: string;
79
85
  /**
80
86
  * Why the instance is in the error state, e.g. "provisioning stalled: the instance started but never became reachable". Present only on errored instances.
81
87
  * @type {string}
@@ -80,6 +80,7 @@ function InstanceFromJSONTyped(json, ignoreDiscriminator) {
80
80
  'pricePerHour': json['price_per_hour'],
81
81
  'connection': json['connection'] == null ? undefined : (0, InstanceConnection_1.InstanceConnectionFromJSON)(json['connection']),
82
82
  'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
83
+ 'image': json['image'] == null ? undefined : json['image'],
83
84
  'statusReason': json['status_reason'] == null ? undefined : json['status_reason'],
84
85
  'createdAt': (new Date(json['created_at'])),
85
86
  'readyAt': json['ready_at'] == null ? undefined : (new Date(json['ready_at'])),
@@ -106,6 +107,7 @@ function InstanceToJSONTyped(value, ignoreDiscriminator = false) {
106
107
  'price_per_hour': value['pricePerHour'],
107
108
  'connection': (0, InstanceConnection_1.InstanceConnectionToJSON)(value['connection']),
108
109
  'disk_gb': value['diskGb'],
110
+ 'image': value['image'],
109
111
  'status_reason': value['statusReason'],
110
112
  'created_at': value['createdAt'].toISOString(),
111
113
  'ready_at': value['readyAt'] == null ? value['readyAt'] : value['readyAt'].toISOString(),
@@ -19,6 +19,7 @@ Name | Type
19
19
  `offeringId` | string
20
20
  `diskGb` | number
21
21
  `env` | { [key: string]: string; }
22
+ `image` | string
22
23
 
23
24
  ## Example
24
25
 
@@ -40,6 +41,7 @@ const example = {
40
41
  "offeringId": null,
41
42
  "diskGb": 200,
42
43
  "env": null,
44
+ "image": ghcr.io/acme/trainer:v1,
43
45
  } satisfies CreateInstanceRequest
44
46
 
45
47
  console.log(example)
package/docs/Instance.md CHANGED
@@ -16,6 +16,7 @@ Name | Type
16
16
  `pricePerHour` | number
17
17
  `connection` | [InstanceConnection](InstanceConnection.md)
18
18
  `diskGb` | number
19
+ `image` | string
19
20
  `statusReason` | string
20
21
  `createdAt` | Date
21
22
  `readyAt` | Date
@@ -40,6 +41,7 @@ const example = {
40
41
  "pricePerHour": null,
41
42
  "connection": null,
42
43
  "diskGb": null,
44
+ "image": null,
43
45
  "statusReason": null,
44
46
  "createdAt": null,
45
47
  "readyAt": null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpuai/sdk",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "TypeScript SDK for the GPU.ai Public Developer API",
5
5
  "author": "GPU.ai Support <support@gpu.ai>",
6
6
  "repository": {
@@ -92,11 +92,17 @@ export interface CreateInstanceRequest {
92
92
  */
93
93
  diskGb?: number;
94
94
  /**
95
- * Per-deploy env overrides; only keys the template marks user_overridable are accepted (others 422). Secret values are redacted from operation metadata.
95
+ * Environment variables. With `template_id`: per-deploy overrides only keys the template marks user_overridable are accepted (others 422), and secret values are redacted from operation metadata. With `image`: plain container env vars — keys must be POSIX names and the platform's reserved namespace (`PUBLIC_KEY`, `GPUAI_*`) is refused (422).
96
96
  * @type {{ [key: string]: string; }}
97
97
  * @memberof CreateInstanceRequest
98
98
  */
99
99
  env?: { [key: string]: string; };
100
+ /**
101
+ * Launch from your own container image, e.g. `pytorch/pytorch:2.4.1-cuda12.4-cudnn9-devel` or `ghcr.io/acme/trainer:v1`. The image must be publicly pullable (private registries are not yet supported) and provide linux/amd64 — both are verified synchronously before anything is provisioned: an unknown image returns 422 `image_unavailable` and a registry outage 502 `registry_unreachable`, with no operation created and nothing billed. The launch is pinned to the exact manifest digest verified, so a tag re-push cannot change what boots. After SSH/tunnel setup the image's own ENTRYPOINT/CMD is started (its output is in /var/log/gpuai-entrypoint.log on the instance); an image with neither is a plain SSH environment. Placement narrows to container-native capacity — a gpu_type only available on VM capacity returns 422 `image_unavailable`. Mutually exclusive with `template_id` and `environment` (422). A malformed reference (bad charset, localhost/private-IP registry) returns 400.
102
+ * @type {string}
103
+ * @memberof CreateInstanceRequest
104
+ */
105
+ image?: string;
100
106
  }
101
107
 
102
108
 
@@ -143,6 +149,7 @@ export function CreateInstanceRequestFromJSONTyped(json: any, ignoreDiscriminato
143
149
  'offeringId': json['offering_id'] == null ? undefined : json['offering_id'],
144
150
  'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
145
151
  'env': json['env'] == null ? undefined : json['env'],
152
+ 'image': json['image'] == null ? undefined : json['image'],
146
153
  };
147
154
  }
148
155
 
@@ -170,6 +177,7 @@ export function CreateInstanceRequestToJSONTyped(value?: CreateInstanceRequest |
170
177
  'offering_id': value['offeringId'],
171
178
  'disk_gb': value['diskGb'],
172
179
  'env': value['env'],
180
+ 'image': value['image'],
173
181
  };
174
182
  }
175
183
 
@@ -87,6 +87,12 @@ export interface Instance {
87
87
  * @memberof Instance
88
88
  */
89
89
  diskGb?: number;
90
+ /**
91
+ * The customer-supplied container image this instance was launched from, digest-pinned at verification time (e.g. `ghcr.io/acme/trainer:v1@sha256:…`). Present only on custom-image launches; template and certified launches never expose their images here.
92
+ * @type {string}
93
+ * @memberof Instance
94
+ */
95
+ image?: string;
90
96
  /**
91
97
  * Why the instance is in the error state, e.g. "provisioning stalled: the instance started but never became reachable". Present only on errored instances.
92
98
  * @type {string}
@@ -186,6 +192,7 @@ export function InstanceFromJSONTyped(json: any, ignoreDiscriminator: boolean):
186
192
  'pricePerHour': json['price_per_hour'],
187
193
  'connection': json['connection'] == null ? undefined : InstanceConnectionFromJSON(json['connection']),
188
194
  'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
195
+ 'image': json['image'] == null ? undefined : json['image'],
189
196
  'statusReason': json['status_reason'] == null ? undefined : json['status_reason'],
190
197
  'createdAt': (new Date(json['created_at'])),
191
198
  'readyAt': json['ready_at'] == null ? undefined : (new Date(json['ready_at'])),
@@ -216,6 +223,7 @@ export function InstanceToJSONTyped(value?: Instance | null, ignoreDiscriminator
216
223
  'price_per_hour': value['pricePerHour'],
217
224
  'connection': InstanceConnectionToJSON(value['connection']),
218
225
  'disk_gb': value['diskGb'],
226
+ 'image': value['image'],
219
227
  'status_reason': value['statusReason'],
220
228
  'created_at': value['createdAt'].toISOString(),
221
229
  'ready_at': value['readyAt'] == null ? value['readyAt'] : value['readyAt'].toISOString(),