Spaces:
Runtime error
Runtime error
| /** | |
| * API Configuration types and constants for managing image generation providers. | |
| * This file contains shared types and config - no server-only code. | |
| */ | |
| export type ImageProvider = 'openai' | 'google' | 'qwen'; | |
| export interface ProviderConfig { | |
| name: string; | |
| displayName: string; | |
| envKey: string; | |
| bestFor: string[]; | |
| description: string; | |
| } | |
| export const PROVIDER_CONFIGS: Record<ImageProvider, ProviderConfig> = { | |
| openai: { | |
| name: 'openai', | |
| displayName: 'OpenAI DALL-E', | |
| envKey: 'OPENAI_API_KEY', | |
| bestFor: ['photorealistic', 'photography', 'product shots', 'professional', 'realistic'], | |
| description: 'Best for photorealistic and professional images', | |
| }, | |
| google: { | |
| name: 'google', | |
| displayName: 'Google Gemini', | |
| envKey: 'GOOGLE_GENAI_API_KEY', | |
| bestFor: ['general purpose', 'quick', 'versatile', 'simple', 'icons'], | |
| description: 'Best for general purpose and quick generation', | |
| }, | |
| qwen: { | |
| name: 'qwen', | |
| displayName: 'Qwen Image Plus', | |
| envKey: 'DASHSCOPE_API_KEY', | |
| bestFor: ['artistic', 'creative', 'stylized', 'anime', 'illustration', 'digital art', 'fantasy'], | |
| description: 'Best for artistic and creative images', | |
| }, | |
| }; | |