xR2 icon

xR2

Interact with xR2 APIs

Actions3

Prompt → Get

AI-generated

Summary

Fetch prompt details by its slug, optionally specifying a version number and status filter, and optionally substitute variable placeholders with provided values.

Inputs

  • Slug (required) — The unique identifier for the prompt to fetch.
  • Version Number — Specific version to retrieve; 0 fetches the latest deployed version.
  • Status — Filter to retrieve prompt version by status (e.g., production, draft); leave blank for latest regardless of status.
  • Variable Values — Key-value pairs to replace {{variable}} placeholders in prompt fields; leave empty to return raw template without substitution.

Output shape

a single JSON object representing the fetched prompt, including its fields and variables used

If variable values are provided, placeholders in 'system_prompt', 'user_prompt', and 'assistant_prompt' fields are replaced accordingly. If not, raw prompt template fields are returned. The response includes the variables used after substitution.

Links

Discussion