# AI Blog Generator API API Reference

> **Version:** 1.0.0 | **Base URL:** `https://hifisys.com/api/v1/ai/blog` | **Provider:** Hifisys

## Overview
Production-grade AI article engine that creates long-form, reader-first content, outlines, and SEO metadata.

## Authentication
All requests require a valid API key passed in the request header:
```http
X-API-Key: YOUR_API_KEY
Accept: application/json
```
Alternatively, pass as a standard Bearer token:
```http
Authorization: Bearer YOUR_API_KEY
```

## Available Subscription Plans
| Plan | Price | Rate Limit | Monthly Quota | Trial |
|---|---|---|---|---|
| Free Trial | Free Trial | 10 req/min | 150 | 7 Days |
| Starter | USD 39.00/month | 30 req/min | 2,500 | No |
| Business | USD 119.00/month | 90 req/min | 15,000 | No |
| Enterprise | USD 299.00/month | 300 req/min | 75,000 | No |

## API Endpoints
### `POST` /api/v1/ai/blog/generate
**Generate Full Article**
> **Scope:** `blog:generate` | **Content-Type:** `application/json`

Generates a full-length SEO-optimized article with title, headings, HTML content, meta tags, and estimated read time.

#### Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| `topic` | `string` | **Yes** | Article topic or main subject. |
| `target_keywords` | `array` | No | List of primary and secondary SEO keywords. |
| `tone` | `string` | No | professional, engaging, technical, casual. Default: professional. |

#### Example Requests
**cURL:**
```bash
curl -X POST "https://hifisys.com/api/v1/ai/blog/generate" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"topic":"Benefits of Enterprise HRMS","tone":"professional"}'
```
**JavaScript:**
```javascript
const res = await fetch('https://hifisys.com/api/v1/ai/blog/generate', {
  method: 'POST',
  headers: { 'X-API-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({ topic: 'Benefits of Enterprise HRMS', tone: 'professional' })
});
const data = await res.json();
```
**PHP:**
```php
$ch = curl_init('https://hifisys.com/api/v1/ai/blog/generate');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['topic' => 'Benefits of Enterprise HRMS', 'tone' => 'professional']));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-API-Key: YOUR_API_KEY', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
```
**Python:**
```python
import requests
res = requests.post('https://hifisys.com/api/v1/ai/blog/generate', json={'topic': 'Benefits of Enterprise HRMS', 'tone': 'professional'}, headers={'X-API-Key': 'YOUR_API_KEY'})
print(res.json())
```

#### Sample Response (200 OK)
```json
{
    "success": true,
    "data": {
        "title": "Top 7 Strategic Benefits of Modern HRMS Platforms",
        "content": "<p>Enterprise HRMS solutions streamline payroll, attendance, and compliance...</p>",
        "meta_description": "Discover how modern HRMS software transforms workforce management.",
        "read_time_minutes": 5
    }
}
```

---

## Security Best Practices
- Store API keys in environment variables; never commit to public VCS repositories.
- Enforce TLS 1.3 across all client integrations.
- Implement exponential backoff algorithms for rate-limit handling (HTTP 429).

## Support & Contact
- **Email:** info@hifisys.com
- **Phone:** +91 8890897064
- **Website:** [Hifisys](https://hifisys.com)