You can’t tell OpenAI’s API "only bill me for a subset of the response." You are billed for every token generated (including tokens you might not end up using). If you truly want only the function call/parsed data, without the extra “explanatory” text, you’ll need to have the model produce fewer tokens in the first place (e.g., by forcing a function call, or by instructing the model to respond with minimal or no text). Merely discarding extra text after the fact does not reduce token usage or cost.
You have two options: