Does prompt_tokens in response of text-gen models take into account file (image, pdf, etc.) inputs as well?

The total count of input tokens as reflected in response[“token_usage”][“prompt_tokens”] → Does it provide the total no. of tokens, after taking into account image/ file (PDF, etc.) inputs as well? Or does it take into account just the text input?

All input billed and consumed is shown in the API’s usage object.

There is some internal text of OpenAI’s prompting that is not billed but is run on the models you use.

The tokens of internal tools description and function descriptions you select and place are billed.

Images have a calculable price (my site), sometimes multiplied in cost depending on the model.

PDF by user input content is extracted text and page rendering images also billed, but generally unknowable how the service will perform unless you send to the token-counting endpoint.

I hope that covers the question: the price of an API call (without tool fees) is the token usage report you receive in an API call.