For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordPlatform
DocumentationIntegrationsAPI referenceSDKsChangelog
DocumentationIntegrationsAPI referenceSDKsChangelog
  • Get started
    • Overview
    • Trace your first call
    • Run your first eval
    • Use gateway & prompts
    • Live demo
  • Features
      • Create prompts
      • Use prompts
      • Playground
    • Users
  • Admin
    • API keys
    • Provider keys
    • Workspaces & projects
    • Collaborate
  • Resources
  • Security & Support
    • Support
    • Status
LogoLogo
DiscordPlatform
On this page
  • What is prompt management?
  • Prerequisites
  • Create your first prompt
  • Use your prompt in code
  • Monitor your prompts
  • Next steps
FeaturesPrompt management

Create prompts

Create, configure, version, and deploy prompt templates.
Was this page helpful?
Previous

Use prompts

Prompt schema, variables, composition, structured output, and deployment options for prompt templates.
Next
Built with
Set up Respan
  1. Sign up — Create an account at platform.respan.ai
  2. Create an API key — Generate one on the API keys page
  3. Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page
Use AI

Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.

1{
2 "mcpServers": {
3 "respan-docs": {
4 "url": "https://mcp.respan.ai/mcp/docs"
5 }
6 }
7}

What is prompt management?

Prompt management lets you create, version, and deploy prompt templates centrally — instead of hardcoding prompts in your application, reference them by ID.

1response = client.chat.completions.create(
2 model="gpt-4o-mini",
3 messages=[
4 {
5 "role": "system",
6 "content": "You are a helpful customer support agent for TechCorp."
7 },
8 {
9 "role": "user",
10 "content": f"Customer {customer_name} is asking about {issue_type}"
11 }
12 ]
13)

Prerequisites

Before you begin, make sure you have:

  1. Respan API key — get one from the API keys page. See API keys for details.
  2. LLM provider key — add your provider credentials (e.g. OpenAI) on the Providers page. See LLM provider keys for details.

Create your first prompt

1

Create a new prompt

Go to the Prompts page and click Create new prompt. Name your prompt and add a description.

Create new prompt
2

Configure the prompt

In the Editor tab, set parameters like model, temperature, max tokens, and top P in the right sidebar.

Configure prompt
3

Write content with variables

Click + Add message to add messages. Use {{variable_name}} for dynamic content — see Variables for Jinja templates, JSON inputs, and more.

Please develop an optimized Python function to {{task_description}},
utilizing {{specific_library}}, include error handling, and write unit tests.

Variable names must use underscores: {{task_description}} not {{task description}}.

Prompt with variables
4

Test and commit

  1. Add values for each variable in the Variables tab.
  2. Click Run to test.
  3. Click Commit and write a commit message to save this version.

Avoid “Commit + deploy” unless you want changes to go live immediately.

Commit prompt
5

Deploy to production

Go to the Deployments tab and click Deploy. See Deployment & versioning for version pinning, rollbacks, and overrides.

Deploying immediately affects production. All API calls using this prompt will use the new version right away.

Deploy prompt

Use your prompt in code

Find the Prompt ID in the Overview panel on the Prompts page.

Find Prompt ID

Then call it from your application using prompt schema v2 (recommended):

OpenAI SDKs strip v2 fields like schema_version and patch. Prompt schema v2 requires raw HTTP requests.

1import requests
2
3headers = {
4 'Content-Type': 'application/json',
5 'Authorization': 'Bearer YOUR_RESPAN_API_KEY',
6}
7
8data = {
9 'prompt': {
10 'prompt_id': 'YOUR_PROMPT_ID',
11 'schema_version': 2,
12 'variables': {
13 'task_description': 'Square a number',
14 'specific_library': 'math'
15 }
16 }
17}
18
19response = requests.post(
20 'https://api.respan.ai/api/chat/completions',
21 headers=headers,
22 json=data
23)
24print(response.json())

You don’t need model and messages — the prompt configuration is used automatically.

Legacy prompt schema v1 (default)

With v1, use override: true to let the prompt config win over request-body parameters. This is the default when schema_version is omitted.

1response = client.chat.completions.create(
2 model="gpt-4o-mini",
3 messages=[{"role": "user", "content": "placeholder"}],
4 extra_body={
5 "prompt": {
6 "prompt_id": "YOUR_PROMPT_ID",
7 "variables": {
8 "task_description": "Square a number",
9 "specific_library": "math"
10 },
11 "override": True
12 }
13 }
14)

See Prompt merge modes (v1 vs v2) for full details.


Monitor your prompts

Filter logs by prompt name on the Logs page to track usage, response times, and token consumption. See Prompt logging for logging setup.

Monitor prompts

Next steps

  • Variables — Jinja templates, conditionals, and JSON inputs
  • JSON schema — structured output for consistent response formats
  • Prompt composition — reference prompts inside other prompts
  • Prompt merge modes (v1 vs v2) — control how prompt config and request params are merged
  • Deployment & versioning — version pinning, rollbacks, and overrides
  • Streaming — enable streaming for prompt responses
  • Playground — test and iterate on prompts interactively