Skip to content

Commit d7ebdcb

Browse files
chitalianclaude
andauthored
docs: add API reference for GET /v1/request/{requestId}/inputs (#5576)
* docs: add API reference for GET /v1/request/{requestId}/inputs Documents the new endpoint that retrieves prompt template inputs (variables) for a given request, enabling testing pipeline workflows where users replay past requests against new prompt versions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: add 90-day retention note to request inputs endpoint Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ed9ae04 commit d7ebdcb

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

docs/docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@
324324
"rest/request/post-v1requestquery-clickhouse",
325325
"rest/request/post-v1requestquery",
326326
"rest/request/get-v1request",
327+
"rest/request/get-v1request-inputs",
327328
"rest/request/post-v1requestquery-ids",
328329
"rest/request/post-v1request-feedback",
329330
"rest/request/put-v1request-property",
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: "Get Request Inputs"
3+
sidebarTitle: "Get Request Inputs"
4+
description: "Retrieve the prompt template inputs (variables) used for a specific request made through AI Gateway prompt management."
5+
"twitter:title": "Get Request Inputs - Helicone OSS LLM Observability"
6+
openapi: get /v1/request/{requestId}/inputs
7+
---
8+
9+
import EUAPIWarning from "/snippets/eu-api-warning.mdx";
10+
11+
<EUAPIWarning />
12+
13+
## Overview
14+
15+
When you use [Prompt Management](/features/advanced-usage/prompts/overview) 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.
16+
17+
## Use Cases
18+
19+
- **Regression testing**: Pull a past request's inputs and replay them against a new prompt version to validate behavior.
20+
- **Prompt comparison**: Compare outputs across prompt versions using the same inputs, without storing inputs separately on your end.
21+
- **Debugging**: Inspect the exact variables that were injected into a prompt template at runtime.
22+
23+
<Note>Request data is retained for 90 days. Plan your testing workflows accordingly.</Note>
24+
25+
## Response
26+
27+
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).
28+
29+
### Example Response
30+
31+
```json
32+
{
33+
"data": {
34+
"inputs": {
35+
"customer_name": "Sarah",
36+
"issue": "refund request"
37+
},
38+
"prompt_id": "customer-support",
39+
"version_id": "1c7a86c8-...",
40+
"environment": "production"
41+
},
42+
"error": null
43+
}
44+
```
45+
46+
### No Inputs Found
47+
48+
```json
49+
{
50+
"data": null,
51+
"error": null
52+
}
53+
```

0 commit comments

Comments
 (0)