Developers

Build with Simplicity.

One endpoint. Two models. Streaming by default. The whole API is a messages array and a model id — intelligence without the integration overhead.

route.ts
// app/api/chat/route.ts
import Groq from "groq-sdk"

const groq = new Groq({ apiKey: process.env.GROQ_API_KEY })

export async function POST(req: Request) {
  const { messages, model } = await req.json()

  const stream = await groq.chat.completions.create({
    model,                 // "a1" → fast · "r1" → reasoning
    messages,
    stream: true,
  })

  // pipe the stream straight back to the client
  return new Response(toReadable(stream))
}

Everything you need, nothing you don't.

Streaming first

Token-by-token responses over a standard stream. Low latency, no polling.

OpenAI-compatible

Drop-in chat completions shape. Reuse the clients and tooling you already have.

Multi-format output

Ask for flowcharts, 2D SVG illustrations, or 3D models — rendered client-side.

Pick your tradeoff

A1 for speed, R1 for frontier reasoning with adjustable effort.

Keys stay server-side

Calls run through your backend. Your API key is never exposed to the browser.

Tiny surface area

One endpoint, a messages array, and a model id. That's the whole API.