Obiguard provides a robust and secure gateway to facilitate the integration of various Large Language Models (LLMs) into your applications,
including Groq APIs.
With Obiguard, you can take advantage of features like fast AI gateway access, observability, prompt management, and more,
all while ensuring the secure management of your LLM API keys through a virtual key system.
To use Groq with Obiguard, get your API key from here, then add it to Obiguard to create the virtual key.
Copy
from obiguard import Obiguardclient = Obiguard( obiguard_api_key="sk-obg***", # Your Obiguard API key virtual_key="VIRTUAL_KEY" # Replace with your virtual key for Groq)
Copy
from obiguard import Obiguardclient = Obiguard( obiguard_api_key="sk-obg***", # Your Obiguard API key virtual_key="VIRTUAL_KEY" # Replace with your virtual key for Groq)
Tool calling feature lets models trigger external tools based on conversation context.
You define available functions, the model chooses when to use them, and your application executes them and returns results.
Obiguard supports Groq Tool Calling and makes it interoperable across multiple providers.
OpenAI’s Audio API converts speech to text using the Whisper model. It offers transcription in the original language and translation to English,
supporting multiple file formats and languages with high accuracy.
Groq’s Text to Speech (TTS) API converts written text into natural-sounding audio using six distinct voices.
It supports multiple languages, streaming capabilities, and various audio formats for different use cases.
Python
Copy
from pathlib import Pathspeech_file_path = Path(__file__).parent / "speech.mp3"response = client.audio.speech.create( model="playai-tts", voice="Fritz-PlayAI", input="Today is a wonderful day to build something people love!")with open(speech_file_path, "wb") as f: f.write(response.content)
Python
Copy
from pathlib import Pathspeech_file_path = Path(__file__).parent / "speech.mp3"response = client.audio.speech.create( model="playai-tts", voice="Fritz-PlayAI", input="Today is a wonderful day to build something people love!")with open(speech_file_path, "wb") as f: f.write(response.content)
REST
Copy
curl -X POST "https://gateway.obiguard.ai/v1/audio/speech" \ -H "x-obiguard-api-key: $OBIGUARD_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "playai-tts", "voice": "Fritz-PlayAI", "input": "Today is a wonderful day to build something people love!" }' \ --output speech.mp3