Skip to content

Commit 74b7fcc

Browse files
authored
Merge pull request #41 from DeepLcom/aj/AE-412-usage
AE-412: Add speech-to-text usage metrics to API doc
2 parents 3315696 + 3067049 commit 74b7fcc

File tree

3 files changed

+90
-1
lines changed

3 files changed

+90
-1
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ typos, schema fixes, or adding examples.
1313
### Added
1414
* Document `X-Trace-ID` response header returned by all API endpoints for request tracking and debugging
1515

16+
## [3.9.0] - 2025-12-11
17+
### Added
18+
* Add `speech_to_text_milliseconds` field to usage reports and analytics components
19+
* Add `speech_to_text_milliseconds_count` and `speech_to_text_milliseconds_limit` fields to `/v2/usage` response for API Pro users
20+
* Add `billing_unit`, `api_key_unit_count`, and `account_unit_count` fields to product usage items in `/v2/usage` response
21+
1622
## [3.8.0] - 2025-11-26
1723
### Fixed
1824
* Fixes/development changes to the voice API. Note that this API is under active develpoment and not yet stable.
@@ -269,7 +275,8 @@ keys within an organization.
269275
## [2.0.0]
270276
Initial release of the OpenAPI specification.
271277

272-
[Unreleased]: https://github.com/DeepLcom/openapi/compare/v3.8.0...HEAD
278+
[Unreleased]: https://github.com/DeepLcom/openapi/compare/v3.9.0...HEAD
279+
[3.9.0]: https://github.com/DeepLcom/openapi/compare/v3.8.0...v3.9.0
273280
[3.8.0]: https://github.com/DeepLcom/openapi/compare/v3.7.0...v3.8.0
274281
[3.7.0]: https://github.com/DeepLcom/openapi/compare/v3.6.1...v3.7.0
275282
[3.6.1]: https://github.com/DeepLcom/openapi/compare/v3.6.0...v3.6.1

openapi.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,17 +2003,33 @@
20032003
"products": [
20042004
{
20052005
"product_type": "write",
2006+
"billing_unit": "characters",
2007+
"api_key_unit_count": 0,
2008+
"account_unit_count": 5643,
20062009
"api_key_character_count": 0,
20072010
"character_count": 5643
20082011
},
20092012
{
20102013
"product_type": "translate",
2014+
"billing_unit": "characters",
2015+
"api_key_unit_count": 636,
2016+
"account_unit_count": 5941580,
20112017
"api_key_character_count": 636,
20122018
"character_count": 5941580
2019+
},
2020+
{
2021+
"product_type": "speech_to_text",
2022+
"billing_unit": "milliseconds",
2023+
"api_key_unit_count": 1800000,
2024+
"account_unit_count": 1800000,
2025+
"api_key_character_count": 0,
2026+
"character_count": 0
20132027
}
20142028
],
20152029
"api_key_character_count": 636,
20162030
"api_key_character_limit": 1000000000000,
2031+
"speech_to_text_milliseconds_count": 1800000,
2032+
"speech_to_text_milliseconds_limit": 36000000,
20172033
"start_time": "2025-05-13T09:18:42Z",
20182034
"end_time": "2025-06-13T09:18:42Z"
20192035
}
@@ -3740,6 +3756,25 @@
37403756
"description": "The type of product (e.g., 'write', 'translate').",
37413757
"example": "write"
37423758
},
3759+
"billing_unit": {
3760+
"type": "string",
3761+
"enum": [
3762+
"characters",
3763+
"milliseconds"
3764+
],
3765+
"description": "The billing unit for this product type.",
3766+
"example": "characters"
3767+
},
3768+
"api_key_unit_count": {
3769+
"type": "integer",
3770+
"description": "Units used for this product by this API key in the current period.",
3771+
"example": 0
3772+
},
3773+
"account_unit_count": {
3774+
"type": "integer",
3775+
"description": "Total units used for this product by the account in the current period.",
3776+
"example": 5643
3777+
},
37433778
"api_key_character_count": {
37443779
"type": "integer",
37453780
"description": "Characters used for this product by this API key in the current period.",
@@ -3763,6 +3798,16 @@
37633798
"description": "Only present for API Pro users. Character limit for this API key in the current period.",
37643799
"example": 1000000000000
37653800
},
3801+
"speech_to_text_milliseconds_count": {
3802+
"type": "integer",
3803+
"description": "Only present for API Pro users. Milliseconds of speech-to-text used in the current period.",
3804+
"example": 1800000
3805+
},
3806+
"speech_to_text_milliseconds_limit": {
3807+
"type": "integer",
3808+
"description": "Only present for API Pro users. Milliseconds of speech-to-text limit in the current period.",
3809+
"example": 36000000
3810+
},
37663811
"start_time": {
37673812
"type": "string",
37683813
"format": "date-time",

openapi.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,13 +1461,27 @@ paths:
14611461
character_limit: 1000000000000
14621462
products:
14631463
- product_type: write
1464+
billing_unit: characters
1465+
api_key_unit_count: 0
1466+
account_unit_count: 5643
14641467
api_key_character_count: 0
14651468
character_count: 5643
14661469
- product_type: translate
1470+
billing_unit: characters
1471+
api_key_unit_count: 636
1472+
account_unit_count: 5941580
14671473
api_key_character_count: 636
14681474
character_count: 5941580
1475+
- product_type: speech_to_text
1476+
billing_unit: milliseconds
1477+
api_key_unit_count: 1800000
1478+
account_unit_count: 1800000
1479+
api_key_character_count: 0
1480+
character_count: 0
14691481
api_key_character_count: 636
14701482
api_key_character_limit: 1000000000000
1483+
speech_to_text_milliseconds_count: 1800000
1484+
speech_to_text_milliseconds_limit: 36000000
14711485
start_time: '2025-05-13T09:18:42Z'
14721486
end_time: '2025-06-13T09:18:42Z'
14731487
400:
@@ -2918,6 +2932,21 @@ components:
29182932
type: string
29192933
description: The type of product (e.g., 'write', 'translate').
29202934
example: write
2935+
billing_unit:
2936+
type: string
2937+
enum:
2938+
- characters
2939+
- milliseconds
2940+
description: The billing unit for this product type.
2941+
example: characters
2942+
api_key_unit_count:
2943+
type: integer
2944+
description: Units used for this product by this API key in the current period.
2945+
example: 0
2946+
account_unit_count:
2947+
type: integer
2948+
description: Total units used for this product by the account in the current period.
2949+
example: 5643
29212950
api_key_character_count:
29222951
type: integer
29232952
description: Characters used for this product by this API key in the current period.
@@ -2934,6 +2963,14 @@ components:
29342963
type: integer
29352964
description: Only present for API Pro users. Character limit for this API key in the current period.
29362965
example: 1000000000000
2966+
speech_to_text_milliseconds_count:
2967+
type: integer
2968+
description: Only present for API Pro users. Milliseconds of speech-to-text used in the current period.
2969+
example: 1800000
2970+
speech_to_text_milliseconds_limit:
2971+
type: integer
2972+
description: Only present for API Pro users. Milliseconds of speech-to-text limit in the current period.
2973+
example: 36000000
29372974
start_time:
29382975
type: string
29392976
format: date-time

0 commit comments

Comments
 (0)