Hello,
I have some problems with calculating the request cost on my backend. It's a little bit unclear to me how to calculate costs.
The returned token usage for requests is not separated for different types of input/output, possibly in the prompt and response
Let's say the user prompt is text with an image to gpt-5, and it also uses the image generation tool to generate/edit the image in the prompt (Forwards request to gpt-image).
The response in return has some texts and a new image.
Now, I want to know how to properly calculate token costs for the input {text + image} and the same for the output {text + image}
The problem is that response usage does not show them separately, so I have to calculate them manually. The question is whether the input/output tokens in the report are only for texts or images are also include?
In the documentation page of the gpt-5 it only says price input for the text, not for images, so the question is, are they free, or do I have to use the gpt-image input cost?