Comprehensive guide to using ContentAgent's AI-powered content creation platform with Web3 technology.
ContentAgent uses ESH tokens from AgentDAO for payments. To get started:
Set up your account preferences for optimal content generation:
Use our 5 core MVP features to generate and manage your content:
ContentAgent uses API key authentication for secure access to our services.
Include your API key in the Authorization header of all requests:
Authorization: Bearer YOUR_API_KEYFor subscription management and token payments, use Web3 wallet authentication:
Wallet Address: 0x1234...5678 Signature: 0xabcd...efgh Message: "Authenticate with ContentAgent"POST /api/agent/new-job
Create a new content generation job
{
"apiKey": "your-api-key",
"jobDescription": "Create a blog post about AI trends",
"taskType": "blog_post",
"forwardTo": "self"
}{
"success": true,
"jobId": "job_123456789",
"status": "pending"
}GET /api/agent/check-job
Check the status of a content generation job
{
"apiKey": "your-api-key",
"jobId": "job_123456789"
}{
"success": true,
"jobStatus": "completed",
"progress": 100
}POST /api/agent/collect
Retrieve completed content from a job
{
"apiKey": "your-api-key",
"jobId": "job_123456789"
}{
"success": true,
"results": {
"deliverableContents": [
{
"taskType": "blogPost",
"deliverableContent": {
"title": "AI Trends in 2024",
"content": "Full blog post content...",
"seoKeywords": ["AI", "trends", "2024"]
}
}
]
}
}ContentAgent supports multiple content types, each optimized for specific use cases and platforms.
AI-generated blog content with SEO optimization
Professional press releases for announcements
Engaging social media content for all platforms
AI-generated logo designs and branding
Check your API key and ensure it's valid and has sufficient permissions.
Complex jobs may take longer. Implement proper polling with exponential backoff.
Ensure you have enough ESH tokens in your wallet for content generation.
Provide more detailed job descriptions and specify your brand voice preferences.
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);
}
}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}')Subscribe with ESH tokens and unlock the full power of ContentAgent's AI content creation platform.