> ## Documentation Index
> Fetch the complete documentation index at: https://docs.helicone.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Request Inputs

> Retrieve the prompt template inputs (variables) used for a specific request made through AI Gateway prompt management.

<Warning>
  <strong>For users in the European Union:</strong> Please use `eu.api.helicone.ai` instead of
  `api.helicone.ai`.
</Warning>

## Overview

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.

## 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.

<Note>Request data is retained for 90 days. Plan your testing workflows accordingly.</Note>

## 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

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

### No Inputs Found

```json theme={null}
{
  "data": null,
  "error": null
}
```


## OpenAPI

````yaml get /v1/request/{requestId}/inputs
openapi: 3.0.0
info:
  title: helicone-api
  version: 1.0.0
  license:
    name: MIT
  contact: {}
servers:
  - url: https://api.helicone.ai/
  - url: http://localhost:8585/
security: []
paths:
  /v1/request/{requestId}/inputs:
    get:
      tags:
        - Request
      operationId: GetRequestInputs
      parameters:
        - in: path
          name: requestId
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Result__inputs-Record_string.any_--prompt_id-string--version_id-string--environment-string-or-null_-or-null.string_
      security:
        - api_key: []
components:
  schemas:
    Result__inputs-Record_string.any_--prompt_id-string--version_id-string--environment-string-or-null_-or-null.string_:
      anyOf:
        - $ref: >-
            #/components/schemas/ResultSuccess__inputs-Record_string.any_--prompt_id-string--version_id-string--environment-string-or-null_-or-null_
        - $ref: '#/components/schemas/ResultError_string_'
    ResultSuccess__inputs-Record_string.any_--prompt_id-string--version_id-string--environment-string-or-null_-or-null_:
      properties:
        data:
          properties:
            environment:
              type: string
              nullable: true
            version_id:
              type: string
            prompt_id:
              type: string
            inputs:
              $ref: '#/components/schemas/Record_string.any_'
          required:
            - environment
            - version_id
            - prompt_id
            - inputs
          type: object
          nullable: true
        error:
          type: number
          enum:
            - null
          nullable: true
      required:
        - data
        - error
      type: object
      additionalProperties: false
    ResultError_string_:
      properties:
        data:
          type: number
          enum:
            - null
          nullable: true
        error:
          type: string
      required:
        - data
        - error
      type: object
      additionalProperties: false
    Record_string.any_:
      properties: {}
      additionalProperties: {}
      type: object
      description: Construct a type with a set of properties K of type T
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header
      description: 'Bearer token authentication. Format: ''Bearer YOUR_API_KEY'''

````