Skip to main content
Helicone OSS LLM Observability

Prompt Management

Deploy and iterate prompts through the AI Gateway without code changes
2 min read

Helicone's AI Gateway integrates directly with our prompt management system without the need for custom packages or code changes.

This guide shows you how to integrate the AI Gateway with prompt management, not the actual prompt management itself. For creating and managing prompts, see Prompt Management.

Why Use Prompt Integration?#

Instead of hardcoding prompts in your application, reference them by ID:

Gateway vs SDK Integration#

Without the AI Gateway, using managed prompts requires multiple steps:

Info

Why the gateway is better:

  • No extra packages - Works with your existing OpenAI SDK
  • Single API call - Gateway fetches and compiles automatically
  • Lower latency - Everything happens server-side in one request
  • Automatic error handling - Invalid inputs return clear error messages
  • Cleaner code - No prompt management logic in your application

Integration Steps#

Create prompts in Helicone

Build and test prompts with variables in the dashboard

Use prompt_id in your code

Replace messages with prompt_id and inputs in your gateway calls

API Parameters#

Use these parameters in your chat completions request to integrate with saved prompts:

prompt_idstringrequired#

The ID of your saved prompt from the Helicone dashboard

environmentstring#

Which environment version to use: development, staging, or production

Default: "production"

inputsobjectrequired#

Variables to fill in your prompt template (e.g., {"customer_name": "John", "issue_type": "billing"})

modelstringrequired#

Any supported model - works with the unified gateway format

Example Usage#

Next Steps#