v18

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-2112360218.7 KB
Prompt Runs

Run Specific Prompt Version

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

post/v1/projects/{projectID}/prompts/{slug}/versions/{version}/run

Path parameters

projectIDstring uuid required

The ID of the project the prompt belongs to.

slugstring required

Prompt slug, unique within the project.

versionstring required

Version sequence number (integer) or version tag (string) to execute.

Request body

variablesobject

Variables to interpolate into the template.

streamboolean

Set to true to receive token stream instead of a blocked response.

modelstring 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_paramsobject nullable

Ad-hoc model parameters override.

Response

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

responsestring required

Text content produced by the model provider completion.

modelstring required

The model identifier that was executed.

versioninteger required

The prompt version number that was used.

slugstring required

Prompt slug.

Example response

{
  "response": "Greetings from the model!",
  "model": "openai/gpt-4o",
  "version": 2,
  "slug": "my-prompt"
}