- get_budget - Get Budget
- get_subscription - Get Subscription
Return the organization's API and Vibe budgets for the current billing period.
Requires the see_org_inference_usage permission.
from mistralai.client import Mistral, models
import os
with Mistral() as mistral:
res = mistral.beta.billing.get_budget(security=models.BillingAPIPublicGetBudgetSecurity(
dashboard_context_auth=os.getenv("MISTRAL_DASHBOARD_CONTEXT_AUTH", ""),
))
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
security |
models.BillingAPIPublicGetBudgetSecurity | ✔️ | The security requirements to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
Return the organization's plan and whether pay-as-you-go is enabled.
from mistralai.client import Mistral, models
import os
with Mistral() as mistral:
res = mistral.beta.billing.get_subscription(security=models.BillingAPIPublicGetSubscriptionSecurity(
dashboard_context_auth=os.getenv("MISTRAL_DASHBOARD_CONTEXT_AUTH", ""),
))
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
security |
models.BillingAPIPublicGetSubscriptionSecurity | ✔️ | The security requirements to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.GetSubscriptionResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |