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

# Health Check

> Check system health and initialization status

## Endpoint

```
GET /health
```

## Description

Returns the current health status of the YouTube Automation Agent, including initialization state and available agents. This endpoint is useful for monitoring and ensuring all components are properly initialized.

## Request

No parameters required.

### Headers

No special headers required.

## Response

<ResponseField name="status" type="string" required>
  Current health status. Returns `"healthy"` when the system is operational.
</ResponseField>

<ResponseField name="initialized" type="boolean" required>
  Indicates whether the agent has completed initialization. `true` means all agents and services are ready.
</ResponseField>

<ResponseField name="agents" type="array" required>
  List of initialized agent names.

  Available agents:

  * `strategy` - Content Strategy Agent
  * `scriptWriter` - Script Writer Agent
  * `thumbnailDesigner` - Thumbnail Designer Agent
  * `seoOptimizer` - SEO Optimizer Agent
  * `production` - Production Management Agent
  * `publishing` - Publishing & Scheduling Agent
  * `analytics` - Analytics & Optimization Agent
</ResponseField>

<ResponseField name="timestamp" type="string" required>
  ISO 8601 formatted timestamp of when the health check was performed.
</ResponseField>

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl http://localhost:3456/health
  ```

  ```javascript JavaScript (Fetch) theme={null}
  fetch('http://localhost:3456/health')
    .then(response => response.json())
    .then(data => console.log(data));
  ```

  ```python Python theme={null}
  import requests

  response = requests.get('http://localhost:3456/health')
  print(response.json())
  ```
</CodeGroup>

## Example Response

```json theme={null}
{
  "status": "healthy",
  "initialized": true,
  "agents": [
    "strategy",
    "scriptWriter",
    "thumbnailDesigner",
    "seoOptimizer",
    "production",
    "publishing",
    "analytics"
  ],
  "timestamp": "2026-03-05T10:30:45.123Z"
}
```

## Response Codes

| Status Code | Description             |
| ----------- | ----------------------- |
| 200         | Health check successful |

## Use Cases

### System Monitoring

Use this endpoint to verify the system is running and all agents are initialized:

```bash theme={null}
# Simple health check
curl -f http://localhost:3456/health || echo "System unhealthy"
```

### Startup Verification

Check initialization status before making other API calls:

```javascript theme={null}
async function waitForInitialization() {
  const response = await fetch('http://localhost:3456/health');
  const health = await response.json();
  
  if (!health.initialized) {
    console.log('System still initializing...');
    // Retry after delay
  }
}
```

### Docker Health Check

Use in Docker containers for health monitoring:

```dockerfile theme={null}
HEALTHCHECK --interval=30s --timeout=3s --start-period=40s \
  CMD curl -f http://localhost:3456/health || exit 1
```

<Note>
  If `initialized` is `false`, credentials may be missing or invalid. Check the application logs and run `npm run credentials:setup` to configure credentials.
</Note>
