Skip to content

Latest commit

 

History

History
90 lines (56 loc) · 4.85 KB

README.md

File metadata and controls

90 lines (56 loc) · 4.85 KB

Beta.Billing

Overview

Available Operations

get_budget

Return the organization's API and Vibe budgets for the current billing period.

Requires the see_org_inference_usage permission.

Example Usage

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)

Parameters

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.

Response

models.GetBudgetResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

get_subscription

Return the organization's plan and whether pay-as-you-go is enabled.

Example Usage

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)

Parameters

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.

Response

models.GetSubscriptionResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*