lucianotonet/groq-php
A PHP SDK for the GroqCloud API that lets developers add fast LLM inference to any PHP app, with chat completions, tool calling, vision, reasoning, audio transcription, text-to-speech, batch processing, and RAG support.
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.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 supported.BuiltInToolsTest, ResponsesTest) are now mode-aware so they pass both against the offline mock (default) and the real API (GROQ_LIVE_TESTS=1).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..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 extensionHow can I help you explore Laravel packages today?