> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/darkzOGx/youtube-automation-agent/llms.txt
> Use this file to discover all available pages before exploring further.

# REST API Overview

> Complete API reference for the YouTube Automation Agent

## Introduction

The YouTube Automation Agent provides a RESTful API for managing automated YouTube content creation, scheduling, and analytics. All endpoints are accessible via HTTP and return JSON responses.

## Base URL

```
http://localhost:3456
```

The default port is `3456`, but can be configured via the `PORT` environment variable.

## Available Endpoints

The API provides the following endpoint groups:

### Health & Status

* `GET /health` - Check system health and agent status

### Content Generation

* `POST /generate` - Manually generate YouTube content

### Publishing

* `POST /publish/:contentId` - Manually publish content to YouTube

### Scheduling

* `GET /schedule` - Get upcoming content schedule

### Analytics

* `GET /analytics` - Retrieve recent analytics data

## Response Format

All API responses are returned in JSON format.

### Success Response

```json theme={null}
{
  "success": true,
  "result": { /* endpoint-specific data */ }
}
```

### Error Response

```json theme={null}
{
  "success": false,
  "error": "Error message description"
}
```

For GET endpoints that don't use the success/result wrapper, errors return:

```json theme={null}
{
  "error": "Error message description"
}
```

## HTTP Status Codes

| Code | Description                                             |
| ---- | ------------------------------------------------------- |
| 200  | Success - Request completed successfully                |
| 500  | Server Error - An error occurred processing the request |

## Authentication

<Note>
  The current version does not implement authentication. This is suitable for local development and testing. For production deployments, implement proper authentication and authorization.
</Note>

## Rate Limiting

No rate limiting is currently implemented. The API is designed for internal use and automation.

## Content Type

All POST requests should include the following header:

```
Content-Type: application/json
```

## Next Steps

Explore the individual endpoint documentation:

<CardGroup cols={2}>
  <Card title="Health Check" icon="heart-pulse" href="/api/health">
    Monitor system status and agent availability
  </Card>

  <Card title="Generate Content" icon="wand-magic-sparkles" href="/api/generate">
    Create new YouTube content programmatically
  </Card>

  <Card title="Schedule" icon="calendar" href="/api/schedule">
    View upcoming content schedule
  </Card>

  <Card title="Analytics" icon="chart-line" href="/api/analytics">
    Access performance metrics
  </Card>

  <Card title="Publish" icon="upload" href="/api/publish">
    Manually publish content to YouTube
  </Card>
</CardGroup>
