Overview
The FortiLabs API enables you to programmatically generate AI-powered articles, manage WordPress sites, and automate your content workflow. Our API is built on REST principles with JSON responses.
Base URL
https://writer.fortilabs.dev/api/v2
Format
All requests and responses use JSON format
Security
HTTPS required, Bearer token authentication
Quick Start
curl -X POST "https://writer.fortilabs.dev/api/v2/articles/generate" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"title": "Best Gardening Tips", "domain_id": 123}'
Authentication
All API requests require authentication using a Bearer token. Include your API key in the Authorization header:
Authorization: Bearer your_api_key_here
Getting Your API Key
- Log in to your FortiLabs dashboard
- Navigate to Settings in the sidebar
- Click API Keys tab
- Click Generate New Key
- Copy and securely store your key
Security Notice
Never expose your API key in client-side code or public repositories. If compromised, regenerate it immediately.
Rate Limits
API requests are rate-limited based on your subscription plan:
| Plan | Requests/Minute | Articles/Day | Concurrent |
|---|---|---|---|
| Free | 10 | 5 | 1 |
| Starter | 30 | 50 | 2 |
| Professional | 60 | 200 | 5 |
| Enterprise | 120 | Unlimited | 10 |
Rate limit headers are included in every response:
X-RateLimit-Limit: 60 X-RateLimit-Remaining: 45 X-RateLimit-Reset: 1703500800
Articles
Generate AI-powered articles and publish them directly to your WordPress sites.
Generate a new article using AI and optionally publish to WordPress.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
titleRequired | string | Article title (10-200 characters) |
domain_idRequired | integer | Target WordPress domain ID |
category_idOptional | integer | WordPress category ID |
featured_imageOptional | boolean | Generate AI featured image (default: true) |
modeOptional | string | AI mode: legacy, pro, elite (default: legacy) |
statusOptional | string | Post status: draft, publish (default: publish) |
Response
{
"success": true,
"data": {
"article_id": 12345,
"wordpress_id": 789,
"title": "Best Gardening Tips for Beginners",
"word_count": 2847,
"url": "https://yourblog.com/gardening-tips/",
"credits_used": 0.15
}
}
List all generated articles with pagination.
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Results per page (max: 100) |
domain_id | integer | Filter by domain |
AI Models
FortiLabs uses multiple premium AI models to generate high-quality, human-like content optimized for ad network approval.
Gemini 2.5 / GPT-5 Omni
Flagship models for Legacy and Pro Blogger modes. Generates engaging, SEO-optimized content.
Legacy & Pro BloggerGoogle Gemini Pro
Google's advanced AI for diverse, factual content generation with excellent knowledge coverage.
Alternative EngineClaude 4.5 Sonnet
Anthropic's most capable model for Elite Pro+ mode. Produces premium, virtually undetectable content.
Elite Pro+ ModeNano Banana Image AI
Advanced image generation for featured images and in-article visuals. High-resolution output.
Image GenerationAPI Pricing
API usage is billed using credits. Purchase credits from your dashboard and use them for article generation.
Legacy Mode
- Gemini 2.5 Flash
- 2500+ words
- Featured image
- 80% approval rate
Pro Blogger
- GPT-5 Omni engine
- 3000+ words
- Premium images
- 90% approval rate
Elite Pro+
- Claude 4.5 Sonnet
- 3500+ words
- HD images
- 99.9% approval
Title Generation
- AI-powered titles
- SEO optimized
- Bulk generation
- Up to 20 at once
Error Handling
The API uses standard HTTP status codes and returns consistent error responses.
| Code | Meaning | Resolution |
|---|---|---|
200 | Success | Request completed successfully |
400 | Bad Request | Check request parameters |
401 | Unauthorized | Invalid or missing API key |
402 | Payment Required | Insufficient credits |
429 | Too Many Requests | Rate limit exceeded, wait and retry |
500 | Server Error | Contact support |
{
"success": false,
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "You need $0.15 credits. Current balance: $0.10"
}
}
SDKs & Libraries
Official SDKs are coming soon. In the meantime, you can use our API directly with any HTTP client.
PHP SDK
Coming Q1 2025
Node.js SDK
Coming Q1 2025
Python SDK
Coming Q2 2025