@mvkproject/nexus
Version:
Free AI SDK with API key (500 free daily requests). Access 25+ LLM models (GPT-4, Gemini, Llama, DeepSeek), generate images with 14+ models (Flux, Stable Diffusion), and integrate Akinator game - all completely free.
80 lines (69 loc) • 1.63 kB
TypeScript
export interface NexusClientOptions {
apiKey: string;
baseURL?: string;
}
export interface ImageGenerationOptions {
prompt: string;
model?: string;
width?: number;
height?: number;
download?: boolean;
downloadPath?: string;
}
export interface ImageGenerationResponse {
success: boolean;
model: string;
prompt: string;
size: string;
imageUrl: string;
expiresIn: string;
downloadedPath?: string;
user: {
email: string;
plan: string;
nextGenerationAvailableIn: number;
};
}
export interface Message {
role: 'system' | 'user' | 'assistant';
content: string;
}
export interface TextGenerationOptions {
model: string;
prompt?: string;
messages?: Message[];
userid?: string;
systemInstruction?: string;
temperature?: number;
maxOutputTokens?: number;
max_tokens?: number;
top_p?: number;
images?: string | string[] | { data: string; mimeType: string };
stream?: boolean;
}
export interface TextGenerationResponse {
success: boolean;
model: string;
completion: string;
userid?: string;
historyLength?: number;
user: {
email: string;
plan: string;
usageRemaining: number;
};
}
export interface StreamChunk {
chunk: string;
}
export declare class NexusClient {
constructor(options: NexusClientOptions);
image: {
generate(options: ImageGenerationOptions): Promise<ImageGenerationResponse>;
};
text: {
generate(options: TextGenerationOptions): Promise<TextGenerationResponse>;
generateStream(options: TextGenerationOptions, onChunk: (chunk: string) => void): Promise<void>;
};
}
export default NexusClient;