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

# Prompt Convert (Calendr only)

> Convert variable-based dates to absolute dates

Transform variable-based text into absolute dates for display or external consumption. This is the inverse of the `/task` endpoint.

## Request Body

<ParamField body="prompt" type="string" required>
  Text containing variable dates to transform (e.g., "Meeting scheduled for \{+2 Fri} at 2pm")
</ParamField>

<ParamField body="sessionId" type="string" required>
  Session identifier (used to determine the base Monday)
</ParamField>

## Response

<ResponseField name="originalPrompt" type="string">
  The original prompt with variable dates
</ResponseField>

<ResponseField name="convertedPrompt" type="string">
  The converted prompt with absolute dates
</ResponseField>

## Variable Date Formats

| Format    | Example   | Meaning                        |
| --------- | --------- | ------------------------------ |
| \{+N Day} | \{+0 Mon} | Monday of the base week        |
| \{+N Day} | \{+1 Wed} | Wednesday, one week after base |
| \{-N Day} | \{-1 Thu} | Thursday, one week before base |

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST http://localhost:3000/prompt \
    -H "Content-Type: application/json" \
    -d '{
      "prompt": "Meeting scheduled for {+2 Fri} at 2pm",
      "sessionId": "demo-session"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "originalPrompt": "Meeting scheduled for {+2 Fri} at 2pm",
    "convertedPrompt": "Meeting scheduled for 2025-01-24 at 2pm"
  }
  ```
</ResponseExample>
