Prerequisites

Before installing the SDK, ensure you have:

  • Python 3.8 or higher installed
  • pip package manager
  • A Mira Network API key (get one at console.mira.network)

Installation Steps

Step 1: Install via pip

Install the SDK using pip:

pip install mira-network

Step 2: Verify Installation

Verify the installation:

pip show mira-network

Step 3: Environment Configuration

Configure your environment:

import os
from mira_network import MiraClient

client = MiraClient(
    api_key=os.getenv("MIRA_API_KEY"),
    base_url=os.getenv("MIRA_API_URL", "https://apis.mira.network")
)

Step 4: Test Your Setup

Create a simple test script:

from mira_network import MiraClient

async def test_setup():
    async with MiraClient(api_key="your-api-key") as client:
        models = await client.list_models()
        print("Available models:", models)

if __name__ == "__main__":
    import asyncio
    asyncio.run(test_setup())