curl --request GET \
--url https://api.example.com/api/v2/projects/{project_id}/prompt-optimization-jobs/{job_id} \
--header 'Authorization: Bearer <token>'{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"prompt_template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"original_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_test_after_optimization": true,
"created_at": "2023-11-07T05:31:56Z",
"optimized_version_id": null,
"test_run_id": null,
"comparison_id": null,
"changes_summary": null,
"error_message": null,
"data_sources_used": {
"human_labels_count": 123,
"customer_feedback_count": 123
},
"completed_at": null,
"progress": {
"step": 123,
"total_steps": 123,
"step_name": "<string>"
}
}Returns the current status of the prompt optimization job, including progress information for polling. When complete, includes the optimized_version_id and optionally test_run_id and comparison_id if run_test_after_optimization was True.
curl --request GET \
--url https://api.example.com/api/v2/projects/{project_id}/prompt-optimization-jobs/{job_id} \
--header 'Authorization: Bearer <token>'{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"prompt_template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"original_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_test_after_optimization": true,
"created_at": "2023-11-07T05:31:56Z",
"optimized_version_id": null,
"test_run_id": null,
"comparison_id": null,
"changes_summary": null,
"error_message": null,
"data_sources_used": {
"human_labels_count": 123,
"customer_feedback_count": 123
},
"completed_at": null,
"progress": {
"step": 123,
"total_steps": 123,
"step_name": "<string>"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
PromptOptimizationJobStatusResponse(job_id: uuid.UUID, status: str, prompt_template_id: uuid.UUID, original_version_id: uuid.UUID, run_test_after_optimization: bool, created_at: datetime.datetime, optimized_version_id: Optional[uuid.UUID] = None, test_run_id: Optional[uuid.UUID] = None, comparison_id: Optional[uuid.UUID] = None, changes_summary: Optional[str] = None, error_message: Optional[str] = None, data_sources_used: Optional[server.api_routes.prompt_optimization_jobs_api_v2.DataSourcesUsed] = None, completed_at: Optional[datetime.datetime] = None, progress: Optional[server.api_routes.prompt_optimization_jobs_api_v2.JobProgress] = None)
Show child attributes
Show child attributes