/optimize/{optimization_run_id}/costs

Get LLM usage costs for a specific prompt optimization run.

This endpoint returns the total cost and detailed usage records for all LLM requests made during a prompt optimization run. Use this to track costs associated with optimizing prompts for different target models.

Cost Breakdown:

  • Total cost across all models used in the optimization
  • Individual usage records with provider, model, tokens, and costs
  • Timestamps for each LLM request

Access Control:

  • Only accessible by the user who created the optimization run
  • Requires prompt optimization access
Language
Credentials
Bearer
Click Try It! to start a request and see the response here!