Skip to content

Commit 46958c2

Browse files
Merge pull request #227313 from mrbullwinkle/mrb_02_13_2023_openai_cost_management
[Cognitive Services] [Azure OpenAI] Clarify input/output token costs
2 parents c25bbe9 + 9b198d7 commit 46958c2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

articles/cognitive-services/openai/how-to/manage-costs.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.custom: subject-cost-optimization
77
ms.service: cognitive-services
88
ms.subservice: openai
99
ms.topic: how-to
10-
ms.date: 02/10/2023
10+
ms.date: 02/13/2023
1111
---
1212

1313

@@ -35,6 +35,10 @@ Azure OpenAI base series and Codex series models are charged per 1,000 tokens. C
3535

3636
Our models understand and process text by breaking it down into tokens. For reference, each token is roughly four characters for typical English text.
3737

38+
Token costs are for both input and output. For example, if you have a 1,000 token JavaScript code sample that you ask an Azure OpenAI model to convert to Python. You would be charged approximately 1,000 tokens for the initial input request sent, and 1,000 more tokens for the output that is received in response for a total of 2,000 tokens.
39+
40+
In practice, for this type of completion call the token input/output wouldn't be perfectly 1:1. A conversion from one programming language to another could result in a longer or shorter output depending on many different factors including the value assigned to the max_tokens parameter.
41+
3842
### Base Series and Codex series fine-tuned models
3943

4044
Azure OpenAI fine-tuned models are charged based on three factors:

0 commit comments

Comments
 (0)