Prompt Optimization
Check prompt optimization status
Check the status of a prompt optimization run.
Use this endpoint to poll the status of your optimization request. Processing is asynchronous, so you'll need to check periodically until the status indicates completion.
Status Values:
- created: Initial state, not yet processing
- queued: Waiting for processing capacity (check queue_position)
- processing: Currently optimizing prompts
- completed: All target models have been processed successfully
- failed: One or more target models failed to process
Polling Recommendations:
- Poll every 30-60 seconds during processing
- Check queue_position if status is 'queued' to estimate wait time
- Stop polling once status is 'completed' or 'failed'
- Use GET /v2/prompt/optimizeResults to retrieve results after completion
Queue Position:
- Only present when status is 'queued'
- Lower numbers mean earlier processing (position 1 is next)
- Typical wait time: 1-5 minutes per position
Note: This endpoint only returns status information. To get the actual optimized prompts and evaluation results, use GET /v2/prompt/optimizeResults once status is 'completed'.
get/v2/prompt/optimizeStatus/{optimization_run_id}
Path parameters
optimization_run_idstring required
Response
Successfully retrieved optimization status
Example response
{
"optimization_run_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "processing"
}