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

# API Introduction

> Getting started with the Sora Digital Photo Frame API

## Overview

The Sora Digital Photo Frame API provides RESTful endpoints for managing photos, folders, and slideshow functionality. The API supports both public slideshow access and protected admin operations.

## Base URL

```
http://localhost:3000/api
```

## API Categories

<CardGroup cols={2}>
  <Card title="Photos API" icon="image" href="/api-reference/photos/random">
    Retrieve images for slideshow display
  </Card>

  <Card title="Folders API" icon="folder" href="/api-reference/folders/list">
    Manage folder structure and contents
  </Card>

  <Card title="Authentication" icon="key" href="/api-reference/auth/login">
    Admin login and session management
  </Card>

  <Card title="Upload API" icon="upload" href="/api-reference/photos/upload">
    Upload and delete images (admin only)
  </Card>
</CardGroup>

## Authentication

**Public Endpoints** - No authentication required:

* Image retrieval for slideshow
* Folder structure access

**Protected Endpoints** - Require admin session:

* Photo upload/delete operations
* Admin folder management

## Response Format

```json theme={null}
{
  "success": true,
  "data": {},
  "message": "Success message"
}
```

## Status Codes

* `200` - Success
* `400` - Bad Request
* `401` - Unauthorized
* `403` - Forbidden
* `404` - Not Found
* `500` - Server Error

## Quick Start

<Steps>
  <Step title="Start server">
    ```bash theme={null}
    npm start
    ```
  </Step>

  <Step title="Test public endpoint">
    ```bash theme={null}
    curl http://localhost:3000/api/folders
    ```
  </Step>

  <Step title="Admin login">
    ```bash theme={null}
    curl -X POST http://localhost:3000/api/auth/login \
      -H "Content-Type: application/json" \
      -d '{"password": "your-password"}'
    ```
  </Step>
</Steps>
