Compose and iterate prompts, then easily deploy them in any LLM call with the AI Gateway.
Create a Prompt
Test and Iterate
Run Prompt with AI Gateway
messages
parameter becomes optional in API calls when using Helicone prompts. However, if your prompt template is empty or lacks messages, you’ll need to provide them at runtime.
{{hc:name:type}}
where:
name
is your variable identifiertype
defines the expected data typeType | Description | Example Values | Validation |
---|---|---|---|
string | Text values | "John Doe" , "Hello world" | None |
number | Numeric values | 25 , 3.14 , -10 | AI Gateway type-checking |
boolean | True/false values | true , false , "yes" , "no" | AI Gateway type-checking |
your_type_name | Any data type | Objects, arrays, strings | None |
number
and boolean
types are validated by the Helicone AI Gateway, which will accept strings for any input as long as they can be converted to valid values.true
/ false
(boolean)"yes"
/ "no"
(string)"true"
/ "false"
(string)Type | Description | Use Case |
---|---|---|
HeliconeChatCreateParams | Standard chat completions with prompts | Non-streaming requests |
HeliconeChatCreateParamsStreaming | Streaming chat completions with prompts | Streaming requests |
prompt_id
- Your saved prompt identifierenvironment
- Optional environment to target (e.g., “production”, “staging”)version_id
- Optional specific version (defaults to production version)inputs
- Variable valuesmessages
optional because Helicone prompts are expected to contain the required message structure. If your prompt template is empty or doesn’t include messages, you’ll need to provide them at runtime.For direct SDK integration:HeliconePromptManager
with these main methods:
Method | Description | Returns |
---|---|---|
pullPromptVersion() | Determine which prompt version to use | Prompt version object |
pullPromptBody() | Fetch raw prompt from storage | Raw prompt body |
pullPromptBodyByVersionId() | Fetch prompt by specific version ID | Raw prompt body |
mergePromptBody() | Merge prompt with inputs and validation | Compilation result |
getPromptBody() | Complete compile process with inputs | Compiled body + validation errors |
HeliconePromptManager
, while not providing input traces, will provide validation error handling.