@gpuai/sdk 0.5.3 → 0.5.5
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 +56 -0
- package/README.md +50 -2
- package/dist/apis/BillingApi.d.ts +2 -2
- package/dist/apis/BillingApi.js +2 -2
- package/dist/apis/EndpointsApi.d.ts +150 -0
- package/dist/apis/EndpointsApi.js +379 -0
- package/dist/apis/InstancesApi.d.ts +15 -0
- package/dist/apis/InstancesApi.js +45 -0
- package/dist/apis/JobsApi.d.ts +172 -0
- package/dist/apis/JobsApi.js +444 -0
- package/dist/apis/OperationsApi.d.ts +17 -0
- package/dist/apis/OperationsApi.js +48 -0
- package/dist/apis/SecretsApi.d.ts +123 -0
- package/dist/apis/SecretsApi.js +328 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/BillingApi.d.ts +2 -2
- package/dist/esm/apis/BillingApi.js +2 -2
- package/dist/esm/apis/EndpointsApi.d.ts +150 -0
- package/dist/esm/apis/EndpointsApi.js +375 -0
- package/dist/esm/apis/InstancesApi.d.ts +15 -0
- package/dist/esm/apis/InstancesApi.js +45 -0
- package/dist/esm/apis/JobsApi.d.ts +172 -0
- package/dist/esm/apis/JobsApi.js +440 -0
- package/dist/esm/apis/OperationsApi.d.ts +17 -0
- package/dist/esm/apis/OperationsApi.js +48 -0
- package/dist/esm/apis/SecretsApi.d.ts +123 -0
- package/dist/esm/apis/SecretsApi.js +324 -0
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/Balance.d.ts +6 -0
- package/dist/esm/models/Balance.js +2 -0
- package/dist/esm/models/CreateWebhookEndpointRequest.d.ts +3 -0
- package/dist/esm/models/CreateWebhookEndpointRequest.js +4 -1
- package/dist/esm/models/DedicatedIPOffer.d.ts +98 -0
- package/dist/esm/models/DedicatedIPOffer.js +87 -0
- package/dist/esm/models/Endpoint.d.ts +147 -0
- package/dist/esm/models/Endpoint.js +121 -0
- package/dist/esm/models/EndpointCreate.d.ts +80 -0
- package/dist/esm/models/EndpointCreate.js +63 -0
- package/dist/esm/models/EndpointList.d.ts +33 -0
- package/dist/esm/models/EndpointList.js +44 -0
- package/dist/esm/models/EndpointMachine.d.ts +90 -0
- package/dist/esm/models/EndpointMachine.js +84 -0
- package/dist/esm/models/EndpointReplicaCounts.d.ts +38 -0
- package/dist/esm/models/EndpointReplicaCounts.js +47 -0
- package/dist/esm/models/Job.d.ts +352 -0
- package/dist/esm/models/Job.js +254 -0
- package/dist/esm/models/JobAttempt.d.ts +176 -0
- package/dist/esm/models/JobAttempt.js +147 -0
- package/dist/esm/models/JobCreate.d.ts +153 -0
- package/dist/esm/models/JobCreate.js +84 -0
- package/dist/esm/models/JobGpuTypes.d.ts +39 -0
- package/dist/esm/models/JobGpuTypes.js +48 -0
- package/dist/esm/models/JobGpuTypesDataInner.d.ts +58 -0
- package/dist/esm/models/JobGpuTypesDataInner.js +59 -0
- package/dist/esm/models/JobLogChunk.d.ts +50 -0
- package/dist/esm/models/JobLogChunk.js +55 -0
- package/dist/esm/models/JobLogs.d.ts +39 -0
- package/dist/esm/models/JobLogs.js +48 -0
- package/dist/esm/models/JobPage.d.ts +39 -0
- package/dist/esm/models/JobPage.js +48 -0
- package/dist/esm/models/JobSharingHint.d.ts +46 -0
- package/dist/esm/models/JobSharingHint.js +51 -0
- package/dist/esm/models/JobTelemetry.d.ts +51 -0
- package/dist/esm/models/JobTelemetry.js +56 -0
- package/dist/esm/models/JobTelemetryPoint.d.ts +56 -0
- package/dist/esm/models/JobTelemetryPoint.js +59 -0
- package/dist/esm/models/JobTrial.d.ts +79 -0
- package/dist/esm/models/JobTrial.js +73 -0
- package/dist/esm/models/Secret.d.ts +62 -0
- package/dist/esm/models/Secret.js +63 -0
- package/dist/esm/models/SecretCreate.d.ts +44 -0
- package/dist/esm/models/SecretCreate.js +49 -0
- package/dist/esm/models/SecretImportItem.d.ts +38 -0
- package/dist/esm/models/SecretImportItem.js +47 -0
- package/dist/esm/models/SecretImportRequest.d.ts +39 -0
- package/dist/esm/models/SecretImportRequest.js +46 -0
- package/dist/esm/models/SecretImportResult.d.ts +44 -0
- package/dist/esm/models/SecretImportResult.js +51 -0
- package/dist/esm/models/SecretList.d.ts +33 -0
- package/dist/esm/models/SecretList.js +44 -0
- package/dist/esm/models/SecretPut.d.ts +38 -0
- package/dist/esm/models/SecretPut.js +45 -0
- package/dist/esm/models/WebhookEndpoint.d.ts +3 -0
- package/dist/esm/models/WebhookEndpoint.js +4 -1
- package/dist/esm/models/index.d.ts +25 -0
- package/dist/esm/models/index.js +25 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/Balance.d.ts +6 -0
- package/dist/models/Balance.js +2 -0
- package/dist/models/CreateWebhookEndpointRequest.d.ts +3 -0
- package/dist/models/CreateWebhookEndpointRequest.js +4 -1
- package/dist/models/DedicatedIPOffer.d.ts +98 -0
- package/dist/models/DedicatedIPOffer.js +94 -0
- package/dist/models/Endpoint.d.ts +147 -0
- package/dist/models/Endpoint.js +129 -0
- package/dist/models/EndpointCreate.d.ts +80 -0
- package/dist/models/EndpointCreate.js +70 -0
- package/dist/models/EndpointList.d.ts +33 -0
- package/dist/models/EndpointList.js +51 -0
- package/dist/models/EndpointMachine.d.ts +90 -0
- package/dist/models/EndpointMachine.js +92 -0
- package/dist/models/EndpointReplicaCounts.d.ts +38 -0
- package/dist/models/EndpointReplicaCounts.js +54 -0
- package/dist/models/Job.d.ts +352 -0
- package/dist/models/Job.js +262 -0
- package/dist/models/JobAttempt.d.ts +176 -0
- package/dist/models/JobAttempt.js +155 -0
- package/dist/models/JobCreate.d.ts +153 -0
- package/dist/models/JobCreate.js +92 -0
- package/dist/models/JobGpuTypes.d.ts +39 -0
- package/dist/models/JobGpuTypes.js +55 -0
- package/dist/models/JobGpuTypesDataInner.d.ts +58 -0
- package/dist/models/JobGpuTypesDataInner.js +66 -0
- package/dist/models/JobLogChunk.d.ts +50 -0
- package/dist/models/JobLogChunk.js +62 -0
- package/dist/models/JobLogs.d.ts +39 -0
- package/dist/models/JobLogs.js +55 -0
- package/dist/models/JobPage.d.ts +39 -0
- package/dist/models/JobPage.js +55 -0
- package/dist/models/JobSharingHint.d.ts +46 -0
- package/dist/models/JobSharingHint.js +58 -0
- package/dist/models/JobTelemetry.d.ts +51 -0
- package/dist/models/JobTelemetry.js +63 -0
- package/dist/models/JobTelemetryPoint.d.ts +56 -0
- package/dist/models/JobTelemetryPoint.js +66 -0
- package/dist/models/JobTrial.d.ts +79 -0
- package/dist/models/JobTrial.js +81 -0
- package/dist/models/Secret.d.ts +62 -0
- package/dist/models/Secret.js +70 -0
- package/dist/models/SecretCreate.d.ts +44 -0
- package/dist/models/SecretCreate.js +56 -0
- package/dist/models/SecretImportItem.d.ts +38 -0
- package/dist/models/SecretImportItem.js +54 -0
- package/dist/models/SecretImportRequest.d.ts +39 -0
- package/dist/models/SecretImportRequest.js +53 -0
- package/dist/models/SecretImportResult.d.ts +44 -0
- package/dist/models/SecretImportResult.js +58 -0
- package/dist/models/SecretList.d.ts +33 -0
- package/dist/models/SecretList.js +51 -0
- package/dist/models/SecretPut.d.ts +38 -0
- package/dist/models/SecretPut.js +52 -0
- package/dist/models/WebhookEndpoint.d.ts +3 -0
- package/dist/models/WebhookEndpoint.js +4 -1
- package/dist/models/index.d.ts +25 -0
- package/dist/models/index.js +25 -0
- package/dist/runtime.js +1 -1
- package/docs/Balance.md +2 -0
- package/docs/BillingApi.md +2 -2
- package/docs/DedicatedIPOffer.md +56 -0
- package/docs/Endpoint.md +68 -0
- package/docs/EndpointCreate.md +50 -0
- package/docs/EndpointList.md +34 -0
- package/docs/EndpointMachine.md +50 -0
- package/docs/EndpointReplicaCounts.md +36 -0
- package/docs/EndpointsApi.md +544 -0
- package/docs/InstancesApi.md +68 -1
- package/docs/Job.md +125 -0
- package/docs/JobAttempt.md +69 -0
- package/docs/JobCreate.md +66 -0
- package/docs/JobGpuTypes.md +36 -0
- package/docs/JobGpuTypesDataInner.md +42 -0
- package/docs/JobLogChunk.md +40 -0
- package/docs/JobLogs.md +36 -0
- package/docs/JobPage.md +36 -0
- package/docs/JobSharingHint.md +39 -0
- package/docs/JobTelemetry.md +40 -0
- package/docs/JobTelemetryPoint.md +42 -0
- package/docs/JobTrial.md +46 -0
- package/docs/JobsApi.md +609 -0
- package/docs/OperationsApi.md +76 -0
- package/docs/Secret.md +45 -0
- package/docs/SecretCreate.md +38 -0
- package/docs/SecretImportItem.md +36 -0
- package/docs/SecretImportRequest.md +36 -0
- package/docs/SecretImportResult.md +38 -0
- package/docs/SecretList.md +34 -0
- package/docs/SecretPut.md +36 -0
- package/docs/SecretsApi.md +450 -0
- package/package.json +1 -1
- package/src/apis/BillingApi.ts +2 -2
- package/src/apis/EndpointsApi.ts +481 -0
- package/src/apis/InstancesApi.ts +52 -0
- package/src/apis/JobsApi.ts +551 -0
- package/src/apis/OperationsApi.ts +59 -0
- package/src/apis/SecretsApi.ts +413 -0
- package/src/apis/index.ts +3 -0
- package/src/models/Balance.ts +8 -0
- package/src/models/CreateWebhookEndpointRequest.ts +4 -1
- package/src/models/DedicatedIPOffer.ts +165 -0
- package/src/models/Endpoint.ts +247 -0
- package/src/models/EndpointCreate.ts +132 -0
- package/src/models/EndpointList.ts +74 -0
- package/src/models/EndpointMachine.ts +151 -0
- package/src/models/EndpointReplicaCounts.ts +75 -0
- package/src/models/Job.ts +538 -0
- package/src/models/JobAttempt.ts +267 -0
- package/src/models/JobCreate.ts +221 -0
- package/src/models/JobGpuTypes.ts +83 -0
- package/src/models/JobGpuTypesDataInner.ts +104 -0
- package/src/models/JobLogChunk.ts +93 -0
- package/src/models/JobLogs.ts +83 -0
- package/src/models/JobPage.ts +83 -0
- package/src/models/JobSharingHint.ts +86 -0
- package/src/models/JobTelemetry.ts +101 -0
- package/src/models/JobTelemetryPoint.ts +102 -0
- package/src/models/JobTrial.ts +132 -0
- package/src/models/Secret.ts +111 -0
- package/src/models/SecretCreate.ts +83 -0
- package/src/models/SecretImportItem.ts +75 -0
- package/src/models/SecretImportRequest.ts +82 -0
- package/src/models/SecretImportResult.ts +84 -0
- package/src/models/SecretList.ts +74 -0
- package/src/models/SecretPut.ts +74 -0
- package/src/models/WebhookEndpoint.ts +4 -1
- package/src/models/index.ts +25 -0
- package/src/runtime.ts +1 -1
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.SecretsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const Secret_1 = require("../models/Secret");
|
|
28
|
+
const SecretCreate_1 = require("../models/SecretCreate");
|
|
29
|
+
const SecretImportRequest_1 = require("../models/SecretImportRequest");
|
|
30
|
+
const SecretImportResult_1 = require("../models/SecretImportResult");
|
|
31
|
+
const SecretList_1 = require("../models/SecretList");
|
|
32
|
+
const SecretPut_1 = require("../models/SecretPut");
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
class SecretsApi extends runtime.BaseAPI {
|
|
37
|
+
/**
|
|
38
|
+
* Creates request options for createSecret without sending the request
|
|
39
|
+
*/
|
|
40
|
+
createSecretRequestOpts(requestParameters) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
if (requestParameters['secretCreate'] == null) {
|
|
43
|
+
throw new runtime.RequiredError('secretCreate', 'Required parameter "secretCreate" was null or undefined when calling createSecret().');
|
|
44
|
+
}
|
|
45
|
+
const queryParameters = {};
|
|
46
|
+
const headerParameters = {};
|
|
47
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
48
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
49
|
+
const token = this.configuration.accessToken;
|
|
50
|
+
const tokenString = yield token("bearerAuth", []);
|
|
51
|
+
if (tokenString) {
|
|
52
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
let urlPath = `/secrets`;
|
|
56
|
+
return {
|
|
57
|
+
path: urlPath,
|
|
58
|
+
method: 'POST',
|
|
59
|
+
headers: headerParameters,
|
|
60
|
+
query: queryParameters,
|
|
61
|
+
body: (0, SecretCreate_1.SecretCreateToJSON)(requestParameters['secretCreate']),
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Stores a new secret. The value crosses the wire on create, update and import only, is envelope encrypted at rest, and is never returned. The name is the environment variable the value is delivered as: a letter or underscore, then letters, digits and underscores, 128 characters at most; names starting with GPUAI_ and names the machine itself needs (PATH, HOME, LD_PRELOAD and similar) are refused. Values are at most 32 KB. Returns 409 `name_taken` when the name exists (use PUT to replace a value) and 422 `validation_failed` for a bad name or value. Every create, update, delete and use is recorded in the organization\'s audit log, without the value. Requires the `instances:write` scope.
|
|
67
|
+
* Create a secret
|
|
68
|
+
*/
|
|
69
|
+
createSecretRaw(requestParameters, initOverrides) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
const requestOptions = yield this.createSecretRequestOpts(requestParameters);
|
|
72
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
73
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, Secret_1.SecretFromJSON)(jsonValue));
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Stores a new secret. The value crosses the wire on create, update and import only, is envelope encrypted at rest, and is never returned. The name is the environment variable the value is delivered as: a letter or underscore, then letters, digits and underscores, 128 characters at most; names starting with GPUAI_ and names the machine itself needs (PATH, HOME, LD_PRELOAD and similar) are refused. Values are at most 32 KB. Returns 409 `name_taken` when the name exists (use PUT to replace a value) and 422 `validation_failed` for a bad name or value. Every create, update, delete and use is recorded in the organization\'s audit log, without the value. Requires the `instances:write` scope.
|
|
78
|
+
* Create a secret
|
|
79
|
+
*/
|
|
80
|
+
createSecret(requestParameters, initOverrides) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
const response = yield this.createSecretRaw(requestParameters, initOverrides);
|
|
83
|
+
return yield response.value();
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Creates request options for deleteSecret without sending the request
|
|
88
|
+
*/
|
|
89
|
+
deleteSecretRequestOpts(requestParameters) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
if (requestParameters['name'] == null) {
|
|
92
|
+
throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling deleteSecret().');
|
|
93
|
+
}
|
|
94
|
+
const queryParameters = {};
|
|
95
|
+
const headerParameters = {};
|
|
96
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
97
|
+
const token = this.configuration.accessToken;
|
|
98
|
+
const tokenString = yield token("bearerAuth", []);
|
|
99
|
+
if (tokenString) {
|
|
100
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
let urlPath = `/secrets/{name}`;
|
|
104
|
+
urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
|
|
105
|
+
return {
|
|
106
|
+
path: urlPath,
|
|
107
|
+
method: 'DELETE',
|
|
108
|
+
headers: headerParameters,
|
|
109
|
+
query: queryParameters,
|
|
110
|
+
};
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Deletes the secret. Machines already running keep the value they were given; nothing started later can receive it, and a function version or job that still names it fails its next run. Requires the `instances:write` scope.
|
|
115
|
+
* Delete a secret
|
|
116
|
+
*/
|
|
117
|
+
deleteSecretRaw(requestParameters, initOverrides) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
const requestOptions = yield this.deleteSecretRequestOpts(requestParameters);
|
|
120
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
121
|
+
return new runtime.VoidApiResponse(response);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Deletes the secret. Machines already running keep the value they were given; nothing started later can receive it, and a function version or job that still names it fails its next run. Requires the `instances:write` scope.
|
|
126
|
+
* Delete a secret
|
|
127
|
+
*/
|
|
128
|
+
deleteSecret(requestParameters, initOverrides) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
yield this.deleteSecretRaw(requestParameters, initOverrides);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Creates request options for getSecret without sending the request
|
|
135
|
+
*/
|
|
136
|
+
getSecretRequestOpts(requestParameters) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
if (requestParameters['name'] == null) {
|
|
139
|
+
throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling getSecret().');
|
|
140
|
+
}
|
|
141
|
+
const queryParameters = {};
|
|
142
|
+
const headerParameters = {};
|
|
143
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
144
|
+
const token = this.configuration.accessToken;
|
|
145
|
+
const tokenString = yield token("bearerAuth", []);
|
|
146
|
+
if (tokenString) {
|
|
147
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
let urlPath = `/secrets/{name}`;
|
|
151
|
+
urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
|
|
152
|
+
return {
|
|
153
|
+
path: urlPath,
|
|
154
|
+
method: 'GET',
|
|
155
|
+
headers: headerParameters,
|
|
156
|
+
query: queryParameters,
|
|
157
|
+
};
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Returns one secret\'s metadata. The value is never returned. Requires the `instances:read` scope. 404 `not_found` when the organization has no secret with this name.
|
|
162
|
+
* Get a secret\'s metadata
|
|
163
|
+
*/
|
|
164
|
+
getSecretRaw(requestParameters, initOverrides) {
|
|
165
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
+
const requestOptions = yield this.getSecretRequestOpts(requestParameters);
|
|
167
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
168
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, Secret_1.SecretFromJSON)(jsonValue));
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Returns one secret\'s metadata. The value is never returned. Requires the `instances:read` scope. 404 `not_found` when the organization has no secret with this name.
|
|
173
|
+
* Get a secret\'s metadata
|
|
174
|
+
*/
|
|
175
|
+
getSecret(requestParameters, initOverrides) {
|
|
176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
+
const response = yield this.getSecretRaw(requestParameters, initOverrides);
|
|
178
|
+
return yield response.value();
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Creates request options for importSecrets without sending the request
|
|
183
|
+
*/
|
|
184
|
+
importSecretsRequestOpts(requestParameters) {
|
|
185
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
if (requestParameters['secretImportRequest'] == null) {
|
|
187
|
+
throw new runtime.RequiredError('secretImportRequest', 'Required parameter "secretImportRequest" was null or undefined when calling importSecrets().');
|
|
188
|
+
}
|
|
189
|
+
const queryParameters = {};
|
|
190
|
+
const headerParameters = {};
|
|
191
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
192
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
193
|
+
const token = this.configuration.accessToken;
|
|
194
|
+
const tokenString = yield token("bearerAuth", []);
|
|
195
|
+
if (tokenString) {
|
|
196
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
let urlPath = `/secrets/import`;
|
|
200
|
+
return {
|
|
201
|
+
path: urlPath,
|
|
202
|
+
method: 'POST',
|
|
203
|
+
headers: headerParameters,
|
|
204
|
+
query: queryParameters,
|
|
205
|
+
body: (0, SecretImportRequest_1.SecretImportRequestToJSON)(requestParameters['secretImportRequest']),
|
|
206
|
+
};
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Creates or updates many secrets at once, for example the output of `infisical export` or a .env file parsed by the client (the `gpu secrets import` command parses dotenv and Infisical JSON locally and sends this request). Every item is validated before any is written. With `overwrite` false, existing secrets are left untouched and listed under `skipped`. At most 200 items. Requires the `instances:write` scope.
|
|
211
|
+
* Import secrets
|
|
212
|
+
*/
|
|
213
|
+
importSecretsRaw(requestParameters, initOverrides) {
|
|
214
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
215
|
+
const requestOptions = yield this.importSecretsRequestOpts(requestParameters);
|
|
216
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
217
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, SecretImportResult_1.SecretImportResultFromJSON)(jsonValue));
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Creates or updates many secrets at once, for example the output of `infisical export` or a .env file parsed by the client (the `gpu secrets import` command parses dotenv and Infisical JSON locally and sends this request). Every item is validated before any is written. With `overwrite` false, existing secrets are left untouched and listed under `skipped`. At most 200 items. Requires the `instances:write` scope.
|
|
222
|
+
* Import secrets
|
|
223
|
+
*/
|
|
224
|
+
importSecrets(requestParameters, initOverrides) {
|
|
225
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
226
|
+
const response = yield this.importSecretsRaw(requestParameters, initOverrides);
|
|
227
|
+
return yield response.value();
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Creates request options for listSecrets without sending the request
|
|
232
|
+
*/
|
|
233
|
+
listSecretsRequestOpts() {
|
|
234
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
235
|
+
const queryParameters = {};
|
|
236
|
+
const headerParameters = {};
|
|
237
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
238
|
+
const token = this.configuration.accessToken;
|
|
239
|
+
const tokenString = yield token("bearerAuth", []);
|
|
240
|
+
if (tokenString) {
|
|
241
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
let urlPath = `/secrets`;
|
|
245
|
+
return {
|
|
246
|
+
path: urlPath,
|
|
247
|
+
method: 'GET',
|
|
248
|
+
headers: headerParameters,
|
|
249
|
+
query: queryParameters,
|
|
250
|
+
};
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Lists the organization\'s secrets by name with their metadata. Values are never returned by any read. Requires the `instances:read` scope. Returns 503 `secrets_unavailable` when secrets are switched on but no encryption key is configured, and 404 when the feature is off.
|
|
255
|
+
* List secrets
|
|
256
|
+
*/
|
|
257
|
+
listSecretsRaw(initOverrides) {
|
|
258
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
259
|
+
const requestOptions = yield this.listSecretsRequestOpts();
|
|
260
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
261
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, SecretList_1.SecretListFromJSON)(jsonValue));
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Lists the organization\'s secrets by name with their metadata. Values are never returned by any read. Requires the `instances:read` scope. Returns 503 `secrets_unavailable` when secrets are switched on but no encryption key is configured, and 404 when the feature is off.
|
|
266
|
+
* List secrets
|
|
267
|
+
*/
|
|
268
|
+
listSecrets(initOverrides) {
|
|
269
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
270
|
+
const response = yield this.listSecretsRaw(initOverrides);
|
|
271
|
+
return yield response.value();
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Creates request options for putSecret without sending the request
|
|
276
|
+
*/
|
|
277
|
+
putSecretRequestOpts(requestParameters) {
|
|
278
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
279
|
+
if (requestParameters['name'] == null) {
|
|
280
|
+
throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling putSecret().');
|
|
281
|
+
}
|
|
282
|
+
if (requestParameters['secretPut'] == null) {
|
|
283
|
+
throw new runtime.RequiredError('secretPut', 'Required parameter "secretPut" was null or undefined when calling putSecret().');
|
|
284
|
+
}
|
|
285
|
+
const queryParameters = {};
|
|
286
|
+
const headerParameters = {};
|
|
287
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
288
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
289
|
+
const token = this.configuration.accessToken;
|
|
290
|
+
const tokenString = yield token("bearerAuth", []);
|
|
291
|
+
if (tokenString) {
|
|
292
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
let urlPath = `/secrets/{name}`;
|
|
296
|
+
urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
|
|
297
|
+
return {
|
|
298
|
+
path: urlPath,
|
|
299
|
+
method: 'PUT',
|
|
300
|
+
headers: headerParameters,
|
|
301
|
+
query: queryParameters,
|
|
302
|
+
body: (0, SecretPut_1.SecretPutToJSON)(requestParameters['secretPut']),
|
|
303
|
+
};
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Sets the secret\'s value, creating the secret when it does not exist (201) or replacing the value and bumping its version when it does (200). Omit `description` to keep the current one. Machines already running keep the value they were given; launches and calls from now on get the new one. Requires the `instances:write` scope.
|
|
308
|
+
* Create or replace a secret
|
|
309
|
+
*/
|
|
310
|
+
putSecretRaw(requestParameters, initOverrides) {
|
|
311
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
312
|
+
const requestOptions = yield this.putSecretRequestOpts(requestParameters);
|
|
313
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
314
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, Secret_1.SecretFromJSON)(jsonValue));
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Sets the secret\'s value, creating the secret when it does not exist (201) or replacing the value and bumping its version when it does (200). Omit `description` to keep the current one. Machines already running keep the value they were given; launches and calls from now on get the new one. Requires the `instances:write` scope.
|
|
319
|
+
* Create or replace a secret
|
|
320
|
+
*/
|
|
321
|
+
putSecret(requestParameters, initOverrides) {
|
|
322
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
323
|
+
const response = yield this.putSecretRaw(requestParameters, initOverrides);
|
|
324
|
+
return yield response.value();
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
exports.SecretsApi = SecretsApi;
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
export * from './AutolaunchApi';
|
|
2
2
|
export * from './BillingApi';
|
|
3
3
|
export * from './CommunityApi';
|
|
4
|
+
export * from './EndpointsApi';
|
|
4
5
|
export * from './EnvironmentsApi';
|
|
5
6
|
export * from './FineTuningApi';
|
|
6
7
|
export * from './FunctionsApi';
|
|
7
8
|
export * from './GpuTypesApi';
|
|
8
9
|
export * from './InferenceApi';
|
|
9
10
|
export * from './InstancesApi';
|
|
11
|
+
export * from './JobsApi';
|
|
10
12
|
export * from './MarketApi';
|
|
11
13
|
export * from './MetaApi';
|
|
12
14
|
export * from './OperationsApi';
|
|
13
15
|
export * from './PricingApi';
|
|
14
16
|
export * from './RegistryCredentialsApi';
|
|
17
|
+
export * from './SecretsApi';
|
|
15
18
|
export * from './SshKeysApi';
|
|
16
19
|
export * from './TemplatesApi';
|
|
17
20
|
export * from './UsageApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -19,17 +19,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
19
19
|
__exportStar(require("./AutolaunchApi"), exports);
|
|
20
20
|
__exportStar(require("./BillingApi"), exports);
|
|
21
21
|
__exportStar(require("./CommunityApi"), exports);
|
|
22
|
+
__exportStar(require("./EndpointsApi"), exports);
|
|
22
23
|
__exportStar(require("./EnvironmentsApi"), exports);
|
|
23
24
|
__exportStar(require("./FineTuningApi"), exports);
|
|
24
25
|
__exportStar(require("./FunctionsApi"), exports);
|
|
25
26
|
__exportStar(require("./GpuTypesApi"), exports);
|
|
26
27
|
__exportStar(require("./InferenceApi"), exports);
|
|
27
28
|
__exportStar(require("./InstancesApi"), exports);
|
|
29
|
+
__exportStar(require("./JobsApi"), exports);
|
|
28
30
|
__exportStar(require("./MarketApi"), exports);
|
|
29
31
|
__exportStar(require("./MetaApi"), exports);
|
|
30
32
|
__exportStar(require("./OperationsApi"), exports);
|
|
31
33
|
__exportStar(require("./PricingApi"), exports);
|
|
32
34
|
__exportStar(require("./RegistryCredentialsApi"), exports);
|
|
35
|
+
__exportStar(require("./SecretsApi"), exports);
|
|
33
36
|
__exportStar(require("./SshKeysApi"), exports);
|
|
34
37
|
__exportStar(require("./TemplatesApi"), exports);
|
|
35
38
|
__exportStar(require("./UsageApi"), exports);
|
|
@@ -76,12 +76,12 @@ export declare class BillingApi extends runtime.BaseAPI {
|
|
|
76
76
|
*/
|
|
77
77
|
getBalanceRequestOpts(): Promise<runtime.RequestOpts>;
|
|
78
78
|
/**
|
|
79
|
-
* Returns the organization\'s credit balance, its auto-pay configuration, and the live burn rate. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. Divide `balance_cents` by `burn_cents_per_hour` for the remaining runway in hours. The quotient is undefined in three cases a caller must keep apart: `burn_cents_per_hour` is 0 (nothing running, so the balance funds unbounded idle time), it is `null` (the burn rate could not be determined — NOT the same as idle), or the balance is already at or below zero. This is the balance itself — for spend against a configured cap see `/billing/spending-limit`, and for past consumption see `/usage`.
|
|
79
|
+
* Returns the organization\'s credit balance, its auto-pay configuration, and the live burn rate. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. Divide `balance_cents` by `burn_cents_per_hour` for the remaining runway in hours. The quotient is undefined in three cases a caller must keep apart: `burn_cents_per_hour` is 0 (nothing running, so the balance funds unbounded idle time), it is `null` (the burn rate could not be determined — NOT the same as idle), or the balance is already at or below zero. This is the balance itself — for spend against a configured cap see `/billing/spending-limit`, and for past consumption see `/usage`. `runway_hours` does that division for you, adding serverless inference spend over the last hour to the burn. While it is under the low-balance threshold (2 hours by default) and auto-pay is off or failing, every authenticated response carries the `GPUAI-Balance-Warning` header.
|
|
80
80
|
* Get the org credit balance
|
|
81
81
|
*/
|
|
82
82
|
getBalanceRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Balance>>;
|
|
83
83
|
/**
|
|
84
|
-
* Returns the organization\'s credit balance, its auto-pay configuration, and the live burn rate. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. Divide `balance_cents` by `burn_cents_per_hour` for the remaining runway in hours. The quotient is undefined in three cases a caller must keep apart: `burn_cents_per_hour` is 0 (nothing running, so the balance funds unbounded idle time), it is `null` (the burn rate could not be determined — NOT the same as idle), or the balance is already at or below zero. This is the balance itself — for spend against a configured cap see `/billing/spending-limit`, and for past consumption see `/usage`.
|
|
84
|
+
* Returns the organization\'s credit balance, its auto-pay configuration, and the live burn rate. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. Divide `balance_cents` by `burn_cents_per_hour` for the remaining runway in hours. The quotient is undefined in three cases a caller must keep apart: `burn_cents_per_hour` is 0 (nothing running, so the balance funds unbounded idle time), it is `null` (the burn rate could not be determined — NOT the same as idle), or the balance is already at or below zero. This is the balance itself — for spend against a configured cap see `/billing/spending-limit`, and for past consumption see `/usage`. `runway_hours` does that division for you, adding serverless inference spend over the last hour to the burn. While it is under the low-balance threshold (2 hours by default) and auto-pay is off or failing, every authenticated response carries the `GPUAI-Balance-Warning` header.
|
|
85
85
|
* Get the org credit balance
|
|
86
86
|
*/
|
|
87
87
|
getBalance(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Balance>;
|
|
@@ -155,7 +155,7 @@ export class BillingApi extends runtime.BaseAPI {
|
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
|
-
* Returns the organization\'s credit balance, its auto-pay configuration, and the live burn rate. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. Divide `balance_cents` by `burn_cents_per_hour` for the remaining runway in hours. The quotient is undefined in three cases a caller must keep apart: `burn_cents_per_hour` is 0 (nothing running, so the balance funds unbounded idle time), it is `null` (the burn rate could not be determined — NOT the same as idle), or the balance is already at or below zero. This is the balance itself — for spend against a configured cap see `/billing/spending-limit`, and for past consumption see `/usage`.
|
|
158
|
+
* Returns the organization\'s credit balance, its auto-pay configuration, and the live burn rate. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. Divide `balance_cents` by `burn_cents_per_hour` for the remaining runway in hours. The quotient is undefined in three cases a caller must keep apart: `burn_cents_per_hour` is 0 (nothing running, so the balance funds unbounded idle time), it is `null` (the burn rate could not be determined — NOT the same as idle), or the balance is already at or below zero. This is the balance itself — for spend against a configured cap see `/billing/spending-limit`, and for past consumption see `/usage`. `runway_hours` does that division for you, adding serverless inference spend over the last hour to the burn. While it is under the low-balance threshold (2 hours by default) and auto-pay is off or failing, every authenticated response carries the `GPUAI-Balance-Warning` header.
|
|
159
159
|
* Get the org credit balance
|
|
160
160
|
*/
|
|
161
161
|
getBalanceRaw(initOverrides) {
|
|
@@ -166,7 +166,7 @@ export class BillingApi extends runtime.BaseAPI {
|
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
|
-
* Returns the organization\'s credit balance, its auto-pay configuration, and the live burn rate. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. Divide `balance_cents` by `burn_cents_per_hour` for the remaining runway in hours. The quotient is undefined in three cases a caller must keep apart: `burn_cents_per_hour` is 0 (nothing running, so the balance funds unbounded idle time), it is `null` (the burn rate could not be determined — NOT the same as idle), or the balance is already at or below zero. This is the balance itself — for spend against a configured cap see `/billing/spending-limit`, and for past consumption see `/usage`.
|
|
169
|
+
* Returns the organization\'s credit balance, its auto-pay configuration, and the live burn rate. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. Divide `balance_cents` by `burn_cents_per_hour` for the remaining runway in hours. The quotient is undefined in three cases a caller must keep apart: `burn_cents_per_hour` is 0 (nothing running, so the balance funds unbounded idle time), it is `null` (the burn rate could not be determined — NOT the same as idle), or the balance is already at or below zero. This is the balance itself — for spend against a configured cap see `/billing/spending-limit`, and for past consumption see `/usage`. `runway_hours` does that division for you, adding serverless inference spend over the last hour to the burn. While it is under the low-balance threshold (2 hours by default) and auto-pay is off or failing, every authenticated response carries the `GPUAI-Balance-Warning` header.
|
|
170
170
|
* Get the org credit balance
|
|
171
171
|
*/
|
|
172
172
|
getBalance(initOverrides) {
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import { type ChatCompletionRequest } from '../models/ChatCompletionRequest';
|
|
14
|
+
import { type ChatCompletionResponse } from '../models/ChatCompletionResponse';
|
|
15
|
+
import { type Endpoint } from '../models/Endpoint';
|
|
16
|
+
import { type EndpointCreate } from '../models/EndpointCreate';
|
|
17
|
+
import { type EndpointList } from '../models/EndpointList';
|
|
18
|
+
export interface CreateEndpointRequest {
|
|
19
|
+
endpointCreate: EndpointCreate;
|
|
20
|
+
}
|
|
21
|
+
export interface CreateEndpointChatCompletionRequest {
|
|
22
|
+
id: string;
|
|
23
|
+
chatCompletionRequest: ChatCompletionRequest;
|
|
24
|
+
}
|
|
25
|
+
export interface CreateEndpointCompletionRequest {
|
|
26
|
+
id: string;
|
|
27
|
+
requestBody: {
|
|
28
|
+
[key: string]: any | null;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface DeleteEndpointRequest {
|
|
32
|
+
id: string;
|
|
33
|
+
}
|
|
34
|
+
export interface GetEndpointRequest {
|
|
35
|
+
id: string;
|
|
36
|
+
}
|
|
37
|
+
export interface ListEndpointModelsRequest {
|
|
38
|
+
id: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
export declare class EndpointsApi extends runtime.BaseAPI {
|
|
44
|
+
/**
|
|
45
|
+
* Creates request options for createEndpoint without sending the request
|
|
46
|
+
*/
|
|
47
|
+
createEndpointRequestOpts(requestParameters: CreateEndpointRequest): Promise<runtime.RequestOpts>;
|
|
48
|
+
/**
|
|
49
|
+
* Creates an OpenAI-compatible endpoint serving a Hugging Face model with vLLM on the chosen GPU type. Nothing starts until the first request arrives, unless `min_replicas` keeps machines warm. Each machine is billed for the time it exists, like an instance, through the same balance. For a gated model, store a Hugging Face token as a secret and name it in `hf_token_secret`; it reaches the machines as HF_TOKEN. Returns 422 `validation_failed` for a bad field, 409 `name_taken` for a duplicate name, and 409 `limit_reached` at the per-organization cap. Requires the `functions:write` scope.
|
|
50
|
+
* Create a model endpoint
|
|
51
|
+
*/
|
|
52
|
+
createEndpointRaw(requestParameters: CreateEndpointRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Endpoint>>;
|
|
53
|
+
/**
|
|
54
|
+
* Creates an OpenAI-compatible endpoint serving a Hugging Face model with vLLM on the chosen GPU type. Nothing starts until the first request arrives, unless `min_replicas` keeps machines warm. Each machine is billed for the time it exists, like an instance, through the same balance. For a gated model, store a Hugging Face token as a secret and name it in `hf_token_secret`; it reaches the machines as HF_TOKEN. Returns 422 `validation_failed` for a bad field, 409 `name_taken` for a duplicate name, and 409 `limit_reached` at the per-organization cap. Requires the `functions:write` scope.
|
|
55
|
+
* Create a model endpoint
|
|
56
|
+
*/
|
|
57
|
+
createEndpoint(requestParameters: CreateEndpointRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Endpoint>;
|
|
58
|
+
/**
|
|
59
|
+
* Creates request options for createEndpointChatCompletion without sending the request
|
|
60
|
+
*/
|
|
61
|
+
createEndpointChatCompletionRequestOpts(requestParameters: CreateEndpointChatCompletionRequest): Promise<runtime.RequestOpts>;
|
|
62
|
+
/**
|
|
63
|
+
* The OpenAI chat completions route of one endpoint: point an OpenAI client\'s base_url at the endpoint\'s `url` and use a GPU.ai API key with the `functions:write` scope. The request\'s `model` is replaced with the endpoint\'s model, so any value works. Set `\"stream\": true` for Server-Sent Events, passed through as vLLM produces them. When no machine is ready the request waits while one starts (a cold start takes minutes: machine, image and model download); if none is ready in time the answer is 503 `endpoint_starting` with Retry-After. 402 `insufficient_quota` when the balance is empty. Errors use the OpenAI error envelope.
|
|
64
|
+
* Chat completion on a model endpoint (OpenAI-compatible)
|
|
65
|
+
*/
|
|
66
|
+
createEndpointChatCompletionRaw(requestParameters: CreateEndpointChatCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChatCompletionResponse>>;
|
|
67
|
+
/**
|
|
68
|
+
* The OpenAI chat completions route of one endpoint: point an OpenAI client\'s base_url at the endpoint\'s `url` and use a GPU.ai API key with the `functions:write` scope. The request\'s `model` is replaced with the endpoint\'s model, so any value works. Set `\"stream\": true` for Server-Sent Events, passed through as vLLM produces them. When no machine is ready the request waits while one starts (a cold start takes minutes: machine, image and model download); if none is ready in time the answer is 503 `endpoint_starting` with Retry-After. 402 `insufficient_quota` when the balance is empty. Errors use the OpenAI error envelope.
|
|
69
|
+
* Chat completion on a model endpoint (OpenAI-compatible)
|
|
70
|
+
*/
|
|
71
|
+
createEndpointChatCompletion(requestParameters: CreateEndpointChatCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChatCompletionResponse>;
|
|
72
|
+
/**
|
|
73
|
+
* Creates request options for createEndpointCompletion without sending the request
|
|
74
|
+
*/
|
|
75
|
+
createEndpointCompletionRequestOpts(requestParameters: CreateEndpointCompletionRequest): Promise<runtime.RequestOpts>;
|
|
76
|
+
/**
|
|
77
|
+
* The OpenAI completions route of one endpoint, with the same auth, model rewrite, streaming, cold start and error behavior as chat completions.
|
|
78
|
+
* Text completion on a model endpoint (OpenAI-compatible)
|
|
79
|
+
*/
|
|
80
|
+
createEndpointCompletionRaw(requestParameters: CreateEndpointCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
81
|
+
[key: string]: any;
|
|
82
|
+
}>>;
|
|
83
|
+
/**
|
|
84
|
+
* The OpenAI completions route of one endpoint, with the same auth, model rewrite, streaming, cold start and error behavior as chat completions.
|
|
85
|
+
* Text completion on a model endpoint (OpenAI-compatible)
|
|
86
|
+
*/
|
|
87
|
+
createEndpointCompletion(requestParameters: CreateEndpointCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
88
|
+
[key: string]: any;
|
|
89
|
+
}>;
|
|
90
|
+
/**
|
|
91
|
+
* Creates request options for deleteEndpoint without sending the request
|
|
92
|
+
*/
|
|
93
|
+
deleteEndpointRequestOpts(requestParameters: DeleteEndpointRequest): Promise<runtime.RequestOpts>;
|
|
94
|
+
/**
|
|
95
|
+
* Deletes the endpoint. Its machines are released within seconds and stop billing when terminated. Requires the `functions:write` scope.
|
|
96
|
+
* Delete a model endpoint
|
|
97
|
+
*/
|
|
98
|
+
deleteEndpointRaw(requestParameters: DeleteEndpointRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
99
|
+
/**
|
|
100
|
+
* Deletes the endpoint. Its machines are released within seconds and stop billing when terminated. Requires the `functions:write` scope.
|
|
101
|
+
* Delete a model endpoint
|
|
102
|
+
*/
|
|
103
|
+
deleteEndpoint(requestParameters: DeleteEndpointRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* Creates request options for getEndpoint without sending the request
|
|
106
|
+
*/
|
|
107
|
+
getEndpointRequestOpts(requestParameters: GetEndpointRequest): Promise<runtime.RequestOpts>;
|
|
108
|
+
/**
|
|
109
|
+
* Returns one endpoint with its recent machines (newest first), each with its price, ready and terminated times, and why it was released. Requires the `functions:read` scope.
|
|
110
|
+
* Get a model endpoint
|
|
111
|
+
*/
|
|
112
|
+
getEndpointRaw(requestParameters: GetEndpointRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Endpoint>>;
|
|
113
|
+
/**
|
|
114
|
+
* Returns one endpoint with its recent machines (newest first), each with its price, ready and terminated times, and why it was released. Requires the `functions:read` scope.
|
|
115
|
+
* Get a model endpoint
|
|
116
|
+
*/
|
|
117
|
+
getEndpoint(requestParameters: GetEndpointRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Endpoint>;
|
|
118
|
+
/**
|
|
119
|
+
* Creates request options for listEndpointModels without sending the request
|
|
120
|
+
*/
|
|
121
|
+
listEndpointModelsRequestOpts(requestParameters: ListEndpointModelsRequest): Promise<runtime.RequestOpts>;
|
|
122
|
+
/**
|
|
123
|
+
* The OpenAI models route of one endpoint: the one model it serves. Can trigger a cold start like any other request.
|
|
124
|
+
* List the model an endpoint serves (OpenAI-compatible)
|
|
125
|
+
*/
|
|
126
|
+
listEndpointModelsRaw(requestParameters: ListEndpointModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
127
|
+
[key: string]: any;
|
|
128
|
+
}>>;
|
|
129
|
+
/**
|
|
130
|
+
* The OpenAI models route of one endpoint: the one model it serves. Can trigger a cold start like any other request.
|
|
131
|
+
* List the model an endpoint serves (OpenAI-compatible)
|
|
132
|
+
*/
|
|
133
|
+
listEndpointModels(requestParameters: ListEndpointModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
134
|
+
[key: string]: any;
|
|
135
|
+
}>;
|
|
136
|
+
/**
|
|
137
|
+
* Creates request options for listEndpoints without sending the request
|
|
138
|
+
*/
|
|
139
|
+
listEndpointsRequestOpts(): Promise<runtime.RequestOpts>;
|
|
140
|
+
/**
|
|
141
|
+
* Lists the organization\'s live model endpoints with their status, URL and machine counts. Requires the `functions:read` scope.
|
|
142
|
+
* List model endpoints
|
|
143
|
+
*/
|
|
144
|
+
listEndpointsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EndpointList>>;
|
|
145
|
+
/**
|
|
146
|
+
* Lists the organization\'s live model endpoints with their status, URL and machine counts. Requires the `functions:read` scope.
|
|
147
|
+
* List model endpoints
|
|
148
|
+
*/
|
|
149
|
+
listEndpoints(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EndpointList>;
|
|
150
|
+
}
|