@gpuai/sdk 0.3.12 → 0.3.13

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 (44) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +8 -2
  3. package/dist/apis/InferenceApi.d.ts +19 -0
  4. package/dist/apis/InferenceApi.js +51 -0
  5. package/dist/esm/apis/InferenceApi.d.ts +19 -0
  6. package/dist/esm/apis/InferenceApi.js +51 -0
  7. package/dist/esm/models/Embedding.d.ts +51 -0
  8. package/dist/esm/models/Embedding.js +59 -0
  9. package/dist/esm/models/EmbeddingsRequest.d.ts +64 -0
  10. package/dist/esm/models/EmbeddingsRequest.js +60 -0
  11. package/dist/esm/models/EmbeddingsRequestInput.d.ts +21 -0
  12. package/dist/esm/models/EmbeddingsRequestInput.js +47 -0
  13. package/dist/esm/models/EmbeddingsResponse.d.ts +59 -0
  14. package/dist/esm/models/EmbeddingsResponse.js +65 -0
  15. package/dist/esm/models/EmbeddingsUsage.d.ts +38 -0
  16. package/dist/esm/models/EmbeddingsUsage.js +47 -0
  17. package/dist/esm/models/index.d.ts +5 -0
  18. package/dist/esm/models/index.js +5 -0
  19. package/dist/models/Embedding.d.ts +51 -0
  20. package/dist/models/Embedding.js +67 -0
  21. package/dist/models/EmbeddingsRequest.d.ts +64 -0
  22. package/dist/models/EmbeddingsRequest.js +68 -0
  23. package/dist/models/EmbeddingsRequestInput.d.ts +21 -0
  24. package/dist/models/EmbeddingsRequestInput.js +53 -0
  25. package/dist/models/EmbeddingsResponse.d.ts +59 -0
  26. package/dist/models/EmbeddingsResponse.js +73 -0
  27. package/dist/models/EmbeddingsUsage.d.ts +38 -0
  28. package/dist/models/EmbeddingsUsage.js +54 -0
  29. package/dist/models/index.d.ts +5 -0
  30. package/dist/models/index.js +5 -0
  31. package/docs/Embedding.md +38 -0
  32. package/docs/EmbeddingsRequest.md +42 -0
  33. package/docs/EmbeddingsRequestInput.md +33 -0
  34. package/docs/EmbeddingsResponse.md +40 -0
  35. package/docs/EmbeddingsUsage.md +37 -0
  36. package/docs/InferenceApi.md +83 -0
  37. package/package.json +1 -1
  38. package/src/apis/InferenceApi.ts +71 -0
  39. package/src/models/Embedding.ts +96 -0
  40. package/src/models/EmbeddingsRequest.ts +117 -0
  41. package/src/models/EmbeddingsRequestInput.ts +59 -0
  42. package/src/models/EmbeddingsResponse.ts +120 -0
  43. package/src/models/EmbeddingsUsage.ts +75 -0
  44. package/src/models/index.ts +5 -0
@@ -22,6 +22,11 @@ docs/CreateRegistryCredentialRequest.md
22
22
  docs/CreateSshKeyRequest.md
23
23
  docs/CreateWebhookEndpointRequest.md
24
24
  docs/CryptoDeposit.md
25
+ docs/Embedding.md
26
+ docs/EmbeddingsRequest.md
27
+ docs/EmbeddingsRequestInput.md
28
+ docs/EmbeddingsResponse.md
29
+ docs/EmbeddingsUsage.md
25
30
  docs/Environments.md
26
31
  docs/EnvironmentsApi.md
27
32
  docs/FileObject.md
@@ -129,6 +134,11 @@ src/models/CreateRegistryCredentialRequest.ts
129
134
  src/models/CreateSshKeyRequest.ts
130
135
  src/models/CreateWebhookEndpointRequest.ts
131
136
  src/models/CryptoDeposit.ts
137
+ src/models/Embedding.ts
138
+ src/models/EmbeddingsRequest.ts
139
+ src/models/EmbeddingsRequestInput.ts
140
+ src/models/EmbeddingsResponse.ts
141
+ src/models/EmbeddingsUsage.ts
132
142
  src/models/Environments.ts
133
143
  src/models/FileObject.ts
134
144
  src/models/FineTuningJob.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @gpuai/sdk@0.3.12
1
+ # @gpuai/sdk@0.3.13
2
2
 
3
3
  A TypeScript SDK client for the api.gpu.ai API.
4
4
 
@@ -76,6 +76,7 @@ All URIs are relative to *https://api.gpu.ai/v1*
76
76
  *GpuTypesApi* | [**listGpuTypes**](docs/GpuTypesApi.md#listgputypes) | **GET** /gpu-types | List available GPU types (no auth required)
77
77
  *InferenceApi* | [**cancelVideo**](docs/InferenceApi.md#cancelvideo) | **POST** /videos/{id}/cancel | Cancel a video generation job
78
78
  *InferenceApi* | [**createChatCompletion**](docs/InferenceApi.md#createchatcompletion) | **POST** /chat/completions | Create a chat completion (OpenAI-compatible)
79
+ *InferenceApi* | [**createEmbeddings**](docs/InferenceApi.md#createembeddings) | **POST** /embeddings | Create embeddings (OpenAI-compatible)
79
80
  *InferenceApi* | [**createImage**](docs/InferenceApi.md#createimage) | **POST** /images/generations | Create image (OpenAI-compatible)
80
81
  *InferenceApi* | [**createVideo**](docs/InferenceApi.md#createvideo) | **POST** /videos | Create a video generation job (async)
81
82
  *InferenceApi* | [**getModel**](docs/InferenceApi.md#getmodel) | **GET** /models/{id} | Get a specific model (OpenAI-compatible)
@@ -129,6 +130,11 @@ All URIs are relative to *https://api.gpu.ai/v1*
129
130
  - [CreateSshKeyRequest](docs/CreateSshKeyRequest.md)
130
131
  - [CreateWebhookEndpointRequest](docs/CreateWebhookEndpointRequest.md)
131
132
  - [CryptoDeposit](docs/CryptoDeposit.md)
133
+ - [Embedding](docs/Embedding.md)
134
+ - [EmbeddingsRequest](docs/EmbeddingsRequest.md)
135
+ - [EmbeddingsRequestInput](docs/EmbeddingsRequestInput.md)
136
+ - [EmbeddingsResponse](docs/EmbeddingsResponse.md)
137
+ - [EmbeddingsUsage](docs/EmbeddingsUsage.md)
132
138
  - [Environments](docs/Environments.md)
133
139
  - [FileObject](docs/FileObject.md)
134
140
  - [FineTuningJob](docs/FineTuningJob.md)
@@ -204,7 +210,7 @@ and is automatically generated by the
204
210
  [OpenAPI Generator](https://openapi-generator.tech) project:
205
211
 
206
212
  - API version: `1.0.0`
207
- - Package version: `0.3.12`
213
+ - Package version: `0.3.13`
208
214
  - Generator version: `7.24.0`
209
215
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
210
216
 
@@ -12,6 +12,8 @@
12
12
  import * as runtime from '../runtime';
13
13
  import { type ChatCompletionRequest } from '../models/ChatCompletionRequest';
14
14
  import { type ChatCompletionResponse } from '../models/ChatCompletionResponse';
15
+ import { type EmbeddingsRequest } from '../models/EmbeddingsRequest';
16
+ import { type EmbeddingsResponse } from '../models/EmbeddingsResponse';
15
17
  import { type ImagesGenerationsRequest } from '../models/ImagesGenerationsRequest';
16
18
  import { type ImagesResponse } from '../models/ImagesResponse';
17
19
  import { type Model } from '../models/Model';
@@ -25,6 +27,9 @@ export interface CancelVideoRequest {
25
27
  export interface CreateChatCompletionRequest {
26
28
  chatCompletionRequest: ChatCompletionRequest;
27
29
  }
30
+ export interface CreateEmbeddingsRequest {
31
+ embeddingsRequest: EmbeddingsRequest;
32
+ }
28
33
  export interface CreateImageRequest {
29
34
  imagesGenerationsRequest: ImagesGenerationsRequest;
30
35
  idempotencyKey?: string;
@@ -77,6 +82,20 @@ export declare class InferenceApi extends runtime.BaseAPI {
77
82
  * Create a chat completion (OpenAI-compatible)
78
83
  */
79
84
  createChatCompletion(requestParameters: CreateChatCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChatCompletionResponse>;
85
+ /**
86
+ * Creates request options for createEmbeddings without sending the request
87
+ */
88
+ createEmbeddingsRequestOpts(requestParameters: CreateEmbeddingsRequest): Promise<runtime.RequestOpts>;
89
+ /**
90
+ * Synchronous text embeddings. Accepts a single string or an array of up to 2048 strings, bounded so the response stays under 64 MiB (about 680 inputs at 4096 dimensions; fewer at a larger `dimensions` value) — over-limit requests are rejected with 400 before any processing. Returns one float vector per input, in request order. Billed on the upstream\'s reported prompt tokens at the model\'s listed input rate, rounded up to the next whole cent per request; an embeddings call emits no completion tokens, so `usage` carries `prompt_tokens` and `total_tokens` only. `encoding_format` accepts only `float` — a value of `base64` is rejected with `unsupported_parameter`. A chat model id on this route returns 404 `model_not_found`: the id is valid, but not on this surface.
91
+ * Create embeddings (OpenAI-compatible)
92
+ */
93
+ createEmbeddingsRaw(requestParameters: CreateEmbeddingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmbeddingsResponse>>;
94
+ /**
95
+ * Synchronous text embeddings. Accepts a single string or an array of up to 2048 strings, bounded so the response stays under 64 MiB (about 680 inputs at 4096 dimensions; fewer at a larger `dimensions` value) — over-limit requests are rejected with 400 before any processing. Returns one float vector per input, in request order. Billed on the upstream\'s reported prompt tokens at the model\'s listed input rate, rounded up to the next whole cent per request; an embeddings call emits no completion tokens, so `usage` carries `prompt_tokens` and `total_tokens` only. `encoding_format` accepts only `float` — a value of `base64` is rejected with `unsupported_parameter`. A chat model id on this route returns 404 `model_not_found`: the id is valid, but not on this surface.
96
+ * Create embeddings (OpenAI-compatible)
97
+ */
98
+ createEmbeddings(requestParameters: CreateEmbeddingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmbeddingsResponse>;
80
99
  /**
81
100
  * Creates request options for createImage without sending the request
82
101
  */
@@ -26,6 +26,8 @@ exports.ListModelsModalityEnum = exports.InferenceApi = void 0;
26
26
  const runtime = require("../runtime");
27
27
  const ChatCompletionRequest_1 = require("../models/ChatCompletionRequest");
28
28
  const ChatCompletionResponse_1 = require("../models/ChatCompletionResponse");
29
+ const EmbeddingsRequest_1 = require("../models/EmbeddingsRequest");
30
+ const EmbeddingsResponse_1 = require("../models/EmbeddingsResponse");
29
31
  const ImagesGenerationsRequest_1 = require("../models/ImagesGenerationsRequest");
30
32
  const ImagesResponse_1 = require("../models/ImagesResponse");
31
33
  const Model_1 = require("../models/Model");
@@ -130,6 +132,55 @@ class InferenceApi extends runtime.BaseAPI {
130
132
  return yield response.value();
131
133
  });
132
134
  }
135
+ /**
136
+ * Creates request options for createEmbeddings without sending the request
137
+ */
138
+ createEmbeddingsRequestOpts(requestParameters) {
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ if (requestParameters['embeddingsRequest'] == null) {
141
+ throw new runtime.RequiredError('embeddingsRequest', 'Required parameter "embeddingsRequest" was null or undefined when calling createEmbeddings().');
142
+ }
143
+ const queryParameters = {};
144
+ const headerParameters = {};
145
+ headerParameters['Content-Type'] = 'application/json';
146
+ if (this.configuration && this.configuration.accessToken) {
147
+ const token = this.configuration.accessToken;
148
+ const tokenString = yield token("bearerAuth", []);
149
+ if (tokenString) {
150
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
151
+ }
152
+ }
153
+ let urlPath = `/embeddings`;
154
+ return {
155
+ path: urlPath,
156
+ method: 'POST',
157
+ headers: headerParameters,
158
+ query: queryParameters,
159
+ body: (0, EmbeddingsRequest_1.EmbeddingsRequestToJSON)(requestParameters['embeddingsRequest']),
160
+ };
161
+ });
162
+ }
163
+ /**
164
+ * Synchronous text embeddings. Accepts a single string or an array of up to 2048 strings, bounded so the response stays under 64 MiB (about 680 inputs at 4096 dimensions; fewer at a larger `dimensions` value) — over-limit requests are rejected with 400 before any processing. Returns one float vector per input, in request order. Billed on the upstream\'s reported prompt tokens at the model\'s listed input rate, rounded up to the next whole cent per request; an embeddings call emits no completion tokens, so `usage` carries `prompt_tokens` and `total_tokens` only. `encoding_format` accepts only `float` — a value of `base64` is rejected with `unsupported_parameter`. A chat model id on this route returns 404 `model_not_found`: the id is valid, but not on this surface.
165
+ * Create embeddings (OpenAI-compatible)
166
+ */
167
+ createEmbeddingsRaw(requestParameters, initOverrides) {
168
+ return __awaiter(this, void 0, void 0, function* () {
169
+ const requestOptions = yield this.createEmbeddingsRequestOpts(requestParameters);
170
+ const response = yield this.request(requestOptions, initOverrides);
171
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, EmbeddingsResponse_1.EmbeddingsResponseFromJSON)(jsonValue));
172
+ });
173
+ }
174
+ /**
175
+ * Synchronous text embeddings. Accepts a single string or an array of up to 2048 strings, bounded so the response stays under 64 MiB (about 680 inputs at 4096 dimensions; fewer at a larger `dimensions` value) — over-limit requests are rejected with 400 before any processing. Returns one float vector per input, in request order. Billed on the upstream\'s reported prompt tokens at the model\'s listed input rate, rounded up to the next whole cent per request; an embeddings call emits no completion tokens, so `usage` carries `prompt_tokens` and `total_tokens` only. `encoding_format` accepts only `float` — a value of `base64` is rejected with `unsupported_parameter`. A chat model id on this route returns 404 `model_not_found`: the id is valid, but not on this surface.
176
+ * Create embeddings (OpenAI-compatible)
177
+ */
178
+ createEmbeddings(requestParameters, initOverrides) {
179
+ return __awaiter(this, void 0, void 0, function* () {
180
+ const response = yield this.createEmbeddingsRaw(requestParameters, initOverrides);
181
+ return yield response.value();
182
+ });
183
+ }
133
184
  /**
134
185
  * Creates request options for createImage without sending the request
135
186
  */
@@ -12,6 +12,8 @@
12
12
  import * as runtime from '../runtime';
13
13
  import { type ChatCompletionRequest } from '../models/ChatCompletionRequest';
14
14
  import { type ChatCompletionResponse } from '../models/ChatCompletionResponse';
15
+ import { type EmbeddingsRequest } from '../models/EmbeddingsRequest';
16
+ import { type EmbeddingsResponse } from '../models/EmbeddingsResponse';
15
17
  import { type ImagesGenerationsRequest } from '../models/ImagesGenerationsRequest';
16
18
  import { type ImagesResponse } from '../models/ImagesResponse';
17
19
  import { type Model } from '../models/Model';
@@ -25,6 +27,9 @@ export interface CancelVideoRequest {
25
27
  export interface CreateChatCompletionRequest {
26
28
  chatCompletionRequest: ChatCompletionRequest;
27
29
  }
30
+ export interface CreateEmbeddingsRequest {
31
+ embeddingsRequest: EmbeddingsRequest;
32
+ }
28
33
  export interface CreateImageRequest {
29
34
  imagesGenerationsRequest: ImagesGenerationsRequest;
30
35
  idempotencyKey?: string;
@@ -77,6 +82,20 @@ export declare class InferenceApi extends runtime.BaseAPI {
77
82
  * Create a chat completion (OpenAI-compatible)
78
83
  */
79
84
  createChatCompletion(requestParameters: CreateChatCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChatCompletionResponse>;
85
+ /**
86
+ * Creates request options for createEmbeddings without sending the request
87
+ */
88
+ createEmbeddingsRequestOpts(requestParameters: CreateEmbeddingsRequest): Promise<runtime.RequestOpts>;
89
+ /**
90
+ * Synchronous text embeddings. Accepts a single string or an array of up to 2048 strings, bounded so the response stays under 64 MiB (about 680 inputs at 4096 dimensions; fewer at a larger `dimensions` value) — over-limit requests are rejected with 400 before any processing. Returns one float vector per input, in request order. Billed on the upstream\'s reported prompt tokens at the model\'s listed input rate, rounded up to the next whole cent per request; an embeddings call emits no completion tokens, so `usage` carries `prompt_tokens` and `total_tokens` only. `encoding_format` accepts only `float` — a value of `base64` is rejected with `unsupported_parameter`. A chat model id on this route returns 404 `model_not_found`: the id is valid, but not on this surface.
91
+ * Create embeddings (OpenAI-compatible)
92
+ */
93
+ createEmbeddingsRaw(requestParameters: CreateEmbeddingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmbeddingsResponse>>;
94
+ /**
95
+ * Synchronous text embeddings. Accepts a single string or an array of up to 2048 strings, bounded so the response stays under 64 MiB (about 680 inputs at 4096 dimensions; fewer at a larger `dimensions` value) — over-limit requests are rejected with 400 before any processing. Returns one float vector per input, in request order. Billed on the upstream\'s reported prompt tokens at the model\'s listed input rate, rounded up to the next whole cent per request; an embeddings call emits no completion tokens, so `usage` carries `prompt_tokens` and `total_tokens` only. `encoding_format` accepts only `float` — a value of `base64` is rejected with `unsupported_parameter`. A chat model id on this route returns 404 `model_not_found`: the id is valid, but not on this surface.
96
+ * Create embeddings (OpenAI-compatible)
97
+ */
98
+ createEmbeddings(requestParameters: CreateEmbeddingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmbeddingsResponse>;
80
99
  /**
81
100
  * Creates request options for createImage without sending the request
82
101
  */
@@ -23,6 +23,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
23
23
  import * as runtime from '../runtime';
24
24
  import { ChatCompletionRequestToJSON, } from '../models/ChatCompletionRequest';
25
25
  import { ChatCompletionResponseFromJSON, } from '../models/ChatCompletionResponse';
26
+ import { EmbeddingsRequestToJSON, } from '../models/EmbeddingsRequest';
27
+ import { EmbeddingsResponseFromJSON, } from '../models/EmbeddingsResponse';
26
28
  import { ImagesGenerationsRequestToJSON, } from '../models/ImagesGenerationsRequest';
27
29
  import { ImagesResponseFromJSON, } from '../models/ImagesResponse';
28
30
  import { ModelFromJSON, } from '../models/Model';
@@ -127,6 +129,55 @@ export class InferenceApi extends runtime.BaseAPI {
127
129
  return yield response.value();
128
130
  });
129
131
  }
132
+ /**
133
+ * Creates request options for createEmbeddings without sending the request
134
+ */
135
+ createEmbeddingsRequestOpts(requestParameters) {
136
+ return __awaiter(this, void 0, void 0, function* () {
137
+ if (requestParameters['embeddingsRequest'] == null) {
138
+ throw new runtime.RequiredError('embeddingsRequest', 'Required parameter "embeddingsRequest" was null or undefined when calling createEmbeddings().');
139
+ }
140
+ const queryParameters = {};
141
+ const headerParameters = {};
142
+ headerParameters['Content-Type'] = 'application/json';
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 = `/embeddings`;
151
+ return {
152
+ path: urlPath,
153
+ method: 'POST',
154
+ headers: headerParameters,
155
+ query: queryParameters,
156
+ body: EmbeddingsRequestToJSON(requestParameters['embeddingsRequest']),
157
+ };
158
+ });
159
+ }
160
+ /**
161
+ * Synchronous text embeddings. Accepts a single string or an array of up to 2048 strings, bounded so the response stays under 64 MiB (about 680 inputs at 4096 dimensions; fewer at a larger `dimensions` value) — over-limit requests are rejected with 400 before any processing. Returns one float vector per input, in request order. Billed on the upstream\'s reported prompt tokens at the model\'s listed input rate, rounded up to the next whole cent per request; an embeddings call emits no completion tokens, so `usage` carries `prompt_tokens` and `total_tokens` only. `encoding_format` accepts only `float` — a value of `base64` is rejected with `unsupported_parameter`. A chat model id on this route returns 404 `model_not_found`: the id is valid, but not on this surface.
162
+ * Create embeddings (OpenAI-compatible)
163
+ */
164
+ createEmbeddingsRaw(requestParameters, initOverrides) {
165
+ return __awaiter(this, void 0, void 0, function* () {
166
+ const requestOptions = yield this.createEmbeddingsRequestOpts(requestParameters);
167
+ const response = yield this.request(requestOptions, initOverrides);
168
+ return new runtime.JSONApiResponse(response, (jsonValue) => EmbeddingsResponseFromJSON(jsonValue));
169
+ });
170
+ }
171
+ /**
172
+ * Synchronous text embeddings. Accepts a single string or an array of up to 2048 strings, bounded so the response stays under 64 MiB (about 680 inputs at 4096 dimensions; fewer at a larger `dimensions` value) — over-limit requests are rejected with 400 before any processing. Returns one float vector per input, in request order. Billed on the upstream\'s reported prompt tokens at the model\'s listed input rate, rounded up to the next whole cent per request; an embeddings call emits no completion tokens, so `usage` carries `prompt_tokens` and `total_tokens` only. `encoding_format` accepts only `float` — a value of `base64` is rejected with `unsupported_parameter`. A chat model id on this route returns 404 `model_not_found`: the id is valid, but not on this surface.
173
+ * Create embeddings (OpenAI-compatible)
174
+ */
175
+ createEmbeddings(requestParameters, initOverrides) {
176
+ return __awaiter(this, void 0, void 0, function* () {
177
+ const response = yield this.createEmbeddingsRaw(requestParameters, initOverrides);
178
+ return yield response.value();
179
+ });
180
+ }
130
181
  /**
131
182
  * Creates request options for createImage without sending the request
132
183
  */
@@ -0,0 +1,51 @@
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 Embedding
16
+ */
17
+ export interface Embedding {
18
+ /**
19
+ *
20
+ * @type {EmbeddingObjectEnum}
21
+ * @memberof Embedding
22
+ */
23
+ object: EmbeddingObjectEnum;
24
+ /**
25
+ * The embedding vector as 32-bit floats.
26
+ * @type {Array<number>}
27
+ * @memberof Embedding
28
+ */
29
+ embedding: Array<number>;
30
+ /**
31
+ * Position of this vector's input in the request.
32
+ * @type {number}
33
+ * @memberof Embedding
34
+ */
35
+ index: number;
36
+ }
37
+ /**
38
+ * @export
39
+ */
40
+ export declare const EmbeddingObjectEnum: {
41
+ readonly Embedding: "embedding";
42
+ };
43
+ export type EmbeddingObjectEnum = typeof EmbeddingObjectEnum[keyof typeof EmbeddingObjectEnum];
44
+ /**
45
+ * Check if a given object implements the Embedding interface.
46
+ */
47
+ export declare function instanceOfEmbedding(value: object): value is Embedding;
48
+ export declare function EmbeddingFromJSON(json: any): Embedding;
49
+ export declare function EmbeddingFromJSONTyped(json: any, ignoreDiscriminator: boolean): Embedding;
50
+ export declare function EmbeddingToJSON(json: any): Embedding;
51
+ export declare function EmbeddingToJSONTyped(value?: Embedding | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,59 @@
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
+ * @export
16
+ */
17
+ export const EmbeddingObjectEnum = {
18
+ Embedding: 'embedding'
19
+ };
20
+ /**
21
+ * Check if a given object implements the Embedding interface.
22
+ */
23
+ export function instanceOfEmbedding(value) {
24
+ if (!('object' in value) || value['object'] === undefined)
25
+ return false;
26
+ if (value['object'] !== 'embedding')
27
+ return false;
28
+ if (!('embedding' in value) || value['embedding'] === undefined)
29
+ return false;
30
+ if (!('index' in value) || value['index'] === undefined)
31
+ return false;
32
+ return true;
33
+ }
34
+ export function EmbeddingFromJSON(json) {
35
+ return EmbeddingFromJSONTyped(json, false);
36
+ }
37
+ export function EmbeddingFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'object': json['object'],
43
+ 'embedding': json['embedding'],
44
+ 'index': json['index'],
45
+ };
46
+ }
47
+ export function EmbeddingToJSON(json) {
48
+ return EmbeddingToJSONTyped(json, false);
49
+ }
50
+ export function EmbeddingToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'object': value['object'],
56
+ 'embedding': value['embedding'],
57
+ 'index': value['index'],
58
+ };
59
+ }
@@ -0,0 +1,64 @@
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 { EmbeddingsRequestInput } from './EmbeddingsRequestInput';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface EmbeddingsRequest
17
+ */
18
+ export interface EmbeddingsRequest {
19
+ /**
20
+ * Canonical embedding model id, e.g. "gpuai/qwen3-embedding-8b".
21
+ * @type {string}
22
+ * @memberof EmbeddingsRequest
23
+ */
24
+ model: string;
25
+ /**
26
+ *
27
+ * @type {EmbeddingsRequestInput}
28
+ * @memberof EmbeddingsRequest
29
+ */
30
+ input: EmbeddingsRequestInput;
31
+ /**
32
+ * Only "float" is supported. A value of "base64" is rejected with invalid_request_error / unsupported_parameter.
33
+ * @type {EmbeddingsRequestEncodingFormatEnum}
34
+ * @memberof EmbeddingsRequest
35
+ */
36
+ encodingFormat?: EmbeddingsRequestEncodingFormatEnum;
37
+ /**
38
+ * Requested output dimensionality, for models that support truncated (Matryoshka) embeddings. Passed through to the model when set.
39
+ * @type {number}
40
+ * @memberof EmbeddingsRequest
41
+ */
42
+ dimensions?: number;
43
+ /**
44
+ * Opaque end-user identifier for abuse tracing. Optional.
45
+ * @type {string}
46
+ * @memberof EmbeddingsRequest
47
+ */
48
+ user?: string;
49
+ }
50
+ /**
51
+ * @export
52
+ */
53
+ export declare const EmbeddingsRequestEncodingFormatEnum: {
54
+ readonly Float: "float";
55
+ };
56
+ export type EmbeddingsRequestEncodingFormatEnum = typeof EmbeddingsRequestEncodingFormatEnum[keyof typeof EmbeddingsRequestEncodingFormatEnum];
57
+ /**
58
+ * Check if a given object implements the EmbeddingsRequest interface.
59
+ */
60
+ export declare function instanceOfEmbeddingsRequest(value: object): value is EmbeddingsRequest;
61
+ export declare function EmbeddingsRequestFromJSON(json: any): EmbeddingsRequest;
62
+ export declare function EmbeddingsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmbeddingsRequest;
63
+ export declare function EmbeddingsRequestToJSON(json: any): EmbeddingsRequest;
64
+ export declare function EmbeddingsRequestToJSONTyped(value?: EmbeddingsRequest | 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 { 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;