Interactive AI Model Explorer
Want to calculate your exact parameters and operational expenses? Run the calculations locally inside your browser.
Launch AI Model Explorer1. Instant Testing via curl (Command Line)
The fastest way to verify an API key and measure raw endpoint latency:
2. Measuring Time to First Token (TTFT)
In conversational apps, TTFT determines perceived snappiness. You can benchmark TTFT with this lightweight Python evaluation script:
```python import time, os from groq import Groq
client = Groq(api_key=os.environ.get("GROQ_API_KEY"))
start_time = time.perf_counter() stream = client.chat.completions.create( model="llama-3.3-70b-versatile", messages=[{"role": "user", "content": "Count from 1 to 10."}], stream=True )
first_token_time = None tokens = 0
for chunk in stream: if first_token_time is None and chunk.choices[0].delta.content: first_token_time = time.perf_counter() - start_time tokens += 1
total_time = time.perf_counter() - start_time print(f"Time to First Token (TTFT): {first_token_time * 1000:.1f}ms") print(f"Total Tokens: {tokens} | Throughput: {tokens / total_time:.1f} tokens/sec") ```
Frequently Asked Questions
What is a good TTFT for an LLM API?
A TTFT under 250ms is considered excellent for interactive chat. Groq consistently benchmarks between 120ms and 180ms.
Can I test API rate limits automatically?
Yes, but be careful not to trigger temporary account suspensions. Use scripts that send requests with small incremental delays.