> ## Documentation Index
> Fetch the complete documentation index at: https://docs.searchcompany.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Enhanced Logo

<Note>
  **Internal Service** — This is not an HTTP endpoint. It's called by the enhanced logo service.
</Note>

## Purpose

Uses OpenAI's gpt-image-1.5 to transform a favicon into a hand-sketched artistic version.

## Function Signature

```python theme={null}
async def generate_enhanced_logo(png_bytes: bytes) -> dict
```

## Parameters

| Parameter   | Type    | Description          |
| ----------- | ------- | -------------------- |
| `png_bytes` | `bytes` | Favicon as PNG bytes |

## Returns

```python theme={null}
{
    "success": True,
    "image_base64": "iVBORw0KGgo...",
    "image_data_url": "data:image/png;base64,iVBORw0KGgo..."
}
```

## Style Transfer Approach

The function sends **two images** to OpenAI:

1. **base\_image.png** - A hand-sketched Target logo (style reference)
2. **target\_image.png** - The favicon to transform

The prompt instructs the model to apply the sketched style from image 1 to image 2.

## Prompt Engineering

```
CRITICAL: You are receiving TWO images in a specific order:
- FIRST IMAGE (base_image.png): The Target retail company logo drawn in 
  hand-sketched style - this is ONLY for style reference
- SECOND IMAGE (target_image.png): A different company's favicon/logo - 
  this is what you MUST transform

YOUR TASK: Redraw the SECOND IMAGE using the hand-sketched artistic style 
from the FIRST IMAGE.
```

## Code Location

```
src/website/enhanced_logo/service.py
# Lines 170-233: generate_enhanced_logo()
```
