API e Integración

API Quick Start Guide

30 vistas

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)

¿Fue útil este artículo?

Artículos Relacionados

¿Todavía necesitas ayuda?

¿No encuentras lo que buscas? Nuestro equipo de soporte está aquí para ayudar.

Contactar Soporte

Preferencias de Cookies

Usamos cookies para mejorar tu experiencia de navegación, analizar el tráfico del sitio y personalizar el contenido. Al hacer clic en "Aceptar Todas", aceptas nuestro uso de cookies. Más información