Lovart API Documentation
Integrate powerful AI design capabilities into your applications with our comprehensive RESTful API and SDKs.
Quick Start
Get Started in 5 Minutes
Get API Key
Sign up and get your API key from the dashboard
Install SDK
Choose your preferred programming language SDK
Make API Calls
Start integrating AI design capabilities
Authentication
API Key Authentication
All API requests require authentication using your API key. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Security Note: Keep your API key secure and never expose it in client-side code.
API Endpoints
Generate Design
/v1/design/generate
Generate AI-powered designs based on text prompts and parameters.
Request Body
{
"prompt": "Modern logo for tech startup",
"style": "minimalist",
"dimensions": {
"width": 512,
"height": 512
},
"format": "png",
"quality": "high"
}
Response
{
"success": true,
"design_id": "des_123456789",
"image_url": "https://api.lovart.info/designs/des_123456789.png",
"thumbnail_url": "https://api.lovart.info/designs/des_123456789_thumb.png",
"created_at": "2024-01-15T10:30:00Z"
}
Get Design Status
/v1/design/{design_id}/status
Check the status of a design generation request.
Upload Image
/v1/images/upload
Upload images for processing and enhancement.
Enhance Image
/v1/images/enhance
Enhance image quality using AI-powered upscaling and optimization.
List Templates
/v1/templates
Get a list of available design templates.
Get Template Details
/v1/templates/{template_id}
Get detailed information about a specific template.
Get User Info
/v1/user
Get current user account information and usage stats.
Get Usage Statistics
/v1/user/usage
Get detailed usage statistics and billing information.
SDKs & Libraries
Python SDK
Full-featured Python SDK for AI design integration
pip install lovart-ai
JavaScript SDK
Modern JavaScript SDK for web applications
npm install lovart-js
REST API
Direct REST API access for any language
curl -X POST https://api.lovart.info/v1/
Code Examples
Python Example
import lovart_ai
# Initialize the client
client = lovart_ai.Client(api_key="your_api_key")
# Generate a design
design = client.design.generate(
prompt="Modern logo for tech startup",
style="minimalist",
dimensions={"width": 512, "height": 512},
format="png"
)
print(f"Design generated: {design.id}")
print(f"Image URL: {design.image_url}")
JavaScript Example
import { LovartAI } from 'lovart-js';
// Initialize the client
const client = new LovartAI('your_api_key');
// Generate a design
const design = await client.design.generate({
prompt: 'Modern logo for tech startup',
style: 'minimalist',
dimensions: { width: 512, height: 512 },
format: 'png'
});
console.log(`Design generated: ${design.id}`);
console.log(`Image URL: ${design.imageUrl}`);
cURL Example
curl -X POST https://api.lovart.info/v1/design/generate \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Modern logo for tech startup",
"style": "minimalist",
"dimensions": {
"width": 512,
"height": 512
},
"format": "png"
}'
API Pricing
Flexible pricing plans for developers and businesses of all sizes
Free Tier
$0/month
- β’ 100 API calls/month
- β’ Basic design generation
- β’ Community support
Pro
$49/month
- β’ 10,000 API calls/month
- β’ Advanced features
- β’ Priority support
Enterprise
Custom
- β’ Unlimited API calls
- β’ Custom integrations
- β’ Dedicated support
Need Help?
Our developer support team is here to help you integrate Lovart API successfully.