---
title: "Test Prompt"
method: POST
path: "/prompts/test"
tags: ["Prompt Management"]
---

# Test Prompt

`POST /prompts/test`

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](https://docs.litellm.ai/docs/proxy/prompt_management)

Example Request:
```bash
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"
        }
    }'
```

## Request body

- TestPromptRequest
  - `dotprompt_content` string, required
  - `prompt_variables` object, nullable
  - `conversation_history` object[], nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/flock/apis/litellm-api.md) · [All operations](https://skmtc.net/flock/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flock/litellm-api/revisions/8fbaab4fc7c5/schema)
