@gpuai/sdk 0.3.17 → 0.4.0
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 +40 -0
- package/README.md +36 -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/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/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AutolaunchRule.d.ts +4 -2
- 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/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 +19 -0
- package/dist/esm/models/index.js +19 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/AutolaunchRule.d.ts +4 -2
- 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/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 +19 -0
- package/dist/models/index.js +19 -0
- package/dist/runtime.js +1 -1
- package/docs/AutolaunchApi.md +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/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/index.ts +1 -0
- package/src/models/AutolaunchRule.ts +4 -2
- 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/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 +19 -0
- package/src/runtime.ts +1 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { FunctionUploadFromJSON, FunctionUploadToJSON, } from './FunctionUpload';
|
|
15
|
+
/**
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const FunctionVersionStatusEnum = {
|
|
19
|
+
PendingUpload: 'pending_upload',
|
|
20
|
+
Ready: 'ready'
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the FunctionVersion interface.
|
|
24
|
+
*/
|
|
25
|
+
export function instanceOfFunctionVersion(value) {
|
|
26
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if ((!('functionId' in value) && !('function_id' in value)) || (value['functionId'] === undefined && value['function_id'] === undefined))
|
|
29
|
+
return false;
|
|
30
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if ((!('contentHash' in value) && !('content_hash' in value)) || (value['contentHash'] === undefined && value['content_hash'] === undefined))
|
|
33
|
+
return false;
|
|
34
|
+
if ((!('pythonVersion' in value) && !('python_version' in value)) || (value['pythonVersion'] === undefined && value['python_version'] === undefined))
|
|
35
|
+
return false;
|
|
36
|
+
if ((!('cloudpickleVersion' in value) && !('cloudpickle_version' in value)) || (value['cloudpickleVersion'] === undefined && value['cloudpickle_version'] === undefined))
|
|
37
|
+
return false;
|
|
38
|
+
if (!('pip' in value) || value['pip'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if ((!('gpuCount' in value) && !('gpu_count' in value)) || (value['gpuCount'] === undefined && value['gpu_count'] === undefined))
|
|
41
|
+
return false;
|
|
42
|
+
if ((!('minVramGb' in value) && !('min_vram_gb' in value)) || (value['minVramGb'] === undefined && value['min_vram_gb'] === undefined))
|
|
43
|
+
return false;
|
|
44
|
+
if (!('regions' in value) || value['regions'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
if (!('timeout' in value) || value['timeout'] === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
if ((!('idleTimeout' in value) && !('idle_timeout' in value)) || (value['idleTimeout'] === undefined && value['idle_timeout'] === undefined))
|
|
49
|
+
return false;
|
|
50
|
+
if ((!('maxConcurrency' in value) && !('max_concurrency' in value)) || (value['maxConcurrency'] === undefined && value['max_concurrency'] === undefined))
|
|
51
|
+
return false;
|
|
52
|
+
if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
|
|
53
|
+
return false;
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
export function FunctionVersionFromJSON(json) {
|
|
57
|
+
return FunctionVersionFromJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
export function FunctionVersionFromJSONTyped(json, ignoreDiscriminator) {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
'id': json['id'],
|
|
65
|
+
'functionId': json['function_id'],
|
|
66
|
+
'status': json['status'],
|
|
67
|
+
'contentHash': json['content_hash'],
|
|
68
|
+
'upload': json['upload'] === undefined ? undefined : json['upload'] === null ? null : FunctionUploadFromJSON(json['upload']),
|
|
69
|
+
'pythonVersion': json['python_version'],
|
|
70
|
+
'cloudpickleVersion': json['cloudpickle_version'],
|
|
71
|
+
'pip': json['pip'],
|
|
72
|
+
'gpu': json['gpu'] === undefined ? undefined : json['gpu'] === null ? null : json['gpu'],
|
|
73
|
+
'gpuCount': json['gpu_count'],
|
|
74
|
+
'minVramGb': json['min_vram_gb'],
|
|
75
|
+
'regions': json['regions'],
|
|
76
|
+
'maxPricePerHour': json['max_price_per_hour'] === undefined ? undefined : json['max_price_per_hour'] === null ? null : json['max_price_per_hour'],
|
|
77
|
+
'timeout': json['timeout'],
|
|
78
|
+
'idleTimeout': json['idle_timeout'],
|
|
79
|
+
'maxConcurrency': json['max_concurrency'],
|
|
80
|
+
'createdAt': (new Date(json['created_at'])),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export function FunctionVersionToJSON(json) {
|
|
84
|
+
return FunctionVersionToJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
export function FunctionVersionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
87
|
+
if (value == null) {
|
|
88
|
+
return value;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
'id': value['id'],
|
|
92
|
+
'function_id': value['functionId'],
|
|
93
|
+
'status': value['status'],
|
|
94
|
+
'content_hash': value['contentHash'],
|
|
95
|
+
'upload': FunctionUploadToJSON(value['upload']),
|
|
96
|
+
'python_version': value['pythonVersion'],
|
|
97
|
+
'cloudpickle_version': value['cloudpickleVersion'],
|
|
98
|
+
'pip': value['pip'],
|
|
99
|
+
'gpu': value['gpu'],
|
|
100
|
+
'gpu_count': value['gpuCount'],
|
|
101
|
+
'min_vram_gb': value['minVramGb'],
|
|
102
|
+
'regions': value['regions'],
|
|
103
|
+
'max_price_per_hour': value['maxPricePerHour'],
|
|
104
|
+
'timeout': value['timeout'],
|
|
105
|
+
'idle_timeout': value['idleTimeout'],
|
|
106
|
+
'max_concurrency': value['maxConcurrency'],
|
|
107
|
+
'created_at': value['createdAt'].toISOString(),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface Invoice
|
|
16
|
+
*/
|
|
17
|
+
export interface Invoice {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof Invoice
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof Invoice
|
|
28
|
+
*/
|
|
29
|
+
number: string;
|
|
30
|
+
/**
|
|
31
|
+
* The payment date, which is also the invoice date.
|
|
32
|
+
* @type {Date}
|
|
33
|
+
* @memberof Invoice
|
|
34
|
+
*/
|
|
35
|
+
issuedAt: Date;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof Invoice
|
|
40
|
+
*/
|
|
41
|
+
amountCents: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof Invoice
|
|
46
|
+
*/
|
|
47
|
+
currency: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof Invoice
|
|
52
|
+
*/
|
|
53
|
+
paymentMethod: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof Invoice
|
|
58
|
+
*/
|
|
59
|
+
description: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Check if a given object implements the Invoice interface.
|
|
63
|
+
*/
|
|
64
|
+
export declare function instanceOfInvoice(value: object): value is Invoice;
|
|
65
|
+
export declare function InvoiceFromJSON(json: any): Invoice;
|
|
66
|
+
export declare function InvoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Invoice;
|
|
67
|
+
export declare function InvoiceToJSON(json: any): Invoice;
|
|
68
|
+
export declare function InvoiceToJSONTyped(value?: Invoice | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the Invoice interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfInvoice(value) {
|
|
18
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('number' in value) || value['number'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if ((!('issuedAt' in value) && !('issued_at' in value)) || (value['issuedAt'] === undefined && value['issued_at'] === undefined))
|
|
23
|
+
return false;
|
|
24
|
+
if ((!('amountCents' in value) && !('amount_cents' in value)) || (value['amountCents'] === undefined && value['amount_cents'] === undefined))
|
|
25
|
+
return false;
|
|
26
|
+
if (!('currency' in value) || value['currency'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if ((!('paymentMethod' in value) && !('payment_method' in value)) || (value['paymentMethod'] === undefined && value['payment_method'] === undefined))
|
|
29
|
+
return false;
|
|
30
|
+
if (!('description' in value) || value['description'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
export function InvoiceFromJSON(json) {
|
|
35
|
+
return InvoiceFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function InvoiceFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'id': json['id'],
|
|
43
|
+
'number': json['number'],
|
|
44
|
+
'issuedAt': (new Date(json['issued_at'])),
|
|
45
|
+
'amountCents': json['amount_cents'],
|
|
46
|
+
'currency': json['currency'],
|
|
47
|
+
'paymentMethod': json['payment_method'],
|
|
48
|
+
'description': json['description'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export function InvoiceToJSON(json) {
|
|
52
|
+
return InvoiceToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
export function InvoiceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'id': value['id'],
|
|
60
|
+
'number': value['number'],
|
|
61
|
+
'issued_at': value['issuedAt'].toISOString(),
|
|
62
|
+
'amount_cents': value['amountCents'],
|
|
63
|
+
'currency': value['currency'],
|
|
64
|
+
'payment_method': value['paymentMethod'],
|
|
65
|
+
'description': value['description'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Invoice } from './Invoice';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface InvoiceList
|
|
17
|
+
*/
|
|
18
|
+
export interface InvoiceList {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<Invoice>}
|
|
22
|
+
* @memberof InvoiceList
|
|
23
|
+
*/
|
|
24
|
+
invoices: Array<Invoice>;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {boolean}
|
|
28
|
+
* @memberof InvoiceList
|
|
29
|
+
*/
|
|
30
|
+
hasMore: boolean;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof InvoiceList
|
|
35
|
+
*/
|
|
36
|
+
nextCursor?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the InvoiceList interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfInvoiceList(value: object): value is InvoiceList;
|
|
42
|
+
export declare function InvoiceListFromJSON(json: any): InvoiceList;
|
|
43
|
+
export declare function InvoiceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceList;
|
|
44
|
+
export declare function InvoiceListToJSON(json: any): InvoiceList;
|
|
45
|
+
export declare function InvoiceListToJSONTyped(value?: InvoiceList | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { InvoiceFromJSON, InvoiceToJSON, } from './Invoice';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the InvoiceList interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfInvoiceList(value) {
|
|
19
|
+
if (!('invoices' in value) || value['invoices'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if ((!('hasMore' in value) && !('has_more' in value)) || (value['hasMore'] === undefined && value['has_more'] === undefined))
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function InvoiceListFromJSON(json) {
|
|
26
|
+
return InvoiceListFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function InvoiceListFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'invoices': (json['invoices'].map(InvoiceFromJSON)),
|
|
34
|
+
'hasMore': json['has_more'],
|
|
35
|
+
'nextCursor': json['next_cursor'] == null ? undefined : json['next_cursor'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function InvoiceListToJSON(json) {
|
|
39
|
+
return InvoiceListToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
export function InvoiceListToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'invoices': (value['invoices'].map(InvoiceToJSON)),
|
|
47
|
+
'has_more': value['hasMore'],
|
|
48
|
+
'next_cursor': value['nextCursor'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ModelRate } from './ModelRate';
|
|
13
|
+
import type { PeakWindow } from './PeakWindow';
|
|
12
14
|
/**
|
|
13
15
|
*
|
|
14
16
|
* @export
|
|
@@ -33,6 +35,18 @@ export interface ModelPricing {
|
|
|
33
35
|
* @memberof ModelPricing
|
|
34
36
|
*/
|
|
35
37
|
outputPer1mTokensCents?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Exact per-1M-token rate in micro-cents (1e-6 cent) for the cache-HIT part of a chat prompt (usage.prompt_tokens_details.cached_tokens). Present only on models with a published cached-input rate; absent means no discount — every prompt token bills at input_per_1m_tokens_cents. Treat this field as the presence signal: cached rates are routinely sub-cent, so the rounded cents field below is often omitted.
|
|
40
|
+
* @type {number}
|
|
41
|
+
* @memberof ModelPricing
|
|
42
|
+
*/
|
|
43
|
+
cachedInputPer1mTokensMicrocents?: number;
|
|
44
|
+
/**
|
|
45
|
+
* cached_input_per_1m_tokens_microcents rounded to whole cents; omitted when the exact rate rounds below half a cent.
|
|
46
|
+
* @type {number}
|
|
47
|
+
* @memberof ModelPricing
|
|
48
|
+
*/
|
|
49
|
+
cachedInputPer1mTokensCents?: number;
|
|
36
50
|
/**
|
|
37
51
|
*
|
|
38
52
|
* @type {number}
|
|
@@ -69,7 +83,39 @@ export interface ModelPricing {
|
|
|
69
83
|
* @memberof ModelPricing
|
|
70
84
|
*/
|
|
71
85
|
perVideoSecondMicrocents?: number;
|
|
86
|
+
/**
|
|
87
|
+
* Present only on a model priced by time of day. Which side of the peak schedule the instant this response was rendered falls on; the flat rate fields above are the rates in effect at that instant. A request is billed at the rate in effect when it ARRIVES (UTC), so a caller planning a call for later should price it from `peak` / `off_peak` and `peak_windows_utc`.
|
|
88
|
+
* @type {ModelPricingPeriodEnum}
|
|
89
|
+
* @memberof ModelPricing
|
|
90
|
+
*/
|
|
91
|
+
period?: ModelPricingPeriodEnum;
|
|
92
|
+
/**
|
|
93
|
+
* The daily UTC ranges during which the `peak` rates apply, start inclusive and end exclusive ("24:00" is a valid end; a range whose end sorts before its start wraps midnight). Present only on a model priced by time of day.
|
|
94
|
+
* @type {Array<PeakWindow>}
|
|
95
|
+
* @memberof ModelPricing
|
|
96
|
+
*/
|
|
97
|
+
peakWindowsUtc?: Array<PeakWindow>;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @type {ModelRate}
|
|
101
|
+
* @memberof ModelPricing
|
|
102
|
+
*/
|
|
103
|
+
peak?: ModelRate;
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @type {ModelRate}
|
|
107
|
+
* @memberof ModelPricing
|
|
108
|
+
*/
|
|
109
|
+
offPeak?: ModelRate;
|
|
72
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* @export
|
|
113
|
+
*/
|
|
114
|
+
export declare const ModelPricingPeriodEnum: {
|
|
115
|
+
readonly Peak: "peak";
|
|
116
|
+
readonly OffPeak: "off_peak";
|
|
117
|
+
};
|
|
118
|
+
export type ModelPricingPeriodEnum = typeof ModelPricingPeriodEnum[keyof typeof ModelPricingPeriodEnum];
|
|
73
119
|
/**
|
|
74
120
|
* Check if a given object implements the ModelPricing interface.
|
|
75
121
|
*/
|
|
@@ -11,6 +11,15 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { ModelRateFromJSON, ModelRateToJSON, } from './ModelRate';
|
|
15
|
+
import { PeakWindowFromJSON, PeakWindowToJSON, } from './PeakWindow';
|
|
16
|
+
/**
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export const ModelPricingPeriodEnum = {
|
|
20
|
+
Peak: 'peak',
|
|
21
|
+
OffPeak: 'off_peak'
|
|
22
|
+
};
|
|
14
23
|
/**
|
|
15
24
|
* Check if a given object implements the ModelPricing interface.
|
|
16
25
|
*/
|
|
@@ -28,12 +37,18 @@ export function ModelPricingFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
28
37
|
'currency': json['currency'] == null ? undefined : json['currency'],
|
|
29
38
|
'inputPer1mTokensCents': json['input_per_1m_tokens_cents'] == null ? undefined : json['input_per_1m_tokens_cents'],
|
|
30
39
|
'outputPer1mTokensCents': json['output_per_1m_tokens_cents'] == null ? undefined : json['output_per_1m_tokens_cents'],
|
|
40
|
+
'cachedInputPer1mTokensMicrocents': json['cached_input_per_1m_tokens_microcents'] == null ? undefined : json['cached_input_per_1m_tokens_microcents'],
|
|
41
|
+
'cachedInputPer1mTokensCents': json['cached_input_per_1m_tokens_cents'] == null ? undefined : json['cached_input_per_1m_tokens_cents'],
|
|
31
42
|
'perImageCents': json['per_image_cents'] == null ? undefined : json['per_image_cents'],
|
|
32
43
|
'perImageMicrocents': json['per_image_microcents'] == null ? undefined : json['per_image_microcents'],
|
|
33
44
|
'perMpxlMicrocents': json['per_mpxl_microcents'] == null ? undefined : json['per_mpxl_microcents'],
|
|
34
45
|
'perVideoMicrocents': json['per_video_microcents'] == null ? undefined : json['per_video_microcents'],
|
|
35
46
|
'perVideoSecondCents': json['per_video_second_cents'] == null ? undefined : json['per_video_second_cents'],
|
|
36
47
|
'perVideoSecondMicrocents': json['per_video_second_microcents'] == null ? undefined : json['per_video_second_microcents'],
|
|
48
|
+
'period': json['period'] == null ? undefined : json['period'],
|
|
49
|
+
'peakWindowsUtc': json['peak_windows_utc'] == null ? undefined : (json['peak_windows_utc'].map(PeakWindowFromJSON)),
|
|
50
|
+
'peak': json['peak'] == null ? undefined : ModelRateFromJSON(json['peak']),
|
|
51
|
+
'offPeak': json['off_peak'] == null ? undefined : ModelRateFromJSON(json['off_peak']),
|
|
37
52
|
};
|
|
38
53
|
}
|
|
39
54
|
export function ModelPricingToJSON(json) {
|
|
@@ -47,11 +62,17 @@ export function ModelPricingToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
47
62
|
'currency': value['currency'],
|
|
48
63
|
'input_per_1m_tokens_cents': value['inputPer1mTokensCents'],
|
|
49
64
|
'output_per_1m_tokens_cents': value['outputPer1mTokensCents'],
|
|
65
|
+
'cached_input_per_1m_tokens_microcents': value['cachedInputPer1mTokensMicrocents'],
|
|
66
|
+
'cached_input_per_1m_tokens_cents': value['cachedInputPer1mTokensCents'],
|
|
50
67
|
'per_image_cents': value['perImageCents'],
|
|
51
68
|
'per_image_microcents': value['perImageMicrocents'],
|
|
52
69
|
'per_mpxl_microcents': value['perMpxlMicrocents'],
|
|
53
70
|
'per_video_microcents': value['perVideoMicrocents'],
|
|
54
71
|
'per_video_second_cents': value['perVideoSecondCents'],
|
|
55
72
|
'per_video_second_microcents': value['perVideoSecondMicrocents'],
|
|
73
|
+
'period': value['period'],
|
|
74
|
+
'peak_windows_utc': value['peakWindowsUtc'] == null ? undefined : (value['peakWindowsUtc'].map(PeakWindowToJSON)),
|
|
75
|
+
'peak': ModelRateToJSON(value['peak']),
|
|
76
|
+
'off_peak': ModelRateToJSON(value['offPeak']),
|
|
56
77
|
};
|
|
57
78
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 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.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ModelRate
|
|
16
|
+
*/
|
|
17
|
+
export interface ModelRate {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ModelRate
|
|
22
|
+
*/
|
|
23
|
+
inputPer1mTokensCents?: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ModelRate
|
|
28
|
+
*/
|
|
29
|
+
inputPer1mTokensMicrocents?: number;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof ModelRate
|
|
34
|
+
*/
|
|
35
|
+
cachedInputPer1mTokensCents?: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof ModelRate
|
|
40
|
+
*/
|
|
41
|
+
cachedInputPer1mTokensMicrocents?: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof ModelRate
|
|
46
|
+
*/
|
|
47
|
+
outputPer1mTokensCents?: number;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof ModelRate
|
|
52
|
+
*/
|
|
53
|
+
outputPer1mTokensMicrocents?: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the ModelRate interface.
|
|
57
|
+
*/
|
|
58
|
+
export declare function instanceOfModelRate(value: object): value is ModelRate;
|
|
59
|
+
export declare function ModelRateFromJSON(json: any): ModelRate;
|
|
60
|
+
export declare function ModelRateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelRate;
|
|
61
|
+
export declare function ModelRateToJSON(json: any): ModelRate;
|
|
62
|
+
export declare function ModelRateToJSONTyped(value?: ModelRate | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the ModelRate interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfModelRate(value) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
export function ModelRateFromJSON(json) {
|
|
21
|
+
return ModelRateFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
export function ModelRateFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json == null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'inputPer1mTokensCents': json['input_per_1m_tokens_cents'] == null ? undefined : json['input_per_1m_tokens_cents'],
|
|
29
|
+
'inputPer1mTokensMicrocents': json['input_per_1m_tokens_microcents'] == null ? undefined : json['input_per_1m_tokens_microcents'],
|
|
30
|
+
'cachedInputPer1mTokensCents': json['cached_input_per_1m_tokens_cents'] == null ? undefined : json['cached_input_per_1m_tokens_cents'],
|
|
31
|
+
'cachedInputPer1mTokensMicrocents': json['cached_input_per_1m_tokens_microcents'] == null ? undefined : json['cached_input_per_1m_tokens_microcents'],
|
|
32
|
+
'outputPer1mTokensCents': json['output_per_1m_tokens_cents'] == null ? undefined : json['output_per_1m_tokens_cents'],
|
|
33
|
+
'outputPer1mTokensMicrocents': json['output_per_1m_tokens_microcents'] == null ? undefined : json['output_per_1m_tokens_microcents'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function ModelRateToJSON(json) {
|
|
37
|
+
return ModelRateToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function ModelRateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'input_per_1m_tokens_cents': value['inputPer1mTokensCents'],
|
|
45
|
+
'input_per_1m_tokens_microcents': value['inputPer1mTokensMicrocents'],
|
|
46
|
+
'cached_input_per_1m_tokens_cents': value['cachedInputPer1mTokensCents'],
|
|
47
|
+
'cached_input_per_1m_tokens_microcents': value['cachedInputPer1mTokensMicrocents'],
|
|
48
|
+
'output_per_1m_tokens_cents': value['outputPer1mTokensCents'],
|
|
49
|
+
'output_per_1m_tokens_microcents': value['outputPer1mTokensMicrocents'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* One daily UTC time range during which a model's peak rates apply.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface PeakWindow
|
|
16
|
+
*/
|
|
17
|
+
export interface PeakWindow {
|
|
18
|
+
/**
|
|
19
|
+
* "HH:MM" UTC, inclusive.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof PeakWindow
|
|
22
|
+
*/
|
|
23
|
+
start: string;
|
|
24
|
+
/**
|
|
25
|
+
* "HH:MM" UTC, exclusive ("24:00" means until midnight).
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof PeakWindow
|
|
28
|
+
*/
|
|
29
|
+
end: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the PeakWindow interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfPeakWindow(value: object): value is PeakWindow;
|
|
35
|
+
export declare function PeakWindowFromJSON(json: any): PeakWindow;
|
|
36
|
+
export declare function PeakWindowFromJSONTyped(json: any, ignoreDiscriminator: boolean): PeakWindow;
|
|
37
|
+
export declare function PeakWindowToJSON(json: any): PeakWindow;
|
|
38
|
+
export declare function PeakWindowToJSONTyped(value?: PeakWindow | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the PeakWindow interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfPeakWindow(value) {
|
|
18
|
+
if (!('start' in value) || value['start'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('end' in value) || value['end'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function PeakWindowFromJSON(json) {
|
|
25
|
+
return PeakWindowFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function PeakWindowFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'start': json['start'],
|
|
33
|
+
'end': json['end'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function PeakWindowToJSON(json) {
|
|
37
|
+
return PeakWindowToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function PeakWindowToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'start': value['start'],
|
|
45
|
+
'end': value['end'],
|
|
46
|
+
};
|
|
47
|
+
}
|