@zelailabs/sdk 0.0.0-stage → 0.1.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.
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZelAIError = void 0;
4
+ class ZelAIError extends Error {
5
+ status;
6
+ code;
7
+ type;
8
+ apiKeyUrl;
9
+ retryAfter;
10
+ details;
11
+ headers;
12
+ body;
13
+ constructor(message, init = {}) {
14
+ super(message, init.cause ? { cause: init.cause } : undefined);
15
+ this.name = 'ZelAIError';
16
+ this.status = init.status;
17
+ this.code = init.code;
18
+ this.type = init.type;
19
+ this.apiKeyUrl = init.apiKeyUrl;
20
+ this.retryAfter = init.retryAfter;
21
+ this.details = init.details;
22
+ this.headers = init.headers;
23
+ this.body = init.body;
24
+ }
25
+ static fromResponse(status, body, headers) {
26
+ const err = body?.error;
27
+ const retryAfterHeader = headers.get('retry-after');
28
+ const retryAfter = err?.retry_after ?? (retryAfterHeader ? Number(retryAfterHeader) : undefined);
29
+ const message = err?.message || `ZelAI API request failed with status ${status}`;
30
+ return new ZelAIError(message, {
31
+ status,
32
+ code: err?.code,
33
+ type: err?.type,
34
+ apiKeyUrl: err?.api_key_url,
35
+ retryAfter: Number.isFinite(retryAfter) ? retryAfter : undefined,
36
+ details: err?.details,
37
+ headers,
38
+ body,
39
+ });
40
+ }
41
+ }
42
+ exports.ZelAIError = ZelAIError;
43
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;;AAEA,MAAa,UAAW,SAAQ,KAAK;IAC1B,MAAM,CAAU;IAChB,IAAI,CAAU;IACd,IAAI,CAAU;IACd,SAAS,CAAU;IACnB,UAAU,CAAU;IACpB,OAAO,CAA2B;IAClC,OAAO,CAAW;IAClB,IAAI,CAAW;IAExB,YAAY,OAAe,EAAE,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AAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;YAChE,OAAO,EAAE,GAAG,EAAE,OAAO;YACrB,OAAO;YACP,IAAI;SACL,CAAC,CAAC;IACL,CAAC;CACF;AAjDD,gCAiDC"}
@@ -0,0 +1,6 @@
1
+ export { ZelAI } from './client.js';
2
+ export { ZelAIError } from './errors.js';
3
+ export { parseSSE } from './stream.js';
4
+ export type { AudioSpeechParams, AudioTranscriptionParams, AudioTranslationParams, ChatCompletion, ChatCompletionChunk, ChatCompletionChoice, ChatCompletionCreateParams, ChatMessage, ChatRole, ImageEditParams, ImageGenerationParams, JsonObject, JsonValue, Model, ModelList, ModelPricing, RequestOptions, SystemOneCreateParams, SystemOneQuestion, VideoGenerationParams, ZelAIClientOptions, ZelAIErrorBody, } from './types.js';
5
+ import { ZelAI } from './client.js';
6
+ export default ZelAI;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseSSE = exports.ZelAIError = exports.ZelAI = void 0;
4
+ var client_js_1 = require("./client.js");
5
+ Object.defineProperty(exports, "ZelAI", { enumerable: true, get: function () { return client_js_1.ZelAI; } });
6
+ var errors_js_1 = require("./errors.js");
7
+ Object.defineProperty(exports, "ZelAIError", { enumerable: true, get: function () { return errors_js_1.ZelAIError; } });
8
+ var stream_js_1 = require("./stream.js");
9
+ Object.defineProperty(exports, "parseSSE", { enumerable: true, get: function () { return stream_js_1.parseSSE; } });
10
+ const client_js_2 = require("./client.js");
11
+ exports.default = client_js_2.ZelAI;
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AAA3B,kGAAA,KAAK,OAAA;AACd,yCAAyC;AAAhC,uGAAA,UAAU,OAAA;AACnB,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AA0BjB,2CAAoC;AACpC,kBAAe,iBAAK,CAAC"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { ChatCompletionChunk } from './types.js';
2
+ export declare function parseSSE<T = ChatCompletionChunk>(response: Response): AsyncGenerator<T>;
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseSSE = parseSSE;
4
+ const errors_js_1 = require("./errors.js");
5
+ async function* parseSSE(response) {
6
+ if (!response.body)
7
+ return;
8
+ const reader = response.body.getReader();
9
+ const decoder = new TextDecoder();
10
+ let buffer = '';
11
+ try {
12
+ while (true) {
13
+ const { value, done } = await reader.read();
14
+ if (done)
15
+ break;
16
+ buffer += decoder.decode(value, { stream: true }).replace(/\r\n/g, '\n');
17
+ let sep = buffer.indexOf('\n\n');
18
+ while (sep !== -1) {
19
+ const block = buffer.slice(0, sep);
20
+ buffer = buffer.slice(sep + 2);
21
+ const event = parseSSEBlock(block);
22
+ if (event === null) {
23
+ sep = buffer.indexOf('\n\n');
24
+ continue;
25
+ }
26
+ if (event === '[DONE]')
27
+ return;
28
+ yield parseSSEData(event);
29
+ sep = buffer.indexOf('\n\n');
30
+ }
31
+ }
32
+ buffer += decoder.decode();
33
+ const tail = parseSSEBlock(buffer.trim());
34
+ if (tail && tail !== '[DONE]')
35
+ yield parseSSEData(tail);
36
+ }
37
+ catch (err) {
38
+ if (err instanceof errors_js_1.ZelAIError)
39
+ throw err;
40
+ throw new errors_js_1.ZelAIError(err instanceof Error ? err.message : 'Failed to read SSE stream', { cause: err });
41
+ }
42
+ finally {
43
+ reader.releaseLock();
44
+ }
45
+ }
46
+ function parseSSEBlock(block) {
47
+ if (!block)
48
+ return null;
49
+ const lines = block.split('\n');
50
+ const data = [];
51
+ for (const line of lines) {
52
+ if (!line || line.startsWith(':'))
53
+ continue;
54
+ if (line.startsWith('data:'))
55
+ data.push(line.slice(5).trimStart());
56
+ }
57
+ if (data.length === 0)
58
+ return null;
59
+ return data.join('\n');
60
+ }
61
+ function parseSSEData(event) {
62
+ try {
63
+ return JSON.parse(event);
64
+ }
65
+ catch (err) {
66
+ throw new errors_js_1.ZelAIError('Failed to parse SSE event', { cause: err, body: event });
67
+ }
68
+ }
69
+ //# sourceMappingURL=stream.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream.js","sourceRoot":"","sources":["../../src/stream.ts"],"names":[],"mappings":";;AAGA,4BAoCC;AAvCD,2CAAyC;AAGlC,KAAK,SAAS,CAAC,CAAC,QAAQ,CAA0B,QAAkB;IACzE,IAAI,CAAC,QAAQ,CAAC,IAAI;QAAE,OAAO;IAC3B,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;IACzC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAClC,IAAI,MAAM,GAAG,EAAE,CAAC;IAEhB,IAAI,CAAC;QACH,OAAO,IAAI,EAAE,CAAC;YACZ,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YAC5C,IAAI,IAAI;gBAAE,MAAM;YAChB,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAEzE,IAAI,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YACjC,OAAO,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;gBAClB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;gBACnC,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;gBAC/B,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;gBACnC,IAAI,KAAK,KAAK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,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;IACrE,CAAC;IACD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACnC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED,SAAS,YAAY,CAAI,KAAa;IACpC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAM,CAAC;IAChC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,sBAAU,CAAC,2BAA2B,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACjF,CAAC;AACH,CAAC"}
@@ -0,0 +1,143 @@
1
+ export type JsonValue = string | number | boolean | null | JsonObject | JsonValue[];
2
+ export interface JsonObject {
3
+ [key: string]: JsonValue | undefined;
4
+ }
5
+ export interface RequestOptions {
6
+ signal?: AbortSignal;
7
+ headers?: Record<string, string>;
8
+ timeoutMs?: number;
9
+ }
10
+ export interface ZelAIClientOptions {
11
+ apiKey?: string;
12
+ baseURL?: string;
13
+ timeoutMs?: number;
14
+ fetch?: typeof fetch;
15
+ defaultHeaders?: Record<string, string>;
16
+ }
17
+ export interface ModelPricing {
18
+ input?: number;
19
+ output?: number;
20
+ cached?: number;
21
+ reasoning?: number;
22
+ cache_creation?: number;
23
+ [key: string]: number | undefined;
24
+ }
25
+ export interface Model {
26
+ id: string;
27
+ object: 'model';
28
+ created?: number;
29
+ owned_by?: string;
30
+ requires_api_key?: boolean;
31
+ flagship?: boolean;
32
+ pricing?: ModelPricing;
33
+ context_window?: number;
34
+ [key: string]: unknown;
35
+ }
36
+ export interface ModelList {
37
+ object: 'list';
38
+ data: Model[];
39
+ }
40
+ export type ChatRole = 'system' | 'user' | 'assistant' | 'tool' | 'developer';
41
+ export interface ChatMessage {
42
+ role: ChatRole;
43
+ content: string | null | Array<Record<string, unknown>>;
44
+ name?: string;
45
+ tool_call_id?: string;
46
+ tool_calls?: Array<Record<string, unknown>>;
47
+ [key: string]: unknown;
48
+ }
49
+ export interface ChatCompletionCreateParams {
50
+ model: string;
51
+ messages: ChatMessage[];
52
+ stream?: boolean;
53
+ temperature?: number;
54
+ top_p?: number;
55
+ max_tokens?: number;
56
+ tools?: Array<Record<string, unknown>>;
57
+ tool_choice?: unknown;
58
+ response_format?: unknown;
59
+ stop?: string | string[];
60
+ [key: string]: unknown;
61
+ }
62
+ export interface ChatCompletionChoice {
63
+ index: number;
64
+ message?: ChatMessage;
65
+ delta?: Partial<ChatMessage> & {
66
+ content?: string | null;
67
+ };
68
+ finish_reason?: string | null;
69
+ logprobs?: unknown;
70
+ [key: string]: unknown;
71
+ }
72
+ export interface ChatCompletion {
73
+ id?: string;
74
+ object?: string;
75
+ created?: number;
76
+ model?: string;
77
+ choices: ChatCompletionChoice[];
78
+ usage?: Record<string, unknown>;
79
+ [key: string]: unknown;
80
+ }
81
+ export interface ChatCompletionChunk extends ChatCompletion {
82
+ object: 'chat.completion.chunk' | string;
83
+ }
84
+ export interface ZelAIErrorBody {
85
+ error?: {
86
+ type?: string;
87
+ code?: string;
88
+ message?: string;
89
+ api_key_url?: string;
90
+ retry_after?: number;
91
+ details?: Record<string, unknown>;
92
+ [key: string]: unknown;
93
+ };
94
+ [key: string]: unknown;
95
+ }
96
+ export interface SystemOneQuestion {
97
+ type: 'noul' | 'choice' | 'score';
98
+ instructions: string;
99
+ criteria: Record<string, string> | string[];
100
+ }
101
+ export interface SystemOneCreateParams {
102
+ model: string;
103
+ state: string;
104
+ questions: Record<string, SystemOneQuestion>;
105
+ [key: string]: unknown;
106
+ }
107
+ export interface ImageGenerationParams {
108
+ model: string;
109
+ prompt: string;
110
+ size?: string;
111
+ quality?: string;
112
+ n?: number;
113
+ [key: string]: unknown;
114
+ }
115
+ export interface ImageEditParams {
116
+ model: string;
117
+ image: string;
118
+ prompt: string;
119
+ [key: string]: unknown;
120
+ }
121
+ export interface VideoGenerationParams {
122
+ model: string;
123
+ prompt: string;
124
+ duration?: number;
125
+ [key: string]: unknown;
126
+ }
127
+ export interface AudioSpeechParams {
128
+ model: string;
129
+ input: string;
130
+ voice: string;
131
+ response_format?: string;
132
+ [key: string]: unknown;
133
+ }
134
+ export interface AudioTranscriptionParams {
135
+ model: string;
136
+ file: string;
137
+ [key: string]: unknown;
138
+ }
139
+ export interface AudioTranslationParams {
140
+ model: string;
141
+ file: string;
142
+ [key: string]: unknown;
143
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,100 @@
1
+ import type { AudioSpeechParams, AudioTranscriptionParams, AudioTranslationParams, ChatCompletion, ChatCompletionChunk, ChatCompletionCreateParams, ImageEditParams, ImageGenerationParams, ModelList, RequestOptions, SystemOneCreateParams, VideoGenerationParams, ZelAIClientOptions } from './types.js';
2
+ export declare class ZelAI {
3
+ readonly apiKey?: string;
4
+ readonly baseURL: string;
5
+ readonly timeoutMs: number;
6
+ readonly fetchImpl: typeof fetch;
7
+ readonly defaultHeaders: Record<string, string>;
8
+ readonly models: ModelsResource;
9
+ readonly chat: ChatResource;
10
+ readonly responses: ResponsesResource;
11
+ readonly messages: MessagesResource;
12
+ readonly systemOne: SystemOneResource;
13
+ readonly images: ImagesResource;
14
+ readonly videos: VideosResource;
15
+ readonly audio: AudioResource;
16
+ constructor(options?: ZelAIClientOptions);
17
+ request<T>(path: string, init?: {
18
+ method?: string;
19
+ body?: unknown;
20
+ query?: Record<string, string | number | boolean | undefined>;
21
+ headers?: Record<string, string>;
22
+ signal?: AbortSignal;
23
+ timeoutMs?: number;
24
+ raw?: boolean;
25
+ }): Promise<T>;
26
+ requestStream<T>(path: string, init?: {
27
+ body?: unknown;
28
+ headers?: Record<string, string>;
29
+ signal?: AbortSignal;
30
+ timeoutMs?: number;
31
+ }): Promise<AsyncGenerator<T>>;
32
+ }
33
+ export declare class ModelsResource {
34
+ private readonly client;
35
+ constructor(client: ZelAI);
36
+ list(options?: RequestOptions): Promise<ModelList>;
37
+ retrieve(model: string, options?: RequestOptions): Promise<unknown>;
38
+ }
39
+ export declare class ChatCompletionsResource {
40
+ private readonly client;
41
+ constructor(client: ZelAI);
42
+ create(params: ChatCompletionCreateParams & {
43
+ stream: true;
44
+ }, options?: RequestOptions): Promise<AsyncGenerator<ChatCompletionChunk>>;
45
+ create(params: ChatCompletionCreateParams & {
46
+ stream?: false;
47
+ }, options?: RequestOptions): Promise<ChatCompletion>;
48
+ create(params: ChatCompletionCreateParams, options?: RequestOptions): Promise<ChatCompletion | AsyncGenerator<ChatCompletionChunk>>;
49
+ }
50
+ export declare class ChatResource {
51
+ readonly completions: ChatCompletionsResource;
52
+ constructor(client: ZelAI);
53
+ }
54
+ export declare class ResponsesResource {
55
+ private readonly client;
56
+ constructor(client: ZelAI);
57
+ create(params: Record<string, unknown>, options?: RequestOptions): Promise<unknown>;
58
+ }
59
+ export declare class MessagesResource {
60
+ private readonly client;
61
+ constructor(client: ZelAI);
62
+ create(params: Record<string, unknown>, options?: RequestOptions): Promise<unknown>;
63
+ }
64
+ export declare class SystemOneResource {
65
+ private readonly client;
66
+ constructor(client: ZelAI);
67
+ create(params: SystemOneCreateParams, options?: RequestOptions): Promise<unknown>;
68
+ }
69
+ export declare class ImagesResource {
70
+ private readonly client;
71
+ constructor(client: ZelAI);
72
+ generate(params: ImageGenerationParams, options?: RequestOptions): Promise<unknown>;
73
+ edit(params: ImageEditParams, options?: RequestOptions): Promise<unknown>;
74
+ }
75
+ export declare class VideosResource {
76
+ private readonly client;
77
+ constructor(client: ZelAI);
78
+ generate(params: VideoGenerationParams, options?: RequestOptions): Promise<unknown>;
79
+ }
80
+ export declare class AudioResource {
81
+ readonly speech: AudioSpeechResource;
82
+ readonly transcriptions: AudioTranscriptionsResource;
83
+ readonly translations: AudioTranslationsResource;
84
+ constructor(client: ZelAI);
85
+ }
86
+ export declare class AudioSpeechResource {
87
+ private readonly client;
88
+ constructor(client: ZelAI);
89
+ create(params: AudioSpeechParams, options?: RequestOptions): Promise<ArrayBuffer>;
90
+ }
91
+ export declare class AudioTranscriptionsResource {
92
+ private readonly client;
93
+ constructor(client: ZelAI);
94
+ create(params: AudioTranscriptionParams, options?: RequestOptions): Promise<unknown>;
95
+ }
96
+ export declare class AudioTranslationsResource {
97
+ private readonly client;
98
+ constructor(client: ZelAI);
99
+ create(params: AudioTranslationParams, options?: RequestOptions): Promise<unknown>;
100
+ }