Free.ai WordPress Plugin
AI tools for WordPress. Content generation, images, and more.
Free.ai za WordPress
Dodajte UI-powered content generation, image creation, text-to-speech, and translation directly to your WordPress site using shortcodes and our REST API.
Brzo pokretanje
Najbrži način dodavanja UI na vašu WordPress stranicu. Zalijepite ovo na bilo koju stranicu, post ili widget koristeći HTML editor:
<script src="https://free.ai/widget.js" data-tool="chat"></script>
Ovo dodaje UI chat sučelje na vašu stranicu. Pogledajte Widget stranicu za sve dostupne alate.
Prilagođeni kratak kod (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' => 'qwen2.5-72b'], $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');
Onda ga koristite u bilo kojem postu ili stranici:
[freeai prompt="Write a 100-word product description for organic coffee"]
WordPress
- Automatski generiraj SEO meta opise za postove
- UI-powered image generation for featured images
- Automatski prevodi članke na više jezika
- Dodaj audio tekst-u-govor člancima
- UI chatbot za podršku posjetiocima
- Sažetak sadržaja za dugoformne članke