# Fake Travel

Pretend to be traveling at a resort by placing your selfie in a beautiful resort scene.

## Description

Upload a selfie photo and specify a resort name to generate a combined image showing you enjoying your stay at that resort. The AI naturally places your photo into a realistic resort setting, making it appear as if you're actually there.

## Authentication

**Required**: x402 payment

This endpoint requires payment via the x402 protocol. See the [Setup](./setup.md) for setup instructions.

## Request

**Endpoint**: `POST /api/fake-travel/generate`

**Content-Type**: `multipart/form-data`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| image | file | Yes | Selfie photo (JPEG, PNG, or WebP, max 10MB) |
| resortName | string | Yes | Resort name (max 200 characters), e.g., "Maldives Beach Resort" |

## Response

**200 OK**

```json
{
  "imageUrl": "/outputs/uuid-here.png"
}
```

| Field | Type | Description |
|-------|------|-------------|
| imageUrl | string | Path to the generated fake travel image |

## Error Codes

| Status | Code | Description |
|--------|------|-------------|
| 400 | VALIDATION_ERROR | Resort name is required and must be under 200 characters |
| 400 | VALIDATION_ERROR | Selfie image is required |
| 402 | PAYMENT_REQUIRED | x402 payment not completed |
| 413 | FILE_TOO_LARGE | File exceeds 10MB limit |
| 415 | UNSUPPORTED_FORMAT | Invalid file type (must be JPEG, PNG, or WebP) |
| 500 | INTERNAL_ERROR | AI generation failed |
| 504 | AI_GENERATION_TIMEOUT | AI request timed out |

## Example

### Generate fake travel image

```bash
npx x402-proxy -X POST \
  -F "image=@selfie.jpg" \
  -F "resortName=Maldives Beach Resort" \
  https://ps.codejar.net/api/fake-travel/generate
```

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

## Output Format

The generated image is a single combined photo showing:
- **Your selfie** naturally placed in a resort scene
- **Realistic integration** of the person into the setting
- **High quality** photorealistic result suitable for social media

## Use Cases

- **Social Media**: Create fake travel photos for Instagram, WeChat Moments, etc.
- **Entertainment**: Have fun placing yourself at dream resorts
- **Travel Dreams**: See yourself at resorts you want to visit
- **Sticker Creation**: Create fun stickers for messaging apps

## Supported Resort Types

The AI will automatically choose an appropriate resort style based on the name you provide. Examples:
- **Beach Resorts**: Maldives, Caribbean, Hawaii
- **Mountain Resorts**: Aspen, Swiss Alps, Japanese ryokan
- **Tropical Resorts**: Bali, Thailand, Fiji
- **Luxury Resorts**: Dubai, Monaco, Vegas
- **City Hotels**: Any famous hotel or resort name
