> ## 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

> Generate an enhanced version of a website's favicon

Fetches a website's favicon and uses OpenAI's `gpt-image-1.5` model to create a stunning version with professional depth, lighting, and materials.

<Note>This is a **public endpoint** - no authentication required.</Note>

## Query Parameters

<ParamField query="url" type="string" required>
  The business website URL to fetch the favicon from (e.g.,
  `https://stripe.com`)
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the logo generation succeeded
</ResponseField>

<ResponseField name="image_base64" type="string">
  Base64-encoded PNG image data
</ResponseField>

<ResponseField name="image_data_url" type="string">
  Data URL ready to use in `<img src="...">` tags
</ResponseField>

<ResponseField name="original_favicon_url" type="string">
  URL of the original favicon that was found
</ResponseField>

<ResponseField name="error" type="string">
  Error message if generation failed
</ResponseField>

## How It Works

1. **Fetch Favicon** - Tries multiple locations: `/favicon.ico`, `/favicon.png`, HTML `<link>` tags
2. **Send to gpt-image-1.5** - Generates a 3D rendered version with depth, lighting, and materials
3. **Return Base64** - Provides the image as base64 and data URL

The generated image features:

* Professional depth and dimension
* Metallic or glass-like materials
* Soft ambient lighting with shadows
* Clean, modern aesthetic
* Original colors preserved

<RequestExample>
  ```bash cURL curl -X POST theme={null}
  "https://searchcompany-main.up.railway.app/api/enhanced-logo?url=https://stripe.com"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "image_base64": "iVBORw0KGgoAAAANSUhEUgAA...",
    "image_data_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
    "original_favicon_url": "https://stripe.com/favicon.ico"
  }
  ```
</ResponseExample>

## Direct Image Display

To get the image directly in a browser, use the image endpoint:

```
POST /api/enhanced-logo/image?url=https://stripe.com
```

This endpoint returns the PNG image bytes directly with `Content-Type: image/png`.

## Rate Limits

* **3 requests per minute** per IP address
* This is an expensive operation (uses OpenAI gpt-image-1.5 credits)

## Error Cases

| Error                                     | Cause                                 |
| ----------------------------------------- | ------------------------------------- |
| `Could not find favicon for this website` | No favicon found at common locations  |
| OpenAI errors                             | API rate limits, content policy, etc. |
