Credit History

Credit History

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

Copy

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}")

arrow-up-rightResponse Structure

Copy

[
    {
        "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
]

arrow-up-rightVisual Analytics

For detailed credit usage analytics and visualizations:

  1. View usage patterns, trends, and detailed breakdowns

Last updated