Powered by AgentDAO
Live

Documentation

Comprehensive guide to using ContentAgent's AI-powered content creation platform with Web3 technology.

Getting Started

1. Subscribe with ESH Tokens

ContentAgent uses ESH tokens from AgentDAO for payments. To get started:

  • Visit our subscription page
  • Connect your Web3 wallet (MetaMask, WalletConnect, etc.)
  • Purchase ESH tokens if you don't have them
  • Subscribe for $30/month in ESH tokens

2. Configure Your Account

Set up your account preferences for optimal content generation:

  • Define your brand voice and tone
  • Set content preferences and target audience
  • Configure SEO keywords and topics
  • Set up content scheduling preferences

3. Start Creating Content

Use our 5 core MVP features to generate and manage your content:

  • AI-Driven Topic Discovery
  • Zero Duplication Assurance
  • Brand Voice Synchronization
  • Content Library Management
  • Blog Domain Generator

Authentication

ContentAgent uses API key authentication for secure access to our services.

API Key Authentication

Include your API key in the Authorization header of all requests:

Authorization: Bearer YOUR_API_KEY

Web3 Wallet Authentication

For subscription management and token payments, use Web3 wallet authentication:

Wallet Address: 0x1234...5678 Signature: 0xabcd...efgh Message: "Authenticate with ContentAgent"

API Reference

Create New Job

POST /api/agent/new-job

Create a new content generation job

Request Body:
{
  "apiKey": "your-api-key",
  "jobDescription": "Create a blog post about AI trends",
  "taskType": "blog_post",
  "forwardTo": "self"
}
Response:
{
  "success": true,
  "jobId": "job_123456789",
  "status": "pending"
}

Check Job Status

GET /api/agent/check-job

Check the status of a content generation job

Parameters:
{
  "apiKey": "your-api-key",
  "jobId": "job_123456789"
}
Response:
{
  "success": true,
  "jobStatus": "completed",
  "progress": 100
}

Collect Results

POST /api/agent/collect

Retrieve completed content from a job

Request Body:
{
  "apiKey": "your-api-key",
  "jobId": "job_123456789"
}
Response:
{
  "success": true,
  "results": {
    "deliverableContents": [
      {
        "taskType": "blogPost",
        "deliverableContent": {
          "title": "AI Trends in 2024",
          "content": "Full blog post content...",
          "seoKeywords": ["AI", "trends", "2024"]
        }
      }
    ]
  }
}

Content Types

ContentAgent supports multiple content types, each optimized for specific use cases and platforms.

📝

Blog Posts

AI-generated blog content with SEO optimization

  • • SEO-optimized headlines and content
  • • Automatic keyword integration
  • • Meta descriptions and tags
  • • Internal linking suggestions
📰

Press Releases

Professional press releases for announcements

  • • Journalist-friendly format
  • • Newsworthy angle identification
  • • Quote generation
  • • Media contact information
📱

Social Media Posts

Engaging social media content for all platforms

  • • Platform-specific optimization
  • • Hashtag suggestions
  • • Visual content descriptions
  • • Engagement optimization
🎨

Logos & Branding

AI-generated logo designs and branding

  • • Brand-consistent designs
  • • Multiple format outputs
  • • Color palette suggestions
  • • Brand guidelines

Best Practices

Content Generation

  • Provide detailed job descriptions for better results
  • Specify your target audience and tone preferences
  • Include relevant keywords and topics
  • Review and edit generated content before publishing

API Usage

  • Implement proper error handling for all API calls
  • Use exponential backoff for retry logic
  • Cache job results to avoid unnecessary API calls
  • Monitor your API usage and token balance

Security

  • Keep your API key secure and never expose it in client-side code
  • Use environment variables for API keys
  • Regularly rotate your API keys
  • Monitor for suspicious activity

Troubleshooting

Common Issues

Authentication Errors

Check your API key and ensure it's valid and has sufficient permissions.

Job Timeout

Complex jobs may take longer. Implement proper polling with exponential backoff.

Insufficient Tokens

Ensure you have enough ESH tokens in your wallet for content generation.

Content Quality Issues

Provide more detailed job descriptions and specify your brand voice preferences.

Error Codes

401 - Unauthorized
403 - Forbidden
429 - Rate Limited
500 - Server Error

Code Examples

JavaScript/Node.js

const axios = require('axios');

async function createBlogPost() {
  try {
    // Create new job
    const jobResponse = await axios.post('/api/agent/new-job', {
      apiKey: process.env.CONTENTAGENT_API_KEY,
      jobDescription: 'Write a blog post about AI trends in 2024',
      taskType: 'blog_post',
      forwardTo: 'self'
    });
    
    const jobId = jobResponse.data.jobId;
    
    // Poll for completion
    let status = 'pending';
    while (status !== 'completed') {
      await new Promise(resolve => setTimeout(resolve, 2000));
      
      const statusResponse = await axios.post('/api/agent/check-job', {
        apiKey: process.env.CONTENTAGENT_API_KEY,
        jobId: jobId
      });
      
      status = statusResponse.data.jobStatus;
    }
    
    // Collect results
    const resultsResponse = await axios.post('/api/agent/collect', {
      apiKey: process.env.CONTENTAGENT_API_KEY,
      jobId: jobId
    });
    
    console.log('Generated content:', resultsResponse.data.results);
  } catch (error) {
    console.error('Error:', error.response?.data || error.message);
  }
}

Python

import requests
import time
import os

def create_blog_post():
    api_key = os.getenv('CONTENTAGENT_API_KEY')
    headers = {'Authorization': f'Bearer {api_key}'}
    
    try:
        # Create new job
        job_data = {
            'jobDescription': 'Write a blog post about AI trends in 2024',
            'taskType': 'blog_post',
            'forwardTo': 'self'
        }
        
        job_response = requests.post(
            '/api/agent/new-job',
            json=job_data,
            headers=headers
        )
        job_response.raise_for_status()
        
        job_id = job_response.json()['jobId']
        
        # Poll for completion
        while True:
            status_response = requests.post(
                '/api/agent/check-job',
                json={'jobId': job_id},
                headers=headers
            )
            status_response.raise_for_status()
            
            status = status_response.json()['jobStatus']
            if status == 'completed':
                break
                
            time.sleep(2)
        
        # Collect results
        results_response = requests.post(
            '/api/agent/collect',
            json={'jobId': job_id},
            headers=headers
        )
        results_response.raise_for_status()
        
        print('Generated content:', results_response.json()['results'])
        
    except requests.exceptions.RequestException as e:
        print(f'Error: {e}')

Ready to Start Creating Content?

Subscribe with ESH tokens and unlock the full power of ContentAgent's AI content creation platform.