API Reference#
To use the Wexa Python SDK, you'll need to authenticate your requests using an API key. This guide will walk you through creating and using API keys with the SDK.Creating an API Key#
Before making API requests with the SDK, you must generate an API key from your Wexa account:1.
Log in to your Wexa account 2.
In the top-right corner of the Dashboard, click on your profile avatar and select Manage Account from the dropdown menu.
3.
Access the API Keys SectionWithin the Manage Account page, navigate to the API Keys tab in the left-hand menu.
4.
If you haven't created any keys yet, you'll see an empty state and a button labeled Create API Key.Click Create API Key, provide a name for the key (e.g., ProductionKey, TestEnvKey), and confirm the creation.
5.
Copy and Store the API Key SecurelyAfter generation, your new API key will be displayed once. The key is partially masked for security.⚠️ Important: Copy your API key immediately and store it securely (e.g., in an environment variable or secrets manager). You won't be able to retrieve it again after navigating away.
Using Your API Key#
Once you have your API key, you can use it with the Wexa Python SDK in several ways:Method 1: Environment Variables (Recommended)#
Method 2: Direct Initialization#
Method 3: Using .env File#
Create a .env file in your project root:WEXA_BASE_URL=https://api.wexa.ai
WEXA_API_KEY=your-api-key-here
WEXA_PROJECT_ID=your-project-id
The SDK automatically includes the API key in the x-api-key header for all requests. You don't need to manually set headers when using the SDK.Example Request (what the SDK does internally):Base URL Configuration#
The SDK supports different environments:Production: https://api.wexa.ai
Staging: https://api.staging.wexa.ai
Complete Example#
Modified at 2026-01-02 08:28:45