Skip to main content
POST
/
prompt
curl -X POST http://localhost:3000/prompt \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Meeting scheduled for {+2 Fri} at 2pm",
    "sessionId": "demo-session"
  }'
{
  "originalPrompt": "Meeting scheduled for {+2 Fri} at 2pm",
  "convertedPrompt": "Meeting scheduled for 2025-01-24 at 2pm"
}
Transform variable-based text into absolute dates for display or external consumption. This is the inverse of the /task endpoint.

Request Body

prompt
string
required
Text containing variable dates to transform (e.g., “Meeting scheduled for {+2 Fri} at 2pm”)
sessionId
string
required
Session identifier (used to determine the base Monday)

Response

originalPrompt
string
The original prompt with variable dates
convertedPrompt
string
The converted prompt with absolute dates

Variable Date Formats

FormatExampleMeaning
{+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
curl -X POST http://localhost:3000/prompt \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Meeting scheduled for {+2 Fri} at 2pm",
    "sessionId": "demo-session"
  }'
{
  "originalPrompt": "Meeting scheduled for {+2 Fri} at 2pm",
  "convertedPrompt": "Meeting scheduled for 2025-01-24 at 2pm"
}