Getting credit

title: “Checking Credits” description: “Monitor your credit balance and usage” icon: “wallet” iconType: “light”

arrow-up-rightCredit Information

Monitor your current credit balance and usage using the get_user_credits() method.

Copy

from mira_network import MiraClient

async def check_credits():
    async with MiraClient(api_key="your-api-key") as client:
        credits = await client.get_user_credits()
        print("Credits:", credits)

arrow-up-rightResponse Structure

Copy

{
    "amount": 150.75    # Current balance in USD
}

Last updated