Getting Started
Create your first prompt and make your first API call in under 5 minutes.
Getting Started
This guide walks you through creating an account, writing your first prompt, generating an API key, and fetching the prompt from your application. You'll be up and running in under 5 minutes.
Step 1: Create an account
- Go to fetchprompt.com/sign-up and sign up with your email address.
- Verify your email with the 6-digit code sent to your inbox.
- You'll be prompted to create your first organization. Organizations are how FetchPrompt groups prompts, API keys, and team members together.
Once your organization is created, you'll land on the Prompts dashboard.
Step 2: Create a prompt
- From the sidebar, click Prompts (it should already be selected).
- Click the Create Prompt button in the top right.
- Enter a name for your prompt — for example,
Customer Support Bot. - A URL-friendly slug is auto-generated (e.g.,
customer-support-bot). This is what you'll use in API calls. - Select the Stage environment (selected by default).
- Click Create.
You'll be taken to the prompt editor. Write your prompt content:
You are a helpful customer support agent for {{company_name}}.
The customer's name is {{user_name}}.
Respond in a {{tone}} tone. Be concise and helpful.The editor automatically detects {{variable}} placeholders and displays them as badges below the editor. You'll also see a live token count.
Click Save to save your prompt. Every save creates a new version with an immutable snapshot.
Step 3: Generate an API key
- From the sidebar, click API Keys.
- Click Create API Key.
- Give it a name (e.g.,
Development Key) and select the Stage environment. - Click Create.
Your API key will be displayed once. Copy it immediately and store it securely — you won't be able to see the full key again.
API keys follow this format:
- Stage:
fp_stage_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - Production:
fp_prod_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The key prefix determines which environment's prompts are returned when you make API calls.
Step 4: Fetch your prompt
Now use the API key to fetch your prompt. Replace YOUR_API_KEY with the key you copied:
The API returns:
{
"slug": "customer-support-bot",
"name": "Customer Support Bot",
"content": "You are a helpful customer support agent for Acme.\nThe customer's name is Sarah.\nRespond in a friendly tone. Be concise and helpful.",
"version": 1,
"environment": "stage"
}Variables (company_name, user_name, tone) are automatically replaced with the values you pass.
Step 5: Integrate into your application
Here's a real-world example — using FetchPrompt with an AI SDK to generate a response:
// Fetch the prompt from FetchPrompt
const promptResponse = await fetch(
`https://www.fetchprompt.com/api/v1/prompts/customer-support-bot?company_name=Acme&user_name=${userName}&tone=friendly`,
{
headers: { Authorization: `Bearer ${process.env.FETCHPROMPT_API_KEY}` },
}
);
const { content } = await promptResponse.json();
// Use the prompt with your AI provider
const aiResponse = await openai.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "system", content }],
});Now you can update the prompt in the FetchPrompt dashboard without changing any application code.
What's next?
- Prompts — Learn about prompt creation, editing, and the slug system.
- Variables — Deep dive into the
{{variable}}template syntax. - Environments — Understand Stage vs Production and how to promote prompts.
- API Reference — Complete API documentation with all endpoints.
- Versioning — Learn about version history, snapshots, and rollbacks.