# Sketch Rendering API

Render input sketch drawings into photo-realistic images with configurable lighting.

## Endpoint

```
POST /api/sketch-rendering/render
```

## Content-Type

`multipart/form-data`

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `image` | File | Yes | Input sketch image file (JPEG, PNG, WebP). Max size: 10MB |
| `lighting` | String | No | Lighting style to apply (default: `natural`) |

## Lighting Options

| Option | Description |
|--------|-------------|
| `natural` | Natural ambient lighting |
| `studio` | Professional studio lighting |
| `dramatic` | Dramatic cinematic lighting |

## Success Response

**Status:** `200 OK`

```json
{
  "imageUrl": "/outputs/550e8400-e29b-41d4-a716-446655440000.png"
}
```

## Error Responses

### 400 Bad Request - Invalid Lighting

```json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid lighting. Must be one of: natural, studio, dramatic",
    "details": null
  }
}
```

### 422 Unprocessable Entity - Missing Image

```json
{
  "error": {
    "code": "INVALID_IMAGE_DATA",
    "message": "No image provided",
    "details": null
  }
}
```

### 500 Internal Server Error - AI Generation Failed

```json
{
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Sketch rendering failed",
    "details": null
  }
}
```

## Examples

### Natural Lighting (Default)

```bash
curl -X POST http://localhost:3000/api/sketch-rendering/render \
  -F "image=@sketch.png" \
  -F "lighting=natural"
```

### Studio Lighting

```bash
curl -X POST http://localhost:3000/api/sketch-rendering/render \
  -F "image=@sketch.png" \
  -F "lighting=studio"
```

### Dramatic Lighting

```bash
curl -X POST http://localhost:3000/api/sketch-rendering/render \
  -F "image=@sketch.png" \
  -F "lighting=dramatic"
```

### Default Lighting (No Parameter)

```bash
curl -X POST http://localhost:3000/api/sketch-rendering/render \
  -F "image=@sketch.png"
```


## Use Cases

- **Concept Art**: Quickly visualize sketches from artists and designers
- **Architecture**: Render building sketches into realistic architectural visualizations
- **Product Design**: Convert product sketches into photorealistic mockups
- **Fashion**: Transform fashion sketches into realistic clothing renders
- **Game Development**: Convert concept art into game-ready assets
- **Interior Design**: Visualize room layouts from rough sketches
- **Illustration**: Bring hand-drawn illustrations to life with realistic rendering
