Skip to main content
GET
/
v1
/
request
/
{requestId}
/
inputs
cURL
curl --request GET \
  --url https://api.helicone.ai/v1/request/{requestId}/inputs \
  --header 'Authorization: <api-key>'
{
  "data": {
    "environment": "<string>",
    "version_id": "<string>",
    "prompt_id": "<string>",
    "inputs": {}
  },
  "error": null
}
For users in the European Union: Please use eu.api.helicone.ai instead of api.helicone.ai.

Overview

When you use Prompt Management through the AI Gateway, template variables (inputs) are stored automatically. This endpoint lets you retrieve those inputs by request ID — useful for building testing pipelines that replay past requests against new prompt versions.

Use Cases

  • Regression testing: Pull a past request’s inputs and replay them against a new prompt version to validate behavior.
  • Prompt comparison: Compare outputs across prompt versions using the same inputs, without storing inputs separately on your end.
  • Debugging: Inspect the exact variables that were injected into a prompt template at runtime.
Request data is retained for 90 days. Plan your testing workflows accordingly.

Response

Returns null for data if the request has no associated inputs (e.g., the request was not made through prompt management, or the request ID doesn’t exist).

Example Response

{
  "data": {
    "inputs": {
      "customer_name": "Sarah",
      "issue": "refund request"
    },
    "prompt_id": "customer-support",
    "version_id": "1c7a86c8-...",
    "environment": "production"
  },
  "error": null
}

No Inputs Found

{
  "data": null,
  "error": null
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Format: 'Bearer YOUR_API_KEY'

Path Parameters

requestId
string
required

Response

200 - application/json

Ok

data
object
required
error
enum<number> | null
required
Available options:
null