Skip to main content
This guide walks you through your first calls with the Mira Network Python SDK.
Before you start: install the SDK and have your API key ready (it starts with sk-mira-). The examples read it from the MIRA_API_KEY environment variable — replace "your-api-key" with your own key or set that variable.

Basic Chat Completion

Send a message and read the model’s reply:

Streaming Responses

For real-time responses:

Managing Conversations

Handle multi-turn conversations:

Error Handling

Handle validation and request errors:

Next Steps