File size: 1,233 Bytes
b9c7268
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// API Keys configuration for VisionCraft AI
// In production, these should be managed via environment variables
// This file provides a placeholder for API keys

class ApiKeys extends HTMLElement {
  connectedCallback() {
    // This component doesn't render UI, just provides a configuration object
  }
}

customElements.define('api-keys', ApiKeys);

// Export API configuration
window.VisionCraftAPI = {
  // Replicate API (for Gen‑2 image‑to‑video)
  REPLICATE_API_KEY: 'r8_1234567890abcdef', // Replace with your actual Replicate API key
  
  // Alternatively, use a proxy service to avoid exposing keys
  PROXY_URL: 'https://your-proxy-service.com/generate-video',
  
  // Fallback: Use a different service if Replicate fails
  FALLBACK_API: 'https://api.stability.ai/v2beta/image-to-video',
  STABILITY_API_KEY: 'sk-1234567890abcdef',
  
  // Get active configuration
  getConfig() {
    return {
      replicate: {
        endpoint: 'https://api.replicate.com/v1/predictions',
        version: 'ada7db5b8b92267483951ff3fe443a62c611c5b5a672798e6f0f2e8f9c6a9e1e',
        headers: {
          'Authorization': `Token ${this.REPLICATE_API_KEY}`,
          'Content-Type': 'application/json'
        }
      }
    };
  }
};