@layer-ai/sdk 2.5.0 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +176 -2
- package/dist/types/api-v3.d.ts +279 -0
- package/dist/types/api-v3.d.ts.map +1 -0
- package/dist/types/api-v3.js +2 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/model-registry.d.ts +4 -4
- package/dist/types/model-registry.js +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,9 +58,183 @@ const layer = new Layer({
|
|
|
58
58
|
|
|
59
59
|
## API Reference
|
|
60
60
|
|
|
61
|
-
###
|
|
61
|
+
### Type-Safe Methods (v2.5.0+)
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
Layer SDK now provides dedicated type-safe methods for each modality with full TypeScript support and IDE autocomplete.
|
|
64
|
+
|
|
65
|
+
#### `layer.chat(request)`
|
|
66
|
+
|
|
67
|
+
Type-safe chat completions with message-based interface.
|
|
68
|
+
|
|
69
|
+
**Parameters:**
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
{
|
|
73
|
+
gateId: string; // Required: Gate ID (UUID)
|
|
74
|
+
data: {
|
|
75
|
+
messages: Message[]; // Required: Conversation messages
|
|
76
|
+
temperature?: number; // Optional: Override gate temperature
|
|
77
|
+
maxTokens?: number; // Optional: Override max tokens
|
|
78
|
+
topP?: number; // Optional: Override top-p sampling
|
|
79
|
+
};
|
|
80
|
+
model?: string; // Optional: Override gate model
|
|
81
|
+
metadata?: Record<string, unknown>; // Optional: Custom metadata
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Example:**
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
const response = await layer.chat({
|
|
89
|
+
gateId: 'my-chat-gate-id',
|
|
90
|
+
data: {
|
|
91
|
+
messages: [
|
|
92
|
+
{ role: 'system', content: 'You are a helpful assistant' },
|
|
93
|
+
{ role: 'user', content: 'Explain quantum computing' }
|
|
94
|
+
],
|
|
95
|
+
temperature: 0.7
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
#### `layer.image(request)`
|
|
101
|
+
|
|
102
|
+
Type-safe image generation.
|
|
103
|
+
|
|
104
|
+
**Parameters:**
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
{
|
|
108
|
+
gateId: string; // Required: Gate ID (UUID)
|
|
109
|
+
data: {
|
|
110
|
+
prompt: string; // Required: Image generation prompt
|
|
111
|
+
size?: string; // Optional: Image size (e.g., '1024x1024')
|
|
112
|
+
quality?: string; // Optional: Image quality
|
|
113
|
+
style?: string; // Optional: Image style
|
|
114
|
+
};
|
|
115
|
+
model?: string;
|
|
116
|
+
metadata?: Record<string, unknown>;
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Example:**
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
const response = await layer.image({
|
|
124
|
+
gateId: 'my-image-gate-id',
|
|
125
|
+
data: {
|
|
126
|
+
prompt: 'A serene landscape with mountains and a lake',
|
|
127
|
+
size: '1024x1024',
|
|
128
|
+
quality: 'hd'
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
console.log(response.imageUrl); // Generated image URL
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
#### `layer.video(request)`
|
|
136
|
+
|
|
137
|
+
Type-safe video generation.
|
|
138
|
+
|
|
139
|
+
**Parameters:**
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
{
|
|
143
|
+
gateId: string; // Required: Gate ID (UUID)
|
|
144
|
+
data: {
|
|
145
|
+
prompt: string; // Required: Video generation prompt
|
|
146
|
+
};
|
|
147
|
+
model?: string;
|
|
148
|
+
metadata?: Record<string, unknown>;
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
#### `layer.embeddings(request)`
|
|
153
|
+
|
|
154
|
+
Type-safe text embeddings.
|
|
155
|
+
|
|
156
|
+
**Parameters:**
|
|
157
|
+
|
|
158
|
+
```typescript
|
|
159
|
+
{
|
|
160
|
+
gateId: string; // Required: Gate ID (UUID)
|
|
161
|
+
data: {
|
|
162
|
+
input: string | string[]; // Required: Text(s) to embed
|
|
163
|
+
};
|
|
164
|
+
model?: string;
|
|
165
|
+
metadata?: Record<string, unknown>;
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Example:**
|
|
170
|
+
|
|
171
|
+
```typescript
|
|
172
|
+
const response = await layer.embeddings({
|
|
173
|
+
gateId: 'my-embeddings-gate-id',
|
|
174
|
+
data: {
|
|
175
|
+
input: 'Machine learning is fascinating'
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
console.log(response.embeddings[0].length); // Vector dimensions (e.g., 1536)
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
#### `layer.tts(request)`
|
|
183
|
+
|
|
184
|
+
Type-safe text-to-speech.
|
|
185
|
+
|
|
186
|
+
**Parameters:**
|
|
187
|
+
|
|
188
|
+
```typescript
|
|
189
|
+
{
|
|
190
|
+
gateId: string; // Required: Gate ID (UUID)
|
|
191
|
+
data: {
|
|
192
|
+
input: string; // Required: Text to synthesize
|
|
193
|
+
voice?: string; // Optional: Voice selection
|
|
194
|
+
};
|
|
195
|
+
model?: string;
|
|
196
|
+
metadata?: Record<string, unknown>;
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Example:**
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
203
|
+
const response = await layer.tts({
|
|
204
|
+
gateId: 'my-tts-gate-id',
|
|
205
|
+
data: {
|
|
206
|
+
input: 'Hello, this is a test of text to speech',
|
|
207
|
+
voice: 'alloy'
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
console.log(response.audio.base64); // Base64 encoded audio
|
|
212
|
+
console.log(response.audio.format); // Audio format (e.g., 'mp3')
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
#### `layer.ocr(request)`
|
|
216
|
+
|
|
217
|
+
Type-safe optical character recognition and document processing.
|
|
218
|
+
|
|
219
|
+
**Parameters:**
|
|
220
|
+
|
|
221
|
+
```typescript
|
|
222
|
+
{
|
|
223
|
+
gateId: string; // Required: Gate ID (UUID)
|
|
224
|
+
data: {
|
|
225
|
+
documentUrl?: string; // Document URL
|
|
226
|
+
imageUrl?: string; // Image URL
|
|
227
|
+
base64?: string; // Base64 encoded document/image
|
|
228
|
+
// Note: Provide one of the above
|
|
229
|
+
};
|
|
230
|
+
model?: string;
|
|
231
|
+
metadata?: Record<string, unknown>;
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### `layer.complete(request)` (v2 Legacy)
|
|
236
|
+
|
|
237
|
+
Send a generic completion request through a gate. This method remains available for backwards compatibility.
|
|
64
238
|
|
|
65
239
|
**Parameters:**
|
|
66
240
|
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
export interface ErrorResponse {
|
|
2
|
+
error: string;
|
|
3
|
+
message: string;
|
|
4
|
+
details?: any;
|
|
5
|
+
}
|
|
6
|
+
export type Role = 'system' | 'user' | 'assistant' | 'tool' | 'function' | 'model' | 'developer';
|
|
7
|
+
export type ImageDetail = 'auto' | 'low' | 'high';
|
|
8
|
+
export type ImageSize = '256x256' | '512x512' | '1024x1024' | '1792x1024' | '1024x1792' | '1536x1024' | '1024x1536';
|
|
9
|
+
export type ImageQuality = 'standard' | 'hd';
|
|
10
|
+
export type ImageStyle = 'vivid' | 'natural';
|
|
11
|
+
export type AudioFormat = 'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm';
|
|
12
|
+
export type VideoSize = '720x1280' | '1280x720' | '1024x1792' | '1792x1024';
|
|
13
|
+
export type AudioMimeType = 'audio/mpeg' | 'audio/mp4' | 'audio/wav' | 'audio/webm' | 'audio/ogg' | 'audio/flac';
|
|
14
|
+
export type ImageMimeType = 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp';
|
|
15
|
+
export type ToolChoice = 'auto' | 'required' | 'none' | {
|
|
16
|
+
type: 'function';
|
|
17
|
+
function: {
|
|
18
|
+
name: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export type FinishReason = 'completed' | 'length_limit' | 'tool_call' | 'filtered' | 'error';
|
|
22
|
+
export type ResponseFormatType = 'text' | 'json_object' | 'json_schema';
|
|
23
|
+
export type EncodingFormat = 'float' | 'base64';
|
|
24
|
+
export declare const ADAPTER_HANDLED = "__ADAPTER_HANDLED__";
|
|
25
|
+
type BaseRequest = {
|
|
26
|
+
/**
|
|
27
|
+
* Gate identifier. Use gate ID.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* gate: "123e4567-e89b-12d3-a456-426614174000"
|
|
31
|
+
*/
|
|
32
|
+
gateId: string;
|
|
33
|
+
gateName?: string;
|
|
34
|
+
model?: string;
|
|
35
|
+
metadata?: Record<string, unknown>;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Task type determines how request data is interpreted.
|
|
39
|
+
* When omitted, defaults to the gate's configured taskType.
|
|
40
|
+
*/
|
|
41
|
+
export type TaskType = 'chat' | 'image' | 'video' | 'embeddings' | 'tts' | 'ocr';
|
|
42
|
+
/**
|
|
43
|
+
* Internal LayerRequest type with required type field (used by API after type resolution)
|
|
44
|
+
*/
|
|
45
|
+
export type LayerRequest = (BaseRequest & {
|
|
46
|
+
type: 'chat';
|
|
47
|
+
data: ChatRequest;
|
|
48
|
+
}) | (BaseRequest & {
|
|
49
|
+
type: 'image';
|
|
50
|
+
data: ImageGenerationRequest;
|
|
51
|
+
}) | (BaseRequest & {
|
|
52
|
+
type: 'video';
|
|
53
|
+
data: VideoGenerationRequest;
|
|
54
|
+
}) | (BaseRequest & {
|
|
55
|
+
type: 'embeddings';
|
|
56
|
+
data: EmbeddingsRequest;
|
|
57
|
+
}) | (BaseRequest & {
|
|
58
|
+
type: 'tts';
|
|
59
|
+
data: TextToSpeechRequest;
|
|
60
|
+
}) | (BaseRequest & {
|
|
61
|
+
type: 'ocr';
|
|
62
|
+
data: OCRRequest;
|
|
63
|
+
});
|
|
64
|
+
/**
|
|
65
|
+
* User-facing LayerRequest type with optional type field.
|
|
66
|
+
* Type defaults to gate's taskType when omitted, but can be overridden.
|
|
67
|
+
*/
|
|
68
|
+
export type LayerRequestInput = (BaseRequest & {
|
|
69
|
+
type?: 'chat';
|
|
70
|
+
data: ChatRequest;
|
|
71
|
+
}) | (BaseRequest & {
|
|
72
|
+
type?: 'image';
|
|
73
|
+
data: ImageGenerationRequest;
|
|
74
|
+
}) | (BaseRequest & {
|
|
75
|
+
type?: 'video';
|
|
76
|
+
data: VideoGenerationRequest;
|
|
77
|
+
}) | (BaseRequest & {
|
|
78
|
+
type?: 'embeddings';
|
|
79
|
+
data: EmbeddingsRequest;
|
|
80
|
+
}) | (BaseRequest & {
|
|
81
|
+
type?: 'tts';
|
|
82
|
+
data: TextToSpeechRequest;
|
|
83
|
+
}) | (BaseRequest & {
|
|
84
|
+
type?: 'ocr';
|
|
85
|
+
data: OCRRequest;
|
|
86
|
+
});
|
|
87
|
+
export interface ChatRequest {
|
|
88
|
+
messages: MultimodalMessage[];
|
|
89
|
+
systemPrompt?: string;
|
|
90
|
+
tools?: Tool[];
|
|
91
|
+
toolChoice?: ToolChoice;
|
|
92
|
+
temperature?: number;
|
|
93
|
+
maxTokens?: number;
|
|
94
|
+
topP?: number;
|
|
95
|
+
stream?: boolean;
|
|
96
|
+
stopSequences?: string[];
|
|
97
|
+
frequencyPenalty?: number;
|
|
98
|
+
presencePenalty?: number;
|
|
99
|
+
responseFormat?: ResponseFormatType | {
|
|
100
|
+
type: ResponseFormatType;
|
|
101
|
+
json_schema?: unknown;
|
|
102
|
+
};
|
|
103
|
+
seed?: number;
|
|
104
|
+
}
|
|
105
|
+
export interface MultimodalMessage {
|
|
106
|
+
role: Role;
|
|
107
|
+
content?: string;
|
|
108
|
+
images?: ImageInput[];
|
|
109
|
+
audio?: AudioInput;
|
|
110
|
+
toolCallId?: string;
|
|
111
|
+
toolCalls?: ToolCall[];
|
|
112
|
+
name?: string;
|
|
113
|
+
}
|
|
114
|
+
export interface ImageInput {
|
|
115
|
+
url?: string;
|
|
116
|
+
base64?: string;
|
|
117
|
+
mimeType?: ImageMimeType;
|
|
118
|
+
detail?: ImageDetail;
|
|
119
|
+
}
|
|
120
|
+
export interface AudioInput {
|
|
121
|
+
url?: string;
|
|
122
|
+
base64?: string;
|
|
123
|
+
mimeType?: AudioMimeType;
|
|
124
|
+
format?: AudioFormat;
|
|
125
|
+
}
|
|
126
|
+
export interface Tool {
|
|
127
|
+
type: 'function';
|
|
128
|
+
function: {
|
|
129
|
+
name: string;
|
|
130
|
+
description?: string;
|
|
131
|
+
parameters?: {
|
|
132
|
+
type: 'object' | 'string' | 'number' | 'boolean' | 'array';
|
|
133
|
+
properties?: Record<string, unknown>;
|
|
134
|
+
required?: string[];
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
export interface ToolCall {
|
|
139
|
+
id: string;
|
|
140
|
+
type: 'function';
|
|
141
|
+
function: {
|
|
142
|
+
name: string;
|
|
143
|
+
arguments: string;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
export interface ImageGenerationRequest {
|
|
147
|
+
prompt: string;
|
|
148
|
+
size?: ImageSize;
|
|
149
|
+
quality?: ImageQuality;
|
|
150
|
+
count?: number;
|
|
151
|
+
style?: ImageStyle;
|
|
152
|
+
seed?: number;
|
|
153
|
+
}
|
|
154
|
+
export type VideoReferenceType = 'subject' | 'style' | 'asset';
|
|
155
|
+
export interface VideoReferenceImage {
|
|
156
|
+
url?: string;
|
|
157
|
+
base64?: string;
|
|
158
|
+
referenceType?: VideoReferenceType;
|
|
159
|
+
}
|
|
160
|
+
export interface VideoImageInput {
|
|
161
|
+
url?: string;
|
|
162
|
+
base64?: string;
|
|
163
|
+
}
|
|
164
|
+
export interface VideoGenerationRequest {
|
|
165
|
+
prompt: string;
|
|
166
|
+
duration?: number | string;
|
|
167
|
+
size?: VideoSize;
|
|
168
|
+
fps?: number;
|
|
169
|
+
seed?: number;
|
|
170
|
+
negativePrompt?: string;
|
|
171
|
+
numberOfVideos?: number;
|
|
172
|
+
personGeneration?: string;
|
|
173
|
+
image?: VideoImageInput;
|
|
174
|
+
lastFrame?: VideoImageInput;
|
|
175
|
+
referenceImages?: VideoReferenceImage[];
|
|
176
|
+
}
|
|
177
|
+
export interface EmbeddingsRequest {
|
|
178
|
+
input: string | string[];
|
|
179
|
+
dimensions?: number;
|
|
180
|
+
encodingFormat?: EncodingFormat;
|
|
181
|
+
}
|
|
182
|
+
export interface TextToSpeechRequest {
|
|
183
|
+
input: string;
|
|
184
|
+
voice?: string;
|
|
185
|
+
speed?: number;
|
|
186
|
+
responseFormat?: AudioFormat;
|
|
187
|
+
}
|
|
188
|
+
export type OCRDocumentType = 'document_url' | 'image_url' | 'base64';
|
|
189
|
+
export type OCRTableFormat = 'markdown' | 'html';
|
|
190
|
+
export interface OCRRequest {
|
|
191
|
+
documentUrl?: string;
|
|
192
|
+
imageUrl?: string;
|
|
193
|
+
base64?: string;
|
|
194
|
+
mimeType?: string;
|
|
195
|
+
tableFormat?: OCRTableFormat;
|
|
196
|
+
includeImageBase64?: boolean;
|
|
197
|
+
extractHeader?: boolean;
|
|
198
|
+
extractFooter?: boolean;
|
|
199
|
+
}
|
|
200
|
+
export interface OCRPage {
|
|
201
|
+
index: number;
|
|
202
|
+
markdown: string;
|
|
203
|
+
images?: Array<{
|
|
204
|
+
id: string;
|
|
205
|
+
base64?: string;
|
|
206
|
+
topLeftX?: number;
|
|
207
|
+
topLeftY?: number;
|
|
208
|
+
bottomRightX?: number;
|
|
209
|
+
bottomRightY?: number;
|
|
210
|
+
}>;
|
|
211
|
+
tables?: Array<{
|
|
212
|
+
id: string;
|
|
213
|
+
html?: string;
|
|
214
|
+
}>;
|
|
215
|
+
hyperlinks?: Array<{
|
|
216
|
+
text: string;
|
|
217
|
+
url: string;
|
|
218
|
+
}>;
|
|
219
|
+
header?: string | null;
|
|
220
|
+
footer?: string | null;
|
|
221
|
+
dimensions?: {
|
|
222
|
+
width: number;
|
|
223
|
+
height: number;
|
|
224
|
+
dpi?: number;
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
export interface OCROutput {
|
|
228
|
+
pages: OCRPage[];
|
|
229
|
+
model: string;
|
|
230
|
+
documentAnnotation?: Record<string, unknown> | null;
|
|
231
|
+
usageInfo?: {
|
|
232
|
+
pagesProcessed?: number;
|
|
233
|
+
docSizeBytes?: number;
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
export interface LayerResponse {
|
|
237
|
+
id?: string;
|
|
238
|
+
created?: number;
|
|
239
|
+
content?: string;
|
|
240
|
+
images?: ImageOutput[];
|
|
241
|
+
videos?: VideoOutput[];
|
|
242
|
+
audio?: AudioOutput;
|
|
243
|
+
embeddings?: number[][];
|
|
244
|
+
ocr?: OCROutput;
|
|
245
|
+
toolCalls?: ToolCall[];
|
|
246
|
+
model?: string;
|
|
247
|
+
finishReason?: FinishReason;
|
|
248
|
+
rawFinishReason?: string;
|
|
249
|
+
usage?: {
|
|
250
|
+
promptTokens?: number;
|
|
251
|
+
completionTokens?: number;
|
|
252
|
+
totalTokens?: number;
|
|
253
|
+
};
|
|
254
|
+
stream?: boolean;
|
|
255
|
+
cost?: number;
|
|
256
|
+
latencyMs?: number;
|
|
257
|
+
usedPlatformKey?: boolean;
|
|
258
|
+
raw?: unknown;
|
|
259
|
+
}
|
|
260
|
+
export interface ImageOutput {
|
|
261
|
+
url?: string;
|
|
262
|
+
base64?: string;
|
|
263
|
+
revisedPrompt?: string;
|
|
264
|
+
}
|
|
265
|
+
export interface VideoOutput {
|
|
266
|
+
url?: string;
|
|
267
|
+
base64?: string;
|
|
268
|
+
duration?: number;
|
|
269
|
+
revisedPrompt?: string;
|
|
270
|
+
}
|
|
271
|
+
export interface AudioOutput {
|
|
272
|
+
url?: string;
|
|
273
|
+
base64?: string;
|
|
274
|
+
format?: AudioFormat;
|
|
275
|
+
text?: string;
|
|
276
|
+
duration?: number;
|
|
277
|
+
}
|
|
278
|
+
export {};
|
|
279
|
+
//# sourceMappingURL=api-v3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-v3.d.ts","sourceRoot":"","sources":["../../src/types/api-v3.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,GAAG,CAAC;CACf;AAED,MAAM,MAAM,IAAI,GACZ,QAAQ,GACR,MAAM,GACN,WAAW,GACX,MAAM,GACN,UAAU,GACV,OAAO,GACP,WAAW,CAAC;AAEhB,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,KAAK,GACL,MAAM,CAAC;AAEX,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,SAAS,GACT,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,CAAC;AAEhB,MAAM,MAAM,YAAY,GACpB,UAAU,GACV,IAAI,CAAC;AAET,MAAM,MAAM,UAAU,GAClB,OAAO,GACP,SAAS,CAAC;AAEd,MAAM,MAAM,WAAW,GACnB,KAAK,GACL,MAAM,GACN,KAAK,GACL,MAAM,GACN,KAAK,GACL,KAAK,CAAC;AAEV,MAAM,MAAM,SAAS,GACjB,UAAU,GACV,UAAU,GACV,WAAW,GACX,WAAW,CAAC;AAEhB,MAAM,MAAM,aAAa,GACrB,YAAY,GACZ,WAAW,GACX,WAAW,GACX,YAAY,GACZ,WAAW,GACX,YAAY,CAAC;AAEjB,MAAM,MAAM,aAAa,GACrB,YAAY,GACZ,WAAW,GACX,WAAW,GACX,YAAY,CAAC;AAEjB,MAAM,MAAM,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,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export * from './client.js';
|
|
|
2
2
|
export * from './models.js';
|
|
3
3
|
export * from './model-registry.js';
|
|
4
4
|
export * from './gates.js';
|
|
5
|
-
export * from './api-
|
|
5
|
+
export * from './api-v3.js';
|
|
6
6
|
export * from './keys.js';
|
|
7
7
|
export * from './logs.js';
|
|
8
8
|
export * from './smart-routing.js';
|
package/dist/types/index.js
CHANGED
|
@@ -3,7 +3,7 @@ export * from './client.js';
|
|
|
3
3
|
export * from './models.js';
|
|
4
4
|
export * from './model-registry.js';
|
|
5
5
|
export * from './gates.js';
|
|
6
|
-
export * from './api-
|
|
6
|
+
export * from './api-v3.js';
|
|
7
7
|
export * from './keys.js';
|
|
8
8
|
export * from './logs.js';
|
|
9
9
|
export * from './smart-routing.js';
|
|
@@ -716,7 +716,7 @@ export declare const MODEL_REGISTRY: {
|
|
|
716
716
|
readonly lastUpdated: "2026-01-25";
|
|
717
717
|
};
|
|
718
718
|
readonly 'imagen-4.0-fast-generate-001': {
|
|
719
|
-
readonly type: "image
|
|
719
|
+
readonly type: "image";
|
|
720
720
|
readonly provider: "google";
|
|
721
721
|
readonly displayName: "Imagen 4.0 Fast";
|
|
722
722
|
readonly imagePricing: 0.02;
|
|
@@ -739,7 +739,7 @@ export declare const MODEL_REGISTRY: {
|
|
|
739
739
|
readonly lastUpdated: "2026-01-25";
|
|
740
740
|
};
|
|
741
741
|
readonly 'imagen-4.0-ultra-generate-001': {
|
|
742
|
-
readonly type: "image
|
|
742
|
+
readonly type: "image";
|
|
743
743
|
readonly provider: "google";
|
|
744
744
|
readonly displayName: "Imagen 4.0 Ultra";
|
|
745
745
|
readonly imagePricing: 0.06;
|
|
@@ -787,7 +787,7 @@ export declare const MODEL_REGISTRY: {
|
|
|
787
787
|
readonly lastUpdated: "2026-01-25";
|
|
788
788
|
};
|
|
789
789
|
readonly 'veo-3.1-fast-generate-preview': {
|
|
790
|
-
readonly type: "video
|
|
790
|
+
readonly type: "video";
|
|
791
791
|
readonly provider: "google";
|
|
792
792
|
readonly displayName: "Veo 3.1 Fast";
|
|
793
793
|
readonly context: {
|
|
@@ -809,7 +809,7 @@ export declare const MODEL_REGISTRY: {
|
|
|
809
809
|
readonly lastUpdated: "2026-01-25";
|
|
810
810
|
};
|
|
811
811
|
readonly 'veo-3.1-generate-preview': {
|
|
812
|
-
readonly type: "video
|
|
812
|
+
readonly type: "video";
|
|
813
813
|
readonly provider: "google";
|
|
814
814
|
readonly displayName: "Veo 3.1";
|
|
815
815
|
readonly context: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
|
|
2
|
-
// Generated at: 2026-01-
|
|
2
|
+
// Generated at: 2026-01-29T05:32:54.519Z
|
|
3
3
|
// Source: Internal Model Registry API
|
|
4
4
|
// To update: Run `pnpm sync:registry`
|
|
5
5
|
//
|
|
6
|
-
// Registry version: 2026-01-
|
|
7
|
-
// Last sync: 2026-01-
|
|
6
|
+
// Registry version: 2026-01-29
|
|
7
|
+
// Last sync: 2026-01-29T05:32:54.514Z
|
|
8
8
|
// Total models: 77
|
|
9
9
|
// Providers we support with adapters
|
|
10
10
|
export const SUPPORTED_PROVIDERS = ['openai', 'anthropic', 'google', 'mistral'];
|
|
@@ -597,7 +597,7 @@ export const MODEL_REGISTRY = {
|
|
|
597
597
|
lastUpdated: '2026-01-25',
|
|
598
598
|
},
|
|
599
599
|
'imagen-4.0-fast-generate-001': {
|
|
600
|
-
type: 'image
|
|
600
|
+
type: 'image',
|
|
601
601
|
provider: 'google',
|
|
602
602
|
displayName: 'Imagen 4.0 Fast',
|
|
603
603
|
imagePricing: 0.02,
|
|
@@ -620,7 +620,7 @@ export const MODEL_REGISTRY = {
|
|
|
620
620
|
lastUpdated: '2026-01-25',
|
|
621
621
|
},
|
|
622
622
|
'imagen-4.0-ultra-generate-001': {
|
|
623
|
-
type: 'image
|
|
623
|
+
type: 'image',
|
|
624
624
|
provider: 'google',
|
|
625
625
|
displayName: 'Imagen 4.0 Ultra',
|
|
626
626
|
imagePricing: 0.06,
|
|
@@ -666,7 +666,7 @@ export const MODEL_REGISTRY = {
|
|
|
666
666
|
lastUpdated: '2026-01-25',
|
|
667
667
|
},
|
|
668
668
|
'veo-3.1-fast-generate-preview': {
|
|
669
|
-
type: 'video
|
|
669
|
+
type: 'video',
|
|
670
670
|
provider: 'google',
|
|
671
671
|
displayName: 'Veo 3.1 Fast',
|
|
672
672
|
context: {
|
|
@@ -688,7 +688,7 @@ export const MODEL_REGISTRY = {
|
|
|
688
688
|
lastUpdated: '2026-01-25',
|
|
689
689
|
},
|
|
690
690
|
'veo-3.1-generate-preview': {
|
|
691
|
-
type: 'video
|
|
691
|
+
type: 'video',
|
|
692
692
|
provider: 'google',
|
|
693
693
|
displayName: 'Veo 3.1',
|
|
694
694
|
context: {
|