API Endpoints
POST /api/generate
Generate artwork based on provided parameters and images.
Request:
{
"params": {
"denoise_low": 0.5,
"denoise_high": 0.85,
"batch_size": 4,
"guidance": 7.5,
"style_guidance": 0.8,
"control_guidance": 0.5,
"steps": 20,
"seed": 42,
"prompt": "a beautiful landscape"
},
"input_image": "Base64 encoded image (optional)",
"control_image": "Base64 encoded image (optional)",
"style_image": "Base64 encoded image (optional)"
}
Response:
{
"status": "success",
"image_url": "https://storage.example.com/generated/abc123.png",
"generation_id": "abc123",
"metadata": {
"time_taken": 4.23,
"gpu": "A100"
}
}
GET /api/history
Retrieve generation history.
Response:
[
{
"id": "abc123",
"thumbnail_url": "https://storage.example.com/thumbnails/abc123.jpg",
"prompt": "a beautiful landscape",
"created_at": "2023-07-15T12:34:56Z"
},
...
]
GET /api/history/:id
Get details of a specific generation.
Response:
{
"id": "abc123",
"image_url": "https://storage.example.com/generated/abc123.png",
"prompt": "a beautiful landscape",
"params": {
"denoise_low": 0.5,
"denoise_high": 0.85,
"steps": 20,
"seed": 42
},
"created_at": "2023-07-15T12:34:56Z"
}
Error Responses
{
"status": "error",
"code": 400,
"message": "Invalid parameters provided",
"details": {
"denoise_low": "Must be between 0 and 1"
}
}