Credit History

Track your credit usage and transactions over time using the get_credits_history() method.

Example

from mira_network import MiraClient

async def view_credit_history():
    async with MiraClient(api_key="your-api-key") as client:
        history = await client.get_credits_history()
        
        for transaction in history:
            print(f"Transaction: {transaction}")

Response Structure

[
    {
        "amount": 10.50,          # Amount in USD
        "description": "Used 1000 tokens with gpt-4o model"
    },
    {
        "amount": 50.00,          # Amount in USD
        "description": "Credit recharge"
    }
    // ... more transactions
]

Visual Analytics

For detailed credit usage analytics and visualizations:

  1. Visit Mira Console Credit History
  2. View usage patterns, trends, and detailed breakdowns