Get Service Plan Quotas
Request
This API allows you to fetch informations about the usage plan to which a service, identified by a service_id
, is attached.
Note
For further information on plans and services please refer to Plans and Services.
Warning
This endpoint is intended for infrequent use. The data returned by this dedicated endpoint may not reflect the most up-to-date usage metrics due to synchronization delays.
Tip
For real-time quota tracking during inference, we recommend reading the x-plan-usage
and x-plan-usage-limit
response
headers on the synchronous and asynchronous inference endpoints.
These headers always reflect the most up-to-date usage metrics.
The API requires making a GET request by specifying the service_id
as a parameter as the examples below shows.
curl --location 'https://platform.mybiros.com/api/v1/service/:service_id:/plan/quotas' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Accept: application/json'
Responses
Successful Responses
The request was successful, and a JSON response is returned.
Status | Message | Description | Reference |
---|---|---|---|
200 | OK | the request has succeeded. | Success Response 200 |
Status 200 - OK
JSON Response Example
Schema: Service Plan Quotas
Key | Type | Description |
---|---|---|
plan_usage | integer | the amount of quota already consumed on this plan (across all its services) |
plan_usage_limit | integer | the total quota allowed for this plan |
plan_type | string | the plan's type: TRIAL | PAID_MONTHLY_QUOTA_RESET | PAID_ANNUAL_QUOTA_RESET |
subscription_start_date | string | null | datetime of when the plan’s current subscription period began in ISO 8601 format |
subscription_end_date | string | null | datetime of when the plan’s current subscription period will end in ISO 8601 format |
Note
Note that subscription_start_date
and subscription_end_date
fields will only be populated in the case of a paid subscription.
Error Responses
The request was unsuccessful, and a specific status code is returned to identify the error.
Status | Message | Description | Reference |
---|---|---|---|
401 | Unauthorized | the server has not been able to authenticate the request. | Response 401 |
404 | Not Found | the server could not locate the requested resource. | Response 404 |
429 | Too Many Requests | the client has sent too many requests in a short period, exceeding the rate limit. Please try again later. | Response 429 |
500 | Internal Server Error | the server encountered an unexpected and unrecoverable error while processing the request. | Response 500 |
503 | Service Unavailable | the server could be under maintenance for an update. Will be back soon. | Response 503 |
Status 401 - Unauthorized
The current endpoint is protected and requires an API key to be accessed. If sufficient privileges are not present, the request will not be authorized.
Tip
Double-check that the API Key is correct, valid and set using the x-api-key
header
in the request. Also make sure that you are using the right API key for the service
you are requesting and that the service ID in it is correct and corresponds to the ID of
an existing service in your account.
Status 404 - Not Found
The service ID provided does not exist or could not be found. Please verify the ID and try again.
Status 429 - Too Many Requests
This status code is returned when the client has made too many requests in a given timeframe, exceeding the rate limits set by the server. It indicates that the client needs to slow down and retry after a specified cooldown period. Rate limits are typically enforced to protect the server from being overwhelmed and to ensure fair use of resources.
Status 500 - Internal Server Error
This status code indicates that the server encountered an unexpected error or condition that prevented it from completing the request. It is a generic error message when no more specific message is suitable. The client cannot resolve the issue.
Status 503 - Service Unavailable
This status code indicates that the server is currently unavailable, typically due to ongoing maintenance or temporary overloading. The server is unable to handle the request at the moment, but the issue is expected to be resolved shortly. This status code signals that the downtime is temporary, and the service will be restored once maintenance is complete.