Overview
The ModelsLab TypeScript SDK provides a type-safe interface to interact with all ModelsLab APIs. It works with both Node.js and browser environments.npm Package
View on npm
GitHub
Source code and issues
Installation
Quick Start
Generate your first AI image in just a few lines:Client Configuration
Basic Setup
Client Properties
Available APIs
Enterprise Mode
For enterprise/dedicated endpoints:Image Generation (Community API)
Text to Image
Image to Image
Transform existing images with a text prompt:Inpainting
Edit specific areas of an image:ControlNet
Guided generation with reference images:Audio API
Text to Audio
Generate audio from text descriptions:Text to Speech
Convert text to natural speech:Voice to Voice (Voice Cloning)
Clone a voice from a reference audio:Voice Cover
Create AI covers with different voices:Music Generation
Generate music from text prompts:Lyrics Generation
Generate song lyrics:Song Generation
Generate complete songs with vocals:Speech to Text
Transcribe audio to text:Sound Effects (SFX)
Generate sound effects:Video API
Text to Video
Generate videos from text descriptions:Image to Video
Animate a static image:Image Editing API
Background Removal
Super Resolution (Upscale)
Outpainting (Extend Images)
Object Removal
Fashion / Virtual Try-On
Face Generation
Inpainting
AI Headshots
Error Handling
Always handle potential errors in production:Async Processing Pattern
For long-running operations, poll for results:Next Steps
API Reference
Explore all API endpoints
Models
Browse available models
Webhooks
Set up async notifications
Error Codes
Handle errors properly

