NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #4942 most downloaded on Packagist
A powerful PHP library for seamless integration with the GroqCloud API
Last release 1 months ago
25 Aug 2026
Ships unpredictably
gaps range from 9 days to 1.2 years
Nearly every release is documented
notes for 20 of 20 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
20 releases · first in 2024
Documents (RAG) & Citations restored: re-added the documents and citation_options Chat Completions parameters as pass-through forwarding, plus BuiltIn
documents and citation_options Chat Completions parameters as pass-through forwarding, plus BuiltInTools::document() and BuiltInTools::documentFromFile() helpers. These are valid API parameters; support is model-specific (the legacy RAG models llama-3.3-70b-versatile / llama-3.1-8b-instant were retired on 2026-08-16 for free/developer tiers, so current models reject documents with not supported with this model). The library forwards them as-is and lets the API enforce model support.disable_tool_validation parameter pass-through.url parameter (alternative to file) and fixed timestamp_granularities[] so each granularity is sent as a repeated multipart field (previously sent as a single array, which the API rejected). Both endpoints now accept either file or url.See the CHANGELOG for details.
One column per month.
Built-in Tools / Compound: use the current Compound system models ( compound-beta / compound-beta-mini ) instead of the deprecated groq/compound alias…
Patch correcting API contract mismatches found during live validation of v1.4.0.
compound-beta / compound-beta-mini) instead of the deprecated groq/compound alias.documents (RAG) and citation_options Chat Completions parameters: the live Groq API rejects them on all current models, so they were non-functional. compound_custom and search_settings remain.BuiltInToolsTest, ResponsesTest) are now mode-aware so they pass against both the offline mock (default) and the real API (GROQ_LIVE_TESTS=1).Full diff: v1.4.0...v1.4.1
Documentation refreshed and verified against console.groq.com/docs (model defaults, Vision, Reasoning, deprecated models, features).
Groq::responses()): OpenAI-compatible input/output model responses with streaming, structured outputs (text.format), and reasoning controls.LucianoTonet\GroqPHP\BuiltInTools helpers for compound_custom, plus documents, search_settings, and citation_options on Chat Completions (RAG & citations).Speech::sampleRate() and Speech::speed() fluent setters forwarded to the audio/speech endpoint.timestamp_granularities[] is now forwarded (Groq supports it with response_format=verbose_json).tests/MockRouter) so the suite runs with zero network/API credits; CI runs mocked by default with a nightly live job.Transcriptions docblock incorrectly claimed timestamp_granularities[] was unsupported.Full diff: v1.3.0...v1.4.0
Groq::responses()): OpenAI-compatible input/output model responses with streaming, structured outputs (text.format), and reasoning controls.LucianoTonet\GroqPHP\BuiltInTools helpers for compound_custom, plus documents, search_settings, and citation_options on Chat Completions (RAG & citations).Speech::sampleRate() and Speech::speed() fluent setters forwarded to the TTS API.timestamp_granularities[] in Transcriptions (Groq supports it with response_format=verbose_json).tests/MockRouter) so the suite runs without network or API credits; CI runs mocked by default with a nightly live job.console.groq.com/docs (model defaults, Vision, Reasoning, deprecated models, features).Transcriptions docblock incorrectly claimed timestamp_granularities[] was unsupported.🔄 Breaking Changes in Files/Batches Module
This release brings significant improvements to the Files/Batches module, including expanded support for batch processing of chat completions and audio operations.
New JSONL Format Requirements (Fixes #14)
{
"custom_id": "your-tracking-id",
"method": "POST",
"url": "/v1/chat/completions",
"body": {
"model": "llama-3.1-8b-instant",
"messages": [...]
}
}File Restrictions
.jsonl extension is now supported.json, .txt, .ndjsonUpdate your JSONL files:
custom_id fieldmethod to "POST"body objectSupported Endpoints:
/v1/chat/completions/v1/audio/transcriptions/v1/audio/translations{"custom_id": "chat-1", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "llama-3.1-8b-instant", "messages": [{"role": "user", "content": "Hello"}]}}
{"custom_id": "audio-1", "method": "POST", "url": "/v1/audio/transcriptions", "body": {"model": "whisper-large-v3", "language": "en", "url": "https://example.com/audio.wav"}}.jsonl only (removed support for .json, .txt, .ndjson)If you are using the Files/Batches module, you will need to:
custom_id: Your unique identifier for trackingmethod: Must be "POST"url: One of: /v1/chat/completions, /v1/audio/transcriptions, or /v1/audio/translationsbody: Request parameters matching the endpoint format.jsonl extensionRelease v1.2.0 - Fix JSONL format in batch processing tests
Release v1.2.0 - Fix JSONL format in batch processing tests
Text-to-Speech (TTS) API Integration
Speech class with a fluent interface for easy configurationspeech() method to the Audio classplayai-tts (English) and playai-tts-arabic (Arabic)model(): Set the TTS model to useinput(): Define text to convert to speechvoice(): Set voice identifier (e.g., "Bryan-PlayAI")responseFormat(): Define output format (default: "wav")create(): Returns audio content as streamsave($filePath): Saves audio directly to a file// Save audio to file
$result = $groq->audio()->speech()
->model('playai-tts')
->input('Hello, this text will be converted to speech')
->voice('Bryan-PlayAI')
->responseFormat('wav')
->save('output.wav');
// Get as stream (e.g., to send to browser)
$audioStream = $groq->audio()->speech()
->model('playai-tts')
->input('This is another example text')
->voice('Bryan-PlayAI')
->create();
header('Content-Type: audio/wav');
header('Content-Disposition: inline; filename="speech.wav"');
echo $audioStream;Updated README.md to include comprehensive documentation about the new TTS functionality.
examples/audio-speech.phpWhile we have made efforts to maintain backward compatibility, there are a few breaking changes to be aware of:
We are thrilled to announce the release of GroqPHP v1.0.0! 🎉
This marks a significant milestone as we celebrate our first anniversary. The initial commit was made on March 22, 2024, and after a year of development and iteration, we are proud to have reached 16,000+ downloads. This achievement is a testament to the growing adoption of our library in the PHP community.
The 1.0.0 release represents a stable, feature-rich offering that builds upon previous versions with several significant improvements:
One of the most significant additions in this release is comprehensive support for the Groq Files and Batch Processing APIs:
File Management: Seamlessly upload, list, retrieve, download, and delete JSONL files for batch processing
Batch Processing: Process large volumes of requests asynchronously
While we have made efforts to maintain backward compatibility, there are a few breaking changes to be aware of:
We extend our heartfelt thanks to all contributors who have made this release possible:
And to all users who have provided valuable feedback and suggestions through issues, including @zachary, @EliasPereirah, @flemzord, and @mmddev87.
As we move beyond v1.0.0, we remain committed to improving GroqPHP with new features, optimizations, and expanded model support. We encourage you to report issues and contribute to the project on GitHub.
Feat/files and batches by @lucianotonet in #11
Rewrite description
Fix - Update completions parameters & various update API by @lguichard in #9
Full Changelog: v0.0.10...v0.1.0
Enable to set API_KEY and BASE_URL via setOptions by @lucianotonet in #8
Full Changelog: v0.0.9...v0.0.10
Add Vision functionality for image analysis and examples:
Add Vision functionality for image analysis and examples:
Full Changelog: v0.0.8...v0.0.9
This release includes several enhancements and improvements to the Groq PHP package:
This release includes several enhancements and improvements to the Groq PHP package:
These updates aim to provide a more robust and user-friendly experience when working with the Groq API through this PHP package.
Full Changelog: v0.0.7...v0.0.8
23/07/2024 chore: Bump version to 0.0.7
19/07/2024 feat: Add speech-to-text transcription and translation features
04/07/2024 Merge pull request #4 from lucianotonet/versionfix
20/04/2024 Add examples folder + some improvements: - Add support for response streaming and JSON mode. - Improve error handling with more descriptive
30/03/2024 Add stream funcionality + some refactor
28/03/2024 Add some examples and improvements.
* 22/03/2024 First commit
Your coding agent can read these notes before it upgrades. Set up the MCP server →