---
title: "Run Specific Prompt Version"
method: POST
path: "/v1/projects/{projectID}/prompts/{slug}/versions/{version}/run"
tags: ["Prompt Runs"]
---

# Run Specific Prompt Version

`POST /v1/projects/{projectID}/prompts/{slug}/versions/{version}/run`

## Request

- Base URL: `http://localhost:3000`
- URL: `http://localhost:3000/v1/projects/{projectID}/prompts/{slug}/versions/{version}/run`
- Auth: HTTP bearer

Renders a specific template version of a prompt and executes it against the configured model provider.

## Path parameters

- `projectID` string, uuid, required
- `slug` string, required
- `version` string, required

## Request body

- RunRequest
  - `variables` object: Variables to interpolate into the template.
  - `stream` boolean: Set to true to receive token stream instead of a blocked response.
  - `model` string, nullable: Ad-hoc model override. Must start with a supported provider prefix: 'openai/', 'anthropic/', 'gemini/', 'deepseek/', 'groq/', or 'openrouter/'. All providers except 'anthropic/' follow standard OpenAI-compatible JSON request, response, and SSE streaming conventions.
  - `model_params` object, nullable: Ad-hoc model parameters override.

## Response `200`

Completed response text or stream chunks (Streaming SSE events where each line is formatted as data: {"delta": string, "done": boolean}).

- RunResponse
  - `response` string, required: Text content produced by the model provider completion.
  - `model` string, required: The model identifier that was executed.
  - `version` integer, required: The prompt version number that was used.
  - `slug` string, required: Prompt slug.

## Other responses

- `400`: Invalid request
- `404`: Not found
- `502`: Provider failure

## Changes

- **2026-07-14** `ea6ddb7575f4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/px0-ai/apis/px0-api/changes/v1/projects/:projectID/prompts/:slug/versions/:version/run/post.md)

---

[API](https://skmtc.dev/px0-ai/apis/px0-api.md) · [All operations](https://skmtc.dev/px0-ai/apis/px0-api/llms.txt) · [OpenAPI document](https://skmtc.dev/px0-ai/apis/px0-api/revisions/3ed72443989d?raw)
