latestOpenAPI 3.1.02026-08-226994571.1 MB

1e929292ddd5

Prompt Management

Test Prompt

Test a prompt by rendering it with variables and executing an LLM call.

This endpoint allows testing prompts before saving them to the database. The response is always streamed.

👉 Prompt docs

Example Request:

curl -X POST "http://localhost:4000/prompts/test" \
    -H "Authorization: Bearer <your_api_key>" \
    -H "Content-Type: application/json" \
    -d '{
        "dotprompt_content": "---\nmodel: gpt-4o\ntemperature: 0.7\n---\n\nUser: Hello {{name}}",
        "prompt_variables": {
            "name": "World"
        }
    }'
post/prompts/test

Request body

dotprompt_contentstring required
prompt_variablesobject nullable
conversation_historyobject[] nullable

Response

Successful Response

{"stackTrail":"paths:/prompts/test:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}