Pricing
from $0.01 / 1,000 results
DocsForAI Social Buddy
Under maintenanceDocsForAI Social Buddy
Pricing
from $0.01 / 1,000 results
Rating
0.0
(0)
Developer
Actor stats
0
Bookmarked
2
Total users
0
Monthly active users
6 months ago
Last modified
Categories
Share
๐ Social Media Post Generator (DocsForAI)
Transform your blog posts and tutorials into engaging X (Twitter) posts with AI-generated images!
This Apify Actor uses Google Gemini AI to create compelling social media content and Flux.2 to generate eye-catching visuals from your markdown content. Perfect for developers, technical writers, and content creators who want to promote their work on social media.
Built with:
- ๐ค Google Gemini 2.5 Pro for content generation
- ๐จ Flux.2 dev model for image generation
- ๐ฆ X (Twitter) API v2 for auto-posting
- โก Apify SDK for Python
โจ Features
- ๐ค AI-Powered Content Generation - Uses Google Gemini 2.5 Pro to create engaging posts (max 240 characters)
- ๐จ AI Image Generation - Creates professional visuals using Flux.2 dev model
- ๐ฆ Auto-Post to X (Twitter) - Optionally publishes your content directly to X with images
- ๐ฐ Pay-Per-Event Pricing - Flexible monetization with charges for post generation, image creation, and X posting
- ๐ Structured Output - Saves results to dataset with base64 images for easy viewing
- ๐ Secure Credentials - API keys stored securely as secrets
๐ How it works
- Input: Provide your markdown blog/tutorial content
- AI Analysis: Gemini AI analyzes the content and creates:
- A compelling X post (strictly under 240 characters)
- A detailed image generation prompt
- Image Generation: Flux.2 creates a professional image based on the prompt
- Storage: Saves the post content and image to Apify's dataset and key-value store
- Publishing (Optional): Posts to X (Twitter) with the generated image
๐ฅ Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
markdownContent | string | โ Yes | Your blog or tutorial content in markdown format |
postToX | boolean | โ No | Enable automatic posting to X (Twitter). Default: false |
xApiKey | string | โ ๏ธ If posting | Your X API Key (Consumer Key) |
xApiSecretKey | string | โ ๏ธ If posting | Your X API Secret Key (Consumer Secret) |
xAccessToken | string | โ ๏ธ If posting | Your X Access Token |
xAccessTokenSecret | string | โ ๏ธ If posting | Your X Access Token Secret |
๐ค Output
The Actor outputs a dataset with the following fields:
postContent- Generated X post text (max 240 chars)imageBase64- Base64-encoded image for displayimageUrl- URL to the image in key-value storeimageKey- Unique UUID filename of the imagemarkdownPreview- First 200 characters of source contenttweetUrl- Direct link to posted tweet (ifpostToXenabled)tweetId- X post ID (if posted)posted- Boolean indicating if posting succeeded
๐ต Pricing
This Actor uses pay-per-event pricing:
- Post Generation: $0.10 per post
- Image Generation: $0.10 per image
- X Posting: $0.10 per post (when enabled)
Total per run: $0.20 (without X posting) or $0.30 (with X posting)
๐ Getting X API Credentials
To enable posting to X:
- Go to developer.x.com
- Create a new app or use an existing one
- Navigate to your app's "Keys and tokens" section
- Generate and copy:
- API Key (Consumer Key)
- API Secret Key (Consumer Secret)
- Access Token
- Access Token Secret
- Ensure your app has Read and Write permissions
๐งช Testing Locally
Basic Test (Without X Posting)
# Install dependenciesuv pip install-r requirements.txt# Run the Actorapify run
Test with X Posting
- Update
storage/key_value_stores/default/INPUT.json:
{"markdownContent":"# Your Blog Title\n\nYour content here...","postToX":true,"xApiKey":"your_api_key","xApiSecretKey":"your_api_secret","xAccessToken":"your_access_token","xAccessTokenSecret":"your_access_token_secret"}
- Run:
$apify run
Test Pay-Per-Event Charging
$ACTOR_TEST_PAY_PER_EVENT=true apify run
This logs charging events to storage/datasets/charging-log/
๐ Example Usage
Input Example
{"markdownContent":"# Getting Started with Web Scraping\n\nLearn how to build powerful web scrapers...","postToX":false}
Output Example
{"postContent":"๐ New tutorial: Master web scraping with Python! Learn to extract data at scale, monitor competitors & build ML datasets. Perfect for beginners! #WebScraping #Python #DataScience","imageBase64":"iVBORw0KGgoAAAANSUhEUgAA...","imageUrl":"https://api.apify.com/v2/key-value-stores/abc123/records/uuid.png","imageKey":"550e8400-e29b-41d4-a716-446655440000.png","markdownPreview":"# Getting Started with Web Scraping\n\nWeb scraping is the process of extracting data from websites automatically...","tweetUrl":null,"tweetId":null,"posted":false}
๐ Check Results
After running:
# View the outputcat storage/datasets/default/000000001.json | jq# Find generated imagesls storage/key_value_stores/default/*.png# View post content onlycat storage/datasets/default/000000001.json | jq '.postContent'
๐ Deploy to Apify
Method 1: Connect Git Repository
- Go to Actor creation page
- Click on Link Git Repository button
- Connect your GitHub repository
- Configure pay-per-event pricing in Actor settings:
- Event:
post-generationโ Price: $0.10 - Event:
image-generationโ Price: $0.10 - Event:
x-postโ Price: $0.10
- Event:
Method 2: Push from Local Machine
-
Login to Apify:
$apify login -
Deploy your Actor:
$apify push -
Configure Pricing in the Apify Console:
- Go to your Actor โ Settings โ Monetization
- Select "Pay-per-event" pricing model
- Add the three events with their prices
After Deployment
The Actor will be available at: https://console.apify.com/actors/<your-actor-id>
Users can run it via:
- Apify Console UI
- Apify API
- Apify Client
๐ง Dependencies
apify- Apify SDK for Pythonrequests- HTTP library for API callsgoogle-genai- Google Gemini AI SDKtweepy- X (Twitter) API clientcrawlee- Web scraping framework
๐ Documentation & Resources
Actor-Specific
Apify Platform
โ ๏ธ Important Notes
- Character Limit: Posts are strictly limited to 240 characters for X compatibility
- X API Access: Requires X Developer account with Elevated access to post tweets
- Rate Limits: Be mindful of X API rate limits when posting frequently
- Credentials Security: All API keys are marked as secrets in the input schema
- Local Testing: Charging events are logged but not processed when running locally
๐ค Contributing
Feel free to submit issues, create pull requests, or suggest improvements!
๐ License
This Actor is provided as-is under the Apify platform terms.
