@gpuai/sdk 0.3.12 → 0.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/.openapi-generator/FILES +36 -0
  2. package/README.md +38 -9
  3. package/dist/apis/AutolaunchApi.d.ts +109 -0
  4. package/dist/apis/AutolaunchApi.js +286 -0
  5. package/dist/apis/InferenceApi.d.ts +19 -0
  6. package/dist/apis/InferenceApi.js +51 -0
  7. package/dist/apis/MarketApi.d.ts +56 -0
  8. package/dist/apis/MarketApi.js +112 -0
  9. package/dist/apis/WatchApi.d.ts +109 -0
  10. package/dist/apis/WatchApi.js +286 -0
  11. package/dist/apis/index.d.ts +3 -0
  12. package/dist/apis/index.js +3 -0
  13. package/dist/esm/apis/AutolaunchApi.d.ts +109 -0
  14. package/dist/esm/apis/AutolaunchApi.js +282 -0
  15. package/dist/esm/apis/InferenceApi.d.ts +19 -0
  16. package/dist/esm/apis/InferenceApi.js +51 -0
  17. package/dist/esm/apis/MarketApi.d.ts +56 -0
  18. package/dist/esm/apis/MarketApi.js +108 -0
  19. package/dist/esm/apis/WatchApi.d.ts +109 -0
  20. package/dist/esm/apis/WatchApi.js +282 -0
  21. package/dist/esm/apis/index.d.ts +3 -0
  22. package/dist/esm/apis/index.js +3 -0
  23. package/dist/esm/models/AutolaunchRule.d.ts +181 -0
  24. package/dist/esm/models/AutolaunchRule.js +142 -0
  25. package/dist/esm/models/AutolaunchRuleCreate.d.ts +105 -0
  26. package/dist/esm/models/AutolaunchRuleCreate.js +84 -0
  27. package/dist/esm/models/AutolaunchRuleDisarm.d.ts +34 -0
  28. package/dist/esm/models/AutolaunchRuleDisarm.js +43 -0
  29. package/dist/esm/models/AutolaunchRulePage.d.ts +39 -0
  30. package/dist/esm/models/AutolaunchRulePage.js +48 -0
  31. package/dist/esm/models/Embedding.d.ts +51 -0
  32. package/dist/esm/models/Embedding.js +59 -0
  33. package/dist/esm/models/EmbeddingsRequest.d.ts +64 -0
  34. package/dist/esm/models/EmbeddingsRequest.js +60 -0
  35. package/dist/esm/models/EmbeddingsRequestInput.d.ts +21 -0
  36. package/dist/esm/models/EmbeddingsRequestInput.js +47 -0
  37. package/dist/esm/models/EmbeddingsResponse.d.ts +59 -0
  38. package/dist/esm/models/EmbeddingsResponse.js +65 -0
  39. package/dist/esm/models/EmbeddingsUsage.d.ts +38 -0
  40. package/dist/esm/models/EmbeddingsUsage.js +47 -0
  41. package/dist/esm/models/MarketHistoryPoint.d.ts +59 -0
  42. package/dist/esm/models/MarketHistoryPoint.js +55 -0
  43. package/dist/esm/models/MarketHistoryResponse.d.ts +60 -0
  44. package/dist/esm/models/MarketHistoryResponse.js +60 -0
  45. package/dist/esm/models/Problem.d.ts +1 -0
  46. package/dist/esm/models/Problem.js +1 -0
  47. package/dist/esm/models/WatchRule.d.ts +141 -0
  48. package/dist/esm/models/WatchRule.js +117 -0
  49. package/dist/esm/models/WatchRuleCreate.d.ts +87 -0
  50. package/dist/esm/models/WatchRuleCreate.js +72 -0
  51. package/dist/esm/models/WatchRulePage.d.ts +39 -0
  52. package/dist/esm/models/WatchRulePage.js +48 -0
  53. package/dist/esm/models/WatchRuleUpdate.d.ts +86 -0
  54. package/dist/esm/models/WatchRuleUpdate.js +68 -0
  55. package/dist/esm/models/index.d.ts +15 -0
  56. package/dist/esm/models/index.js +15 -0
  57. package/dist/models/AutolaunchRule.d.ts +181 -0
  58. package/dist/models/AutolaunchRule.js +150 -0
  59. package/dist/models/AutolaunchRuleCreate.d.ts +105 -0
  60. package/dist/models/AutolaunchRuleCreate.js +92 -0
  61. package/dist/models/AutolaunchRuleDisarm.d.ts +34 -0
  62. package/dist/models/AutolaunchRuleDisarm.js +50 -0
  63. package/dist/models/AutolaunchRulePage.d.ts +39 -0
  64. package/dist/models/AutolaunchRulePage.js +55 -0
  65. package/dist/models/Embedding.d.ts +51 -0
  66. package/dist/models/Embedding.js +67 -0
  67. package/dist/models/EmbeddingsRequest.d.ts +64 -0
  68. package/dist/models/EmbeddingsRequest.js +68 -0
  69. package/dist/models/EmbeddingsRequestInput.d.ts +21 -0
  70. package/dist/models/EmbeddingsRequestInput.js +53 -0
  71. package/dist/models/EmbeddingsResponse.d.ts +59 -0
  72. package/dist/models/EmbeddingsResponse.js +73 -0
  73. package/dist/models/EmbeddingsUsage.d.ts +38 -0
  74. package/dist/models/EmbeddingsUsage.js +54 -0
  75. package/dist/models/MarketHistoryPoint.d.ts +59 -0
  76. package/dist/models/MarketHistoryPoint.js +62 -0
  77. package/dist/models/MarketHistoryResponse.d.ts +60 -0
  78. package/dist/models/MarketHistoryResponse.js +67 -0
  79. package/dist/models/Problem.d.ts +1 -0
  80. package/dist/models/Problem.js +1 -0
  81. package/dist/models/WatchRule.d.ts +141 -0
  82. package/dist/models/WatchRule.js +125 -0
  83. package/dist/models/WatchRuleCreate.d.ts +87 -0
  84. package/dist/models/WatchRuleCreate.js +80 -0
  85. package/dist/models/WatchRulePage.d.ts +39 -0
  86. package/dist/models/WatchRulePage.js +55 -0
  87. package/dist/models/WatchRuleUpdate.d.ts +86 -0
  88. package/dist/models/WatchRuleUpdate.js +76 -0
  89. package/dist/models/index.d.ts +15 -0
  90. package/dist/models/index.js +15 -0
  91. package/docs/AutolaunchApi.md +390 -0
  92. package/docs/AutolaunchRule.md +69 -0
  93. package/docs/AutolaunchRuleCreate.md +50 -0
  94. package/docs/AutolaunchRuleDisarm.md +35 -0
  95. package/docs/AutolaunchRulePage.md +36 -0
  96. package/docs/Embedding.md +38 -0
  97. package/docs/EmbeddingsRequest.md +42 -0
  98. package/docs/EmbeddingsRequestInput.md +33 -0
  99. package/docs/EmbeddingsResponse.md +40 -0
  100. package/docs/EmbeddingsUsage.md +37 -0
  101. package/docs/InferenceApi.md +83 -0
  102. package/docs/MarketApi.md +98 -0
  103. package/docs/MarketHistoryPoint.md +43 -0
  104. package/docs/MarketHistoryResponse.md +43 -0
  105. package/docs/WatchApi.md +389 -0
  106. package/docs/WatchRule.md +61 -0
  107. package/docs/WatchRuleCreate.md +46 -0
  108. package/docs/WatchRulePage.md +36 -0
  109. package/docs/WatchRuleUpdate.md +47 -0
  110. package/package.json +1 -1
  111. package/src/apis/AutolaunchApi.ts +360 -0
  112. package/src/apis/InferenceApi.ts +71 -0
  113. package/src/apis/MarketApi.ts +136 -0
  114. package/src/apis/WatchApi.ts +360 -0
  115. package/src/apis/index.ts +3 -0
  116. package/src/models/AutolaunchRule.ts +270 -0
  117. package/src/models/AutolaunchRuleCreate.ts +162 -0
  118. package/src/models/AutolaunchRuleDisarm.ts +68 -0
  119. package/src/models/AutolaunchRulePage.ts +83 -0
  120. package/src/models/Embedding.ts +96 -0
  121. package/src/models/EmbeddingsRequest.ts +117 -0
  122. package/src/models/EmbeddingsRequestInput.ts +59 -0
  123. package/src/models/EmbeddingsResponse.ts +120 -0
  124. package/src/models/EmbeddingsUsage.ts +75 -0
  125. package/src/models/MarketHistoryPoint.ts +103 -0
  126. package/src/models/MarketHistoryResponse.ts +113 -0
  127. package/src/models/Problem.ts +1 -0
  128. package/src/models/WatchRule.ts +219 -0
  129. package/src/models/WatchRuleCreate.ts +138 -0
  130. package/src/models/WatchRulePage.ts +83 -0
  131. package/src/models/WatchRuleUpdate.ts +135 -0
  132. package/src/models/index.ts +15 -0
@@ -0,0 +1,60 @@
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 { EmbeddingsRequestInputFromJSON, EmbeddingsRequestInputToJSON, } from './EmbeddingsRequestInput';
15
+ /**
16
+ * @export
17
+ */
18
+ export const EmbeddingsRequestEncodingFormatEnum = {
19
+ Float: 'float'
20
+ };
21
+ /**
22
+ * Check if a given object implements the EmbeddingsRequest interface.
23
+ */
24
+ export function instanceOfEmbeddingsRequest(value) {
25
+ if (!('model' in value) || value['model'] === undefined)
26
+ return false;
27
+ if (!('input' in value) || value['input'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ export function EmbeddingsRequestFromJSON(json) {
32
+ return EmbeddingsRequestFromJSONTyped(json, false);
33
+ }
34
+ export function EmbeddingsRequestFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'model': json['model'],
40
+ 'input': EmbeddingsRequestInputFromJSON(json['input']),
41
+ 'encodingFormat': json['encoding_format'] == null ? undefined : json['encoding_format'],
42
+ 'dimensions': json['dimensions'] == null ? undefined : json['dimensions'],
43
+ 'user': json['user'] == null ? undefined : json['user'],
44
+ };
45
+ }
46
+ export function EmbeddingsRequestToJSON(json) {
47
+ return EmbeddingsRequestToJSONTyped(json, false);
48
+ }
49
+ export function EmbeddingsRequestToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'model': value['model'],
55
+ 'input': EmbeddingsRequestInputToJSON(value['input']),
56
+ 'encoding_format': value['encodingFormat'],
57
+ 'dimensions': value['dimensions'],
58
+ 'user': value['user'],
59
+ };
60
+ }
@@ -0,0 +1,21 @@
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
+ * @type EmbeddingsRequestInput
14
+ * Text to embed: either a single string or an array of up to 2048 strings. Token-id arrays are not supported. The per-request ceiling is bounded so the response stays under 64 MiB — about 680 inputs at 4096 dimensions, fewer at a larger `dimensions` value; an over-limit batch is rejected with 400 invalid_request_error whose message states the limit, before any processing.
15
+ * @export
16
+ */
17
+ export type EmbeddingsRequestInput = Array<string> | string;
18
+ export declare function EmbeddingsRequestInputFromJSON(json: any): EmbeddingsRequestInput;
19
+ export declare function EmbeddingsRequestInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmbeddingsRequestInput;
20
+ export declare function EmbeddingsRequestInputToJSON(json: any): any;
21
+ export declare function EmbeddingsRequestInputToJSONTyped(value?: EmbeddingsRequestInput | 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
+ export function EmbeddingsRequestInputFromJSON(json) {
15
+ return EmbeddingsRequestInputFromJSONTyped(json, false);
16
+ }
17
+ export function EmbeddingsRequestInputFromJSONTyped(json, ignoreDiscriminator) {
18
+ if (json == null) {
19
+ return json;
20
+ }
21
+ if (Array.isArray(json)) {
22
+ if (json.every(item => typeof item === 'string')) {
23
+ return json;
24
+ }
25
+ }
26
+ if (typeof json === 'string') {
27
+ return json;
28
+ }
29
+ return {};
30
+ }
31
+ export function EmbeddingsRequestInputToJSON(json) {
32
+ return EmbeddingsRequestInputToJSONTyped(json, false);
33
+ }
34
+ export function EmbeddingsRequestInputToJSONTyped(value, ignoreDiscriminator = false) {
35
+ if (value == null) {
36
+ return value;
37
+ }
38
+ if (Array.isArray(value)) {
39
+ if (value.every(item => typeof item === 'string')) {
40
+ return value;
41
+ }
42
+ }
43
+ if (typeof value === 'string') {
44
+ return value;
45
+ }
46
+ return {};
47
+ }
@@ -0,0 +1,59 @@
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 { Embedding } from './Embedding';
13
+ import type { EmbeddingsUsage } from './EmbeddingsUsage';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface EmbeddingsResponse
18
+ */
19
+ export interface EmbeddingsResponse {
20
+ /**
21
+ *
22
+ * @type {EmbeddingsResponseObjectEnum}
23
+ * @memberof EmbeddingsResponse
24
+ */
25
+ object: EmbeddingsResponseObjectEnum;
26
+ /**
27
+ *
28
+ * @type {Array<Embedding>}
29
+ * @memberof EmbeddingsResponse
30
+ */
31
+ data: Array<Embedding>;
32
+ /**
33
+ * Canonical (gpuai/...) model id, NEVER the upstream identifier.
34
+ * @type {string}
35
+ * @memberof EmbeddingsResponse
36
+ */
37
+ model: string;
38
+ /**
39
+ *
40
+ * @type {EmbeddingsUsage}
41
+ * @memberof EmbeddingsResponse
42
+ */
43
+ usage: EmbeddingsUsage;
44
+ }
45
+ /**
46
+ * @export
47
+ */
48
+ export declare const EmbeddingsResponseObjectEnum: {
49
+ readonly List: "list";
50
+ };
51
+ export type EmbeddingsResponseObjectEnum = typeof EmbeddingsResponseObjectEnum[keyof typeof EmbeddingsResponseObjectEnum];
52
+ /**
53
+ * Check if a given object implements the EmbeddingsResponse interface.
54
+ */
55
+ export declare function instanceOfEmbeddingsResponse(value: object): value is EmbeddingsResponse;
56
+ export declare function EmbeddingsResponseFromJSON(json: any): EmbeddingsResponse;
57
+ export declare function EmbeddingsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmbeddingsResponse;
58
+ export declare function EmbeddingsResponseToJSON(json: any): EmbeddingsResponse;
59
+ export declare function EmbeddingsResponseToJSONTyped(value?: EmbeddingsResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,65 @@
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 { EmbeddingFromJSON, EmbeddingToJSON, } from './Embedding';
15
+ import { EmbeddingsUsageFromJSON, EmbeddingsUsageToJSON, } from './EmbeddingsUsage';
16
+ /**
17
+ * @export
18
+ */
19
+ export const EmbeddingsResponseObjectEnum = {
20
+ List: 'list'
21
+ };
22
+ /**
23
+ * Check if a given object implements the EmbeddingsResponse interface.
24
+ */
25
+ export function instanceOfEmbeddingsResponse(value) {
26
+ if (!('object' in value) || value['object'] === undefined)
27
+ return false;
28
+ if (value['object'] !== 'list')
29
+ return false;
30
+ if (!('data' in value) || value['data'] === undefined)
31
+ return false;
32
+ if (!('model' in value) || value['model'] === undefined)
33
+ return false;
34
+ if (!('usage' in value) || value['usage'] === undefined)
35
+ return false;
36
+ return true;
37
+ }
38
+ export function EmbeddingsResponseFromJSON(json) {
39
+ return EmbeddingsResponseFromJSONTyped(json, false);
40
+ }
41
+ export function EmbeddingsResponseFromJSONTyped(json, ignoreDiscriminator) {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+ 'object': json['object'],
47
+ 'data': (json['data'].map(EmbeddingFromJSON)),
48
+ 'model': json['model'],
49
+ 'usage': EmbeddingsUsageFromJSON(json['usage']),
50
+ };
51
+ }
52
+ export function EmbeddingsResponseToJSON(json) {
53
+ return EmbeddingsResponseToJSONTyped(json, false);
54
+ }
55
+ export function EmbeddingsResponseToJSONTyped(value, ignoreDiscriminator = false) {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+ return {
60
+ 'object': value['object'],
61
+ 'data': (value['data'].map(EmbeddingToJSON)),
62
+ 'model': value['model'],
63
+ 'usage': EmbeddingsUsageToJSON(value['usage']),
64
+ };
65
+ }
@@ -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
+ * Embeddings are billed on input tokens only, so this block carries no completion_tokens field — an embeddings call emits none, and total_tokens always equals prompt_tokens.
14
+ * @export
15
+ * @interface EmbeddingsUsage
16
+ */
17
+ export interface EmbeddingsUsage {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof EmbeddingsUsage
22
+ */
23
+ promptTokens: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof EmbeddingsUsage
28
+ */
29
+ totalTokens: number;
30
+ }
31
+ /**
32
+ * Check if a given object implements the EmbeddingsUsage interface.
33
+ */
34
+ export declare function instanceOfEmbeddingsUsage(value: object): value is EmbeddingsUsage;
35
+ export declare function EmbeddingsUsageFromJSON(json: any): EmbeddingsUsage;
36
+ export declare function EmbeddingsUsageFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmbeddingsUsage;
37
+ export declare function EmbeddingsUsageToJSON(json: any): EmbeddingsUsage;
38
+ export declare function EmbeddingsUsageToJSONTyped(value?: EmbeddingsUsage | 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 EmbeddingsUsage interface.
16
+ */
17
+ export function instanceOfEmbeddingsUsage(value) {
18
+ if ((!('promptTokens' in value) && !('prompt_tokens' in value)) || (value['promptTokens'] === undefined && value['prompt_tokens'] === undefined))
19
+ return false;
20
+ if ((!('totalTokens' in value) && !('total_tokens' in value)) || (value['totalTokens'] === undefined && value['total_tokens'] === undefined))
21
+ return false;
22
+ return true;
23
+ }
24
+ export function EmbeddingsUsageFromJSON(json) {
25
+ return EmbeddingsUsageFromJSONTyped(json, false);
26
+ }
27
+ export function EmbeddingsUsageFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'promptTokens': json['prompt_tokens'],
33
+ 'totalTokens': json['total_tokens'],
34
+ };
35
+ }
36
+ export function EmbeddingsUsageToJSON(json) {
37
+ return EmbeddingsUsageToJSONTyped(json, false);
38
+ }
39
+ export function EmbeddingsUsageToJSONTyped(value, ignoreDiscriminator = false) {
40
+ if (value == null) {
41
+ return value;
42
+ }
43
+ return {
44
+ 'prompt_tokens': value['promptTokens'],
45
+ 'total_tokens': value['totalTokens'],
46
+ };
47
+ }
@@ -0,0 +1,59 @@
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 bucket of a price/stock series.
14
+ *
15
+ * The nullability of `price_per_gpu_hour` and `available_count` is the contract, not a convenience: a real 0 is a bucket we sampled and found sold out, and null is a bucket we never successfully sampled. A client that coerces null to 0 will report GPU.ai's own polling outages as supplier stockouts, and must not interpolate across a null.
16
+ *
17
+ * @export
18
+ * @interface MarketHistoryPoint
19
+ */
20
+ export interface MarketHistoryPoint {
21
+ /**
22
+ * Start of the bucket, UTC, aligned to the bucket width.
23
+ * @type {Date}
24
+ * @memberof MarketHistoryPoint
25
+ */
26
+ bucketTs: Date;
27
+ /**
28
+ * GPU.ai's floor per-GPU hourly rate for this bucket, or null if we did not sample this bucket. Null is NOT zero.
29
+ * @type {number}
30
+ * @memberof MarketHistoryPoint
31
+ */
32
+ pricePerGpuHour: number | null;
33
+ /**
34
+ * Obtainable units across every matching offer in this bucket. 0 means we sampled and the market was sold out; null means we did not sample this bucket.
35
+ * @type {number}
36
+ * @memberof MarketHistoryPoint
37
+ */
38
+ availableCount: number | null;
39
+ /**
40
+ * Whole-node hourly price the per-GPU rate was divided out of. Present only when the bucket's floor came from a multi-GPU node; absent for single-GPU capacity.
41
+ * @type {number}
42
+ * @memberof MarketHistoryPoint
43
+ */
44
+ nodePricePerHour?: number;
45
+ /**
46
+ * GPUs in that node. Present only alongside `node_price_per_hour`, and it is what lets a renderer qualify a derived rate as "(from an 8-GPU node)" rather than implying single-GPU rentability.
47
+ * @type {number}
48
+ * @memberof MarketHistoryPoint
49
+ */
50
+ gpuCount?: number;
51
+ }
52
+ /**
53
+ * Check if a given object implements the MarketHistoryPoint interface.
54
+ */
55
+ export declare function instanceOfMarketHistoryPoint(value: object): value is MarketHistoryPoint;
56
+ export declare function MarketHistoryPointFromJSON(json: any): MarketHistoryPoint;
57
+ export declare function MarketHistoryPointFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarketHistoryPoint;
58
+ export declare function MarketHistoryPointToJSON(json: any): MarketHistoryPoint;
59
+ export declare function MarketHistoryPointToJSONTyped(value?: MarketHistoryPoint | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
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 MarketHistoryPoint interface.
16
+ */
17
+ export function instanceOfMarketHistoryPoint(value) {
18
+ if ((!('bucketTs' in value) && !('bucket_ts' in value)) || (value['bucketTs'] === undefined && value['bucket_ts'] === undefined))
19
+ return false;
20
+ if ((!('pricePerGpuHour' in value) && !('price_per_gpu_hour' in value)) || (value['pricePerGpuHour'] === undefined && value['price_per_gpu_hour'] === undefined))
21
+ return false;
22
+ if ((!('availableCount' in value) && !('available_count' in value)) || (value['availableCount'] === undefined && value['available_count'] === undefined))
23
+ return false;
24
+ return true;
25
+ }
26
+ export function MarketHistoryPointFromJSON(json) {
27
+ return MarketHistoryPointFromJSONTyped(json, false);
28
+ }
29
+ export function MarketHistoryPointFromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'bucketTs': (new Date(json['bucket_ts'])),
35
+ 'pricePerGpuHour': json['price_per_gpu_hour'],
36
+ 'availableCount': json['available_count'],
37
+ 'nodePricePerHour': json['node_price_per_hour'] == null ? undefined : json['node_price_per_hour'],
38
+ 'gpuCount': json['gpu_count'] == null ? undefined : json['gpu_count'],
39
+ };
40
+ }
41
+ export function MarketHistoryPointToJSON(json) {
42
+ return MarketHistoryPointToJSONTyped(json, false);
43
+ }
44
+ export function MarketHistoryPointToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'bucket_ts': value['bucketTs'].toISOString(),
50
+ 'price_per_gpu_hour': value['pricePerGpuHour'],
51
+ 'available_count': value['availableCount'],
52
+ 'node_price_per_hour': value['nodePricePerHour'],
53
+ 'gpu_count': value['gpuCount'],
54
+ };
55
+ }
@@ -0,0 +1,60 @@
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 { MarketHistoryPoint } from './MarketHistoryPoint';
13
+ /**
14
+ * A price/stock series for one (gpu_model, region, capacity_class) key.
15
+ *
16
+ * Points cover the FULL bucket grid across the requested window, including the buckets we did not sample — a gap therefore has visible width rather than disappearing between two adjacent points.
17
+ *
18
+ * @export
19
+ * @interface MarketHistoryResponse
20
+ */
21
+ export interface MarketHistoryResponse {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof MarketHistoryResponse
26
+ */
27
+ gpuModel: string;
28
+ /**
29
+ * Echoes the request. Empty means the series is MERGED across every region, the same thing it meant on the way in.
30
+ * @type {string}
31
+ * @memberof MarketHistoryResponse
32
+ */
33
+ region: string;
34
+ /**
35
+ * Echoes the request. Empty means the series is merged across both classes.
36
+ * @type {string}
37
+ * @memberof MarketHistoryResponse
38
+ */
39
+ capacityClass: string;
40
+ /**
41
+ * Resolution the server actually answered at. Echoed because the wide views downsample at query time, so a client must never assume 900.
42
+ * @type {number}
43
+ * @memberof MarketHistoryResponse
44
+ */
45
+ bucketSeconds: number;
46
+ /**
47
+ *
48
+ * @type {Array<MarketHistoryPoint>}
49
+ * @memberof MarketHistoryResponse
50
+ */
51
+ points: Array<MarketHistoryPoint>;
52
+ }
53
+ /**
54
+ * Check if a given object implements the MarketHistoryResponse interface.
55
+ */
56
+ export declare function instanceOfMarketHistoryResponse(value: object): value is MarketHistoryResponse;
57
+ export declare function MarketHistoryResponseFromJSON(json: any): MarketHistoryResponse;
58
+ export declare function MarketHistoryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarketHistoryResponse;
59
+ export declare function MarketHistoryResponseToJSON(json: any): MarketHistoryResponse;
60
+ export declare function MarketHistoryResponseToJSONTyped(value?: MarketHistoryResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
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 { MarketHistoryPointFromJSON, MarketHistoryPointToJSON, } from './MarketHistoryPoint';
15
+ /**
16
+ * Check if a given object implements the MarketHistoryResponse interface.
17
+ */
18
+ export function instanceOfMarketHistoryResponse(value) {
19
+ if ((!('gpuModel' in value) && !('gpu_model' in value)) || (value['gpuModel'] === undefined && value['gpu_model'] === undefined))
20
+ return false;
21
+ if (!('region' in value) || value['region'] === undefined)
22
+ return false;
23
+ if ((!('capacityClass' in value) && !('capacity_class' in value)) || (value['capacityClass'] === undefined && value['capacity_class'] === undefined))
24
+ return false;
25
+ if ((!('bucketSeconds' in value) && !('bucket_seconds' in value)) || (value['bucketSeconds'] === undefined && value['bucket_seconds'] === undefined))
26
+ return false;
27
+ if (!('points' in value) || value['points'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ export function MarketHistoryResponseFromJSON(json) {
32
+ return MarketHistoryResponseFromJSONTyped(json, false);
33
+ }
34
+ export function MarketHistoryResponseFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'gpuModel': json['gpu_model'],
40
+ 'region': json['region'],
41
+ 'capacityClass': json['capacity_class'],
42
+ 'bucketSeconds': json['bucket_seconds'],
43
+ 'points': (json['points'].map(MarketHistoryPointFromJSON)),
44
+ };
45
+ }
46
+ export function MarketHistoryResponseToJSON(json) {
47
+ return MarketHistoryResponseToJSONTyped(json, false);
48
+ }
49
+ export function MarketHistoryResponseToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'gpu_model': value['gpuModel'],
55
+ 'region': value['region'],
56
+ 'capacity_class': value['capacityClass'],
57
+ 'bucket_seconds': value['bucketSeconds'],
58
+ 'points': (value['points'].map(MarketHistoryPointToJSON)),
59
+ };
60
+ }
@@ -72,6 +72,7 @@ export declare const ProblemCodeEnum: {
72
72
  readonly InsufficientBalance: "insufficient_balance";
73
73
  readonly QuotaExceeded: "quota_exceeded";
74
74
  readonly RateLimited: "rate_limited";
75
+ readonly CreatorCheckUnavailable: "creator_check_unavailable";
75
76
  readonly InternalError: "internal_error";
76
77
  readonly OperationFailed: "operation_failed";
77
78
  };
@@ -31,6 +31,7 @@ export const ProblemCodeEnum = {
31
31
  InsufficientBalance: 'insufficient_balance',
32
32
  QuotaExceeded: 'quota_exceeded',
33
33
  RateLimited: 'rate_limited',
34
+ CreatorCheckUnavailable: 'creator_check_unavailable',
34
35
  InternalError: 'internal_error',
35
36
  OperationFailed: 'operation_failed'
36
37
  };