← All integrations

Integration · Groq

Manage Groq Prompt Templates Externally

Groq delivers sub-second inference. Don't slow it down with hardcoded prompts. PromptForge serves versioned prompts in milliseconds so Groq can do the rest.

Integration Example

PromptForge + Groq in one file

Version, template, and serve Groq prompts via REST API. Manage system prompts for Llama 3.3, DeepSeek, and Gemma on Groq hardware in PromptForge, update live at the speed Groq runs inference.

  1. 1
  2. Fetch your versioned, interpolated prompt from the PromptForge REST API with a single fetch() call.
  3. 2
  4. Pass the returned content string directly to the Groq SDK as the system prompt, no transformation needed.
  5. 3
  6. Update the prompt in the PromptForge dashboard anytime, running applications pick up the change on the next request. No redeployment required.
groq-integration.ts
TypeScript
import Groq from "groq-sdk";

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

async function fetchPrompt(subject: string, difficulty: string) {
  const res = await fetch(
    "https://www.promptforge-app.com/api/v1/prompts/your-prompt-id",
    {
      method: "POST",
      headers: {
        Authorization: "Bearer pfk_your_api_key",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        version: "stable",
        variables: { subject, difficulty },
      }),
    }
  );
  const { content } = await res.json();
  return content as string;
}

// 1. Fetch your prompt template with dynamic variables
const content = await fetchPrompt("mathematics", "advanced");

// 2. Run inference on Groq hardware — sub-second latency
const completion = await groq.chat.completions.create({
  model: "llama-3.3-70b-versatile",
  messages: [
    { role: "system", content },
    { role: "user", content: "Solve this calculus problem step by step." },
  ],
});

console.log(completion.choices[0].message.content);
How It Works

Groq + PromptForge in Three Steps

Add a prompt management layer to your Groq integration without refactoring your application.

Step 1

Write your Groq system prompt template

Groq's API is OpenAI-compatible. Write your system prompt in PromptForge with {{subject}}, {{difficulty}}, or {{output_format}} variables.

Step 2

Version as you experiment with models

Groq offers Llama 3.3, DeepSeek R1, Gemma 2, and Mixtral. PromptForge lets you maintain a version history per model and switch between versions instantly.

Step 3

Fetch once, benefit at inference speed

Call PromptForge at request time, then pass the result to groq.chat.completions.create. Cache the PromptForge response in memory for a short TTL to keep latency in single-digit milliseconds.

Features

Powerful Prompt Management Features for AI Developers

From simple prompt storage to production-ready APIs with version control, dynamic variables, rollback, and a public gallery.

Dynamic Variables

Use {{variable}} syntax to create reusable prompt templates. Pass different values via API for endless customization across any LLM.

Instant Prompt API

RESTful API endpoint ready in seconds. Fetch any prompt with version pinning and variable interpolation. No redeployment needed.

Rollback with Diff Checker

View a line-by-line diff of every change and roll back to any previous version in one click. Never lose a working prompt again.

Publish to Gallery

Share your best prompts with the community in the public gallery. Get discovered by other developers and grow your personal library.

Start for free, upgrade anytime

No credit card required to get started. Paid plans include a 14-day free trial.

Developer Sandbox
Hobby Plan
$0/ forever
  • 1 Production Prompt
  • 1,000 API Requests/mo
  • Stable/Latest Channel Routing
  • No Credit Card Required
Launch Sandbox
Starter
14-day free trial
$9/month

No charge until your trial ends

  • 10k API requests/month
  • 5 prompt
  • Unlimited versions
  • Dynamic variables
  • Version pinning
  • API key management
Start 14-Day Free Trial
Most Popular
Pro
14-day free trial
$29/month

No charge until your trial ends

  • 100k API requests/month
  • 25 prompt
  • Unlimited versions
  • Dynamic variables
  • Version pinning
  • API key management
Start 14-Day Free Trial
Business
14-day free trial
$49/month

No charge until your trial ends

  • 500k API requests/month
  • 100 prompt
  • Unlimited versions
  • Dynamic variables
  • Version pinning
  • API key management
Start 14-Day Free Trial

Questions? Contact us

FAQ

Groq + PromptForge: Common Questions

Specific answers for developers integrating PromptForge with Groq.

How do I take full advantage of Groq's sub-second response times with PromptForge?

Cache the prompt response in-process with a 60-second TTL so you only hit PromptForge once per cache window rather than once per user request.

Can I switch models on Groq without updating my application code?

Yes. The model string is configuration in your app. If the new model requires prompt adjustments, create a new version in PromptForge alongside the model config change.

Does PromptForge work with Groq's tool calling (function calling)?

Yes. Store the system message that instructs the model when and how to use tools in PromptForge, and include your tools array separately in the API call.

How do I handle Groq's rate limits when using PromptForge in production?

Cache the prompt response server-side and refresh it every 30–300 seconds depending on how frequently you update prompts.