Python SDK Quickstart
Get up and running with the MutagenT Python SDK in minutes.Prerequisites
- Python 3.10+
pip install mutagent-sdk- A MutagenT API key — set as
MUTAGENT_API_KEYin your environment
Create a Prompt
List Prompts
Get a Specific Prompt
Async Version
The same operations work withAsyncMutagent in async contexts:
Error Handling
All API errors raiseMutagentError with the HTTP status code, response body, and headers:
Retries
The SDK automatically retries transient failures (429, 5xx) with exponential backoff (250ms → 500ms → 1s → 2s → 4s, 3 retries by default). The retry logic is built in and requires no configuration. Configure the timeout at construction time:Next Steps
Tracing
Add observability to your Python LLM calls
Python Integrations
Auto-trace frameworks: Anthropic, OpenAI, LangChain, LangGraph
TypeScript Quickstart
TypeScript SDK for comparison
API Reference
Full REST API documentation