Does OpenAI charge for both prompt and completion?

Hi everyone, I had a simple question. Does OpenAI only charge for the number of tokens generated in the completion, or do they charge for both the number of tokens used in prompt and generated in the completion? Please answer if anybody knows. Thanks.

Both prompt and completion. Same price per token

1 Like