Capacities
GET/api/billing/capacities
This endpoint exposes the capacities and their consumptions in the current period.
The capacities are the maximum amounts of data that can be processed for each group of labels the system provides. The consumptions are the actual amounts of data processed by the system.
Request
Header Parameters
Correlation ID is a special type of request ID which is unique over a series of requests and responses, identifying a transaction in a distributed system. Correlation ID will be generated if not provided.
In distributed system architecture (microservices architecture) it is a unique ID of a request and response combination throughout all components of the system. Request ID will be generated if not provided.
Responses
- 200
- 400
- 422
- 429
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- TechnologyLabelValue
- VendorLabelValue
- OperationLabelValue
]
Array [
]
]
items
object[]
required
labels
object[]
required
Possible values: >= 1
Possible values: [technology
, vendor
, operation
]
Label key allowed for labeling consumption group.
value
object
required
Unspecified label value.
anyOf
Allowed label value for technology
label key.
string
Possible values: [speaker_identification
, speech_to_text
, time_analysis
, language_identification
, speaker_diarization
, voice_activity_detection
, audio_quality_estimation
]
Allowed label value for vendor
label key.
string
Possible values: [phonexia
, whisper
]
Allowed label value for operation
label key.
string
Possible values: [extract
, compare
, transcribe
, translate
, analyze
, identify
, diarize
, detect
, estimate
]
current_period
object
required
Period info.
The period info is used to represent a period. The period defines the time range for which the billing is calculated. When the period ends, the billing is reset.
Possible values: [month
, week
, day
, hour
, minute
]
Billing period.
Flag indicating whether there is any remaining capacity for the labels.If the flag is False
, any further processing for the label set will be rejected.
details
object[]
required
Possible values: >= 1
Possible values: [processed_audio_length
]
Billing property.
The property represents a countable item that can be measured during processing. The example property is the audio length used during processing.
Calculated maximum amount of the capacity.
Amount of the capacity that was already consumed.
Time until the calculated capacity is valid. After this time, the capacityis recalculated or removed. Take note that this is not the time when the consumption will be refreshed. That is determined by the higher-level period info.
Flag indicating whether the capacity was increased by a capacity extension.
{
"items": [
{
"labels": [
{
"key": "technology",
"value": "speaker_identification"
}
],
"current_period": {
"period": "month",
"start_time": "2024-07-29T15:51:28.071Z",
"end_time": "2024-07-29T15:51:28.071Z"
},
"has_remaining_capacity": true,
"details": [
{
"property": "processed_audio_length",
"capacity": 0,
"consumed": 0,
"valid_until": "2024-07-29T15:51:28.071Z",
"is_extended": true
}
]
}
]
}
Request payload data was invalid and could not be parsed.
- application/json
- Schema
- Example (from schema)
- request.invalid
Schema
Array [
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD3
- MOD4
- MOD5
Array [
- MOD1
- MOD2
- MOD3
- MOD4
]
]
Possible values: [internal
, resource.not-found
, method.invalid
, request.invalid
, request.content-length-missing
, request.validation-error
, request.rate-limit-exceeded
, request.size-limit-exceeded
]
Types of errors that can occur during request handling.
Human-readable summary of the error.
detail
object[]
Optional detail of the error. It is intended for better understanding of the error or advanced error handling.
location
object[]
required
Location of the error.
anyOf
integer
string
Human-readable summary of the error.
Machine-readable error type.
context
object
Optional key-value object with additional context
property name*
object
anyOf
string
integer
number
boolean
anyOf
string
integer
number
boolean
{
"type": "internal",
"message": "string",
"detail": [
{
"location": [
0,
"string"
],
"message": "string",
"type": "string",
"context": {}
}
]
}
Invalid request.
{
"type": "request.invalid",
"message": "Invalid request.",
"detail": []
}
Error during validation of request payload data occurred.
- application/json
- Schema
- Example (from schema)
- request validation error
Schema
Array [
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD3
- MOD4
- MOD5
Array [
- MOD1
- MOD2
- MOD3
- MOD4
]
]
Possible values: [internal
, resource.not-found
, method.invalid
, request.invalid
, request.content-length-missing
, request.validation-error
, request.rate-limit-exceeded
, request.size-limit-exceeded
]
Types of errors that can occur during request handling.
Human-readable summary of the error.
detail
object[]
Optional detail of the error. It is intended for better understanding of the error or advanced error handling.
location
object[]
required
Location of the error.
anyOf
integer
string
Human-readable summary of the error.
Machine-readable error type.
context
object
Optional key-value object with additional context
property name*
object
anyOf
string
integer
number
boolean
anyOf
string
integer
number
boolean
{
"type": "internal",
"message": "string",
"detail": [
{
"location": [
0,
"string"
],
"message": "string",
"type": "string",
"context": {}
}
]
}
Request validation error.
{
"type": "request.validation-error",
"message": "Request validation error.",
"detail": []
}
Request rate limit exceeded.
The request may be retried after a while. The following response headers may be checked for details: retry-after
, x-ratelimit-limit
, x-ratelimit-remaining
, x-ratelimit-reset
.
Response Headers
retry-after
number
Header indicates how long the user agent should wait before making a follow-up request.
x-ratelimit-limit
number
Maximum number of requests which is allowed in the currently used rate limiting window.
x-ratelimit-remaining
number
Remaining number of requests in the currently used rate limiting window.
x-ratelimit-reset
number
Time at which the current rate limiting window resets (in UTC epoch).
- application/json
- Schema
- Example (from schema)
- request.rate-limit-exceeded
Schema
Array [
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD3
- MOD4
- MOD5
Array [
- MOD1
- MOD2
- MOD3
- MOD4
]
]
Possible values: [internal
, resource.not-found
, method.invalid
, request.invalid
, request.content-length-missing
, request.validation-error
, request.rate-limit-exceeded
, request.size-limit-exceeded
]
Types of errors that can occur during request handling.
Human-readable summary of the error.
detail
object[]
Optional detail of the error. It is intended for better understanding of the error or advanced error handling.
location
object[]
required
Location of the error.
anyOf
integer
string
Human-readable summary of the error.
Machine-readable error type.
context
object
Optional key-value object with additional context
property name*
object
anyOf
string
integer
number
boolean
anyOf
string
integer
number
boolean
{
"type": "internal",
"message": "string",
"detail": [
{
"location": [
0,
"string"
],
"message": "string",
"type": "string",
"context": {}
}
]
}
Rate limit exceeded.
{
"type": "request.rate-limit-exceeded",
"message": "Rate limit exceeded: 1 per 5 second.",
"detail": []
}