Free.ai WordPress Plugin
AI tools for WordPress. Content generation, images, and more.
Free.ai لـ Wordpress
أضف إنتاج المحتوى المدعوم بالذكاء الاصطناعي، وإنشاء الصور، والنص إلى الكلام، والترجمة مباشرة إلى موقعك على ووردبريس باستخدام الرموز القصيرة وبرنامجنا لواجهة برمجة التطبيقات REST API.
البداية السريعة:
أسرع طريقة لإضافة الذكاء الاصطناعي إلى موقعك على ووردبريس. لصق هذا في أي صفحة، أو مشاركة، أو أداة باستخدام محرر HTML:
<script src="https://free.ai/widget.js" data-tool="chat"></script>
هذا يضيفُ واجهة محادثة AI إلى صفحتك. انظر إلى Widget page لجميع الأدوات المتاحة.
رمز قصير عادي (PHP)
Create a WordPress shortcode that calls the Free.ai API. Add this to your theme's functions.php:
function freeai_generate($atts) {
$atts = shortcode_atts(['prompt' => '', 'model' => 'qwen7b'], $atts);
$response = wp_remote_post('https://api.free.ai/v1/chat/completions', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
'Content-Type' => 'application/json',
],
'body' => json_encode([
'model' => $atts['model'],
'messages' => [['role' => 'user', 'content' => $atts['prompt']]],
]),
]);
if (is_wp_error($response)) return 'Error generating content.';
$body = json_decode(wp_remote_retrieve_body($response), true);
return '<div class="freeai-output">' .
esc_html($body['choices'][0]['message']['content'] ?? '') .
'</div>';
}
add_shortcode('freeai', 'freeai_generate');
ثم استخدمه في أي وظيفة أو صفحة:
[freeai prompt="Write a 100-word product description for organic coffee"]
حالات الاستخدام
- توليد أوصاف الوظائف المتعلقة بتحسين محركات البحث آليا
- توليد الصور بواسطة الذكاء الاصطناعي للصور المميزة
- ترجمة الوظائف إلى لغات متعددة تلقائيا
- إضافة النص إلى الكلام الصوتية إلى المقالات
- دعم الزوار بواسطة الذكاء الاصطناعي
- ملخصات المحتويات للمقالات الطويلة