Language Guide · Python
Manage AI Prompts in Python
No SDK required. One HTTP call.
Fetch versioned, variable-interpolated AI prompts from Python using requests. Works with any AI provider — OpenAI, Anthropic, Google, or your own models.
Code Example
One function. Any AI provider.
Fetch a versioned, interpolated prompt from PromptForge with a single HTTP call. The returned content string passes directly to your AI SDK — no transformation, no adapter, no extra library.
- 1Fetch a versioned prompt by ID with your variable values.
- 2Receive the fully rendered content string in the response.
- 3Pass it directly to your AI provider SDK as the system prompt.
import requests
response = requests.get(
"https://www.promptforge-app.com/api/v1/prompts/YOUR_PROMPT_ID",
headers={"Authorization": "Bearer YOUR_API_KEY"},
params={
"_version": "latest",
"role": "developer",
"task": "review code",
},
)
content = response.json()["content"]
# Pass to any AI SDK
# client.chat.completions.create(
# model="gpt-4o",
# messages=[{"role": "system", "content": content}]
# )Why Python teams choose PromptForge
Designed for developers who want control without complexity.
Works with every Python AI SDK
The API returns a plain string. Pass it directly to openai, anthropic, google-generativeai, or any other SDK — no adapter needed.
Decouple prompts from your codebase
Update a prompt in the dashboard and the change is live on the next request. No redeployment, no PR, no waiting.
Version-pin for production stability
Use ?_version=stable in production (only changes when you promote), ?_version=latest in staging (always the newest), or pin to an exact number like ?_version=3. Promote any version to stable in one click from the History tab.
Integrate in 4 steps
From zero to fetching your first versioned prompt in under 10 minutes. No framework setup, no SDK installation — just HTTP.
- 1
Create a prompt with variables
Open the dashboard, click New Prompt, and write your system prompt using {{variable}} placeholders for any dynamic values.
- 2
Copy your prompt ID
Your prompt ID appears in the URL bar when editing: /dashboard/prompts/YOUR_PROMPT_ID. The API Usage panel also shows it with pre-filled curl examples.
- 3
Generate an API key
Go to the API settings page and click Generate Key. Store it as an environment variable — never commit it to source.
- 4
Fetch at runtime with requests
Call the endpoint with requests.get(), pass the returned content string to your AI provider, and you are done. No new dependencies beyond what you likely already have.
Teams building AI features in Python
Python teams at startups and enterprises use PromptForge to manage the system prompts powering their AI assistants, code review tools, and data pipelines. When the AI product team tweaks a prompt, it goes live immediately — no engineer involvement required.
Start Free TrialStart for free, upgrade anytime
No credit card required to get started. Paid plans include a 14-day free trial.
- 1 Production Prompt
- 1,000 API Requests/mo
- Stable/Latest Channel Routing
- No Credit Card Required
No charge until your trial ends
- 10k API requests/month
- 5 prompt
- Unlimited versions
- Dynamic variables
- Version pinning
- API key management
No charge until your trial ends
- 100k API requests/month
- 25 prompt
- Unlimited versions
- Dynamic variables
- Version pinning
- API key management
No charge until your trial ends
- 500k API requests/month
- 100 prompt
- Unlimited versions
- Dynamic variables
- Version pinning
- API key management
Questions? Contact us