github xtekky/gpt4free 0.5.6.0
g4f v0.5.6.0

latest releases: 0.6.2.8, 0.6.2.7, 0.6.2.6...
2 months ago

🧙‍♂️ Using GPT4Free.js

Use the official JS client right in the browser—no backend needed:

<script type="module">
    import Client from 'https://g4f.dev/dist/js/client.js';

    const client = new Client();
    const result = await client.chat.completions.create({
        model: 'gpt-4.1',  // Or "gpt-4o", "deepseek-v3"
        messages: [{ role: 'user', content: 'Explain quantum computing' }]
    });
    console.log(result.choices[0].message.content);
</script>
  • You can call .images.generate({ ... }) in JS too, just like Python!

See more JS client usage →

💻 Using CLI Client

$ g4f "Explain quantum computing"

CLI Client documentation →

Full Changelog: 0.5.5.7...0.5.6.0

Don't miss a new gpt4free release

NewReleases is sending notifications on new releases.