Refine a prompt version
Refine a prompt version using a teacher model and save the refined prompt as a new version.
Path parameters
prompt_id
version_id
Headers
Authorization
Header authentication of the form Token <token>
Query parameters
async
Whether to run the refinement asynchronously
Request
This endpoint expects an object.
teacher_model_provider_connection_id
Model Provider Connection ID to use to refine the prompt
teacher_model_name
Name of the model to use to refine the prompt
project_id
Project ID to target the refined prompt for
Response
Refined prompt response
prompt
The refined prompt text
title
Title of the refined prompt
reasoning
Reasoning behind the refinement
refinement_job_id
Unique identifier for the refinement job
refinement_status
Status of the refinement job
total_cost
Total cost of the refinement job (in USD)
previous_version
Previous version of the prompt