← All integrations

Integration · DeepSeek

Manage DeepSeek Prompt Templates Externally

DeepSeek V4 uses an OpenAI-compatible API at api.deepseek.com. Version your system prompts in PromptForge, fetch them at runtime, and pass them to deepseek-v4-flash without redeploying your app.

Integration Example

PromptForge + DeepSeek in one file

Version, template, and serve DeepSeek prompts via REST API. Manage system prompts for deepseek-v4-flash and deepseek-v4-pro in PromptForge, toggle thinking mode in code while your instructional text stays versioned and out of source control.

  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 DeepSeek 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.
integration.ts
TypeScript
import OpenAI from "openai";

const deepseek = new OpenAI({
  apiKey: process.env.DEEPSEEK_API_KEY,
  baseURL: "https://api.deepseek.com",
});

async function fetchPrompt(task: string, output_format: 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: "latest",
        variables: { task, output_format },
      }),
    }
  );
  const { content } = await res.json();
  return content as string;
}

// Prompt template in PromptForge (e.g.):
//   You are a {{task}} assistant. Format output as {{output_format}}.
// 1. Fetch your versioned system prompt with dynamic variables
const content = await fetchPrompt("code_review", "markdown_bullets");

// 2. Pass to DeepSeek V4 Flash via the OpenAI-compatible SDK
//    Enable thinking mode in code; the system prompt stays in PromptForge
const completion = await deepseek.chat.completions.create({
  model: "deepseek-v4-flash",
  messages: [
    { role: "system", content },
    { role: "user", content: "Review this TypeScript function for edge cases." },
  ],
  // @ts-expect-error DeepSeek V4 thinking parameter
  thinking: { type: "enabled" },
  reasoning_effort: "high",
});

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

DeepSeek + PromptForge in Three Steps

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

Step 1

Write your DeepSeek system prompt template

DeepSeek accepts a standard system role in the messages array. Create your prompt in PromptForge with {{task}}, {{output_format}}, or {{language}} variables. One template works across deepseek-v4-flash and deepseek-v4-pro.

Step 2

Version prompt changes separately from model params

Thinking mode, reasoning_effort, and temperature live in your API call. The instructional system text lives in PromptForge with full diff history. Tune wording without touching SDK configuration, or flip thinking mode without redeploying prompt text.

Step 3

Fetch and inject via the OpenAI SDK

Point the OpenAI client at https://api.deepseek.com with your DeepSeek API key. Fetch the interpolated prompt from PromptForge once per request (or cache it briefly) and pass it as the system message. Update the prompt in the dashboard; production picks it up on the next fetch.

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

DeepSeek + PromptForge: Common Questions

Specific answers for developers integrating PromptForge with DeepSeek.

How do I use PromptForge with DeepSeek V4 thinking mode?

Thinking mode is a request parameter on deepseek-v4-flash and deepseek-v4-pro, not a separate model ID. Legacy IDs deepseek-chat and deepseek-reasoner map to V4 Flash modes today but retire on 2026-07-24 per DeepSeek's API docs. Store the system prompt that guides reasoning behaviour in PromptForge. Enable thinking with thinking: { type: 'enabled' } and reasoning_effort: 'high' or 'max' in your SDK call. The prompt text and the reasoning toggle are independent concerns.

Does PromptForge work with DeepSeek's Anthropic-compatible endpoint?

Yes. DeepSeek exposes an Anthropic Messages API at https://api.deepseek.com/anthropic using the same API key. Fetch the system prompt from PromptForge as plain text, then pass it to anthropic.messages.create({ system: content }) with ANTHROPIC_BASE_URL set to DeepSeek's endpoint. PromptForge returns the same string regardless of which SDK surface you call.

Can I manage prompts for DeepSeek R1 and V4 separately?

Yes. Create separate PromptForge prompts per model tier, for example deepseek-v4-flash-triage and deepseek-v4-pro-analyst. V4 Flash is tuned for speed; V4 Pro handles longer, more complex instructions. Each has its own version history so you can promote the best-performing prompt per model without cross-contamination.

How do I handle DeepSeek streaming with PromptForge-managed prompts?

The PromptForge fetch completes before the DeepSeek request starts. Retrieve the system prompt, then call deepseek.chat.completions.create with stream: true exactly as you would with OpenAI. PromptForge adds a single HTTPS round trip (typically under 50 ms). It does not sit in the streaming path.