API Key Management
You will need an API key to authenticate your requests to the Mechanix API. To obtain your API key, navigate to the dashboard and copy the value beginning withmec-.
Store the API key in a secure area, such as an .env file. Exporting the API key as an
environment variable enables it to be utilized in code:
- macOS/Linux
- Windows
Use the
export command to set the MECHANIX_API_KEY environment variable:First API Request
With your API key exported, you can make your first request using either the REST API directly or the Python SDK. Here, we’ll query the Web Search tool to know what OpenAI’s ‘o3’ model is.- Python
- JavaScript
- cURL
Install the Mechanix Python SDK using Make your first API request:
pip: