What you’ll learn:
- How to install the Metorial Python SDK
- How to make requests to the Metorial API using the SDK
Explore Python Examples: Check out practical examples and sample code in the metorial-python examples directory on GitHub.
1
Install the SDK
Install the SDK using pip:
2
Using the SDK
To use the SDK, import the You can now use the
Metorial class and create an instance with your API key:metorial instance to make requests to the Metorial API.3
Making Requests
Connect to your deployed providers using
metorial.connect(). Pass an adapter for your chosen AI provider and a list of provider deployments:4
Using Types
The SDK includes type hints for all API resources. Use tools like mypy or your IDE’s type checker to catch errors before runtime and get autocomplete suggestions for all API methods and parameters.