Skip to main content
To start using the Synthefy SDK, you’ll first need to configure your API key. This tutorial shows both simple and secure setup methods using code or environment variables. Don’t forget to create your API key in the Synthefy Dashboard before you begin.

Why secure your API key?

Your API key grants access to your Synthefy account and should be treated like a password. By securing it, you prevent unauthorized usage and protect your usage credits.

Where to find your key

You can generate an API key from your Synthefy Dashboard under the API Keys section. Be sure to copy the entire key carefully — no extra spaces!

How to request the API key

1

Account Request

Go to Synthefy Dashboard. Sign in with your existing account, or create a new one if you don’t have access yet. Once your registration is submitted, the admin team will review and approve your account as soon as possible.
2

Create your API key

In the left panel, navigate to Settings → API Keys.API key creation screen

How to configure your API key

1

Option 1: Copy & Paste into Python

This approach is simple but not secure. Your API key will be stored in your source code, visible to anyone with access to it.
  1. Copy your key from the Synthefy Dashboard.
  2. Paste the key into your Python code, for example:
from synthefy import SynthefyAPIClient

synthefy_client = SynthefyAPIClient(api_key='your_api_key_here') 

2

Option 2: Secure method with environment variables (recommended)

Storing your API key in an environment variable is the recommended approach for security and ease of sharing code without exposing credentials.
Linux / macOS
export SYNTHEFY_API_KEY=your_api_key
Then instantiate the client without specifying the key:
from synthefy import SynthefyAPIClient
synthefy_client = SynthefyAPIClient()

Summary

You’ve now learned how to configure your Synthefy API key through multiple methods, ranging from the simplest copy‑and‑paste approach to more secure environment variable setups. Remember to keep your API key confidential to prevent unauthorized usage.