API & Integration

API Quick Start Guide

94 views

Getting Started with the BlogFlux API

Learn how to integrate BlogFlux into your applications using our REST API.

🔑 Step 1: Get Your API Key

  1. Log in to your BlogFlux dashboard
  2. Go to Settings > API Keys
  3. Click "Generate New API Key"
  4. Copy and save your key securely

⚠️ Security Warning

Never expose your API key in client-side code or public repositories!

📡 Base URL

https://blogflux.ai/api/v1

🔐 Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

📝 Example: Generate a Post

cURL

curl -X POST https://blogflux.ai/api/v1/posts/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "topic": "How to train a golden retriever",
    "ai_model": "gpt-5-mini",
    "language": "en"
  }'

Python

import requests

url = "https://blogflux.ai/api/v1/posts/generate"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}
data = {
    "topic": "How to train a golden retriever",
    "ai_model": "gpt-5-mini",
    "language": "en"
}

response = requests.post(url, headers=headers, json=data)
print(response.json())

JavaScript (Node.js)

const fetch = require('node-fetch');

const url = 'https://blogflux.ai/api/v1/posts/generate';
const options = {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    topic: 'How to train a golden retriever',
    ai_model: 'gpt-5-mini',
    language: 'en'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(data => console.log(data));

✅ Response Format

{
  "status": "success",
  "data": {
    "post_id": "abc123",
    "title": "How to Train a Golden Retriever: Complete Guide",
    "content": "...",
    "status": "completed"
  }
}

🔍 Error Codes

Code Meaning Solution
400 Bad Request Check your request parameters
401 Unauthorized Verify your API key
429 Rate Limit Wait before retrying
500 Server Error Contact support

📚 Next Steps

For complete API reference with all available endpoints, parameters, and examples, visit our interactive API documentation:

📖 Full API Documentation (Swagger UI)

Was this article helpful?

Still need help?

Can't find what you're looking for? Our support team is here to assist you.

Contact Support

Cookie Preferences

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept All", you consent to our use of cookies. Learn more