@devvai/devv-code-backend
Version:
Backend SDK for Devv Code - Provides authentication, data management, email and AI capabilities
33 lines (32 loc) • 1.24 kB
TypeScript
import type { ReplicateImageOptions, ReplicateImageResponse } from './types';
/**
* DevvReplicate - Replicate AI model integration
*
* Provides access to pre-approved high-quality AI models through Replicate.
* API key is handled automatically by the backend service.
*
* Supported models:
* - ideogram-ai/ideogram-v3-turbo: High-quality text-to-image generation
* - black-forest-labs/flux-schnell: Fast, efficient image generation
* - google/imagen-4-fast: Google's fast image generation model
* - black-forest-labs/flux-kontext-pro: Professional context-aware generation
* - prunaai/hidream-l1-fast: Optimized fast generation model
* - luma/photon-flash: Ultra-fast photorealistic generation
*
* Usage:
* ```typescript
* const replicate = new DevvReplicate();
* const result = await replicate.textToImage({
* prompt: "a beautiful landscape",
* model: "black-forest-labs/flux-schnell",
* num_outputs: 2,
* negative_prompt: "blurry, low quality"
* });
* ```
*
* Note: Authentication required. Make sure you are logged in via auth.verifyOTP()
*/
export declare class DevvReplicate {
private static readonly ALLOWED_MODELS;
textToImage(options: ReplicateImageOptions): Promise<ReplicateImageResponse>;
}