How to calculate cost of Assistant call

I am trying to figure out what a call to my assistant costs. From the completed event, I can get the usage:

Usage: {
  prompt_tokens: 1661,
  completion_tokens: 37,
  total_tokens: 1698,
  prompt_token_details: { cached_tokens: 0 }
}

I am using model gpt-4o-mini-2024-07-18 right now, which has the following cost according to the pricing page:

  • $0.150 / 1M input tokens
  • $0.075 / 1M cached** input tokens
  • $0.600 / 1M output tokens

I am confused by the difference in terminology. Are prompt tokens input tokens? Are completion tokens output tokens? Or is there additional math involved in getting the price of the call?

i have the same doubt on it.
the prompt_token is seems to be the total token like the input ,the instruction and files.
completion token is the response.
no idea even the cache is working. They said it is auto.