INNER CODE UNIT · Python
__init__
SamurAIGPT/Seedance-2.5-API · seedance_api.py:41
def __init__(self, api_key=None):
"""
Initialize the Seedance 2.5 API client.
:param api_key: MuAPI API key. Defaults to MUAPI_API_KEY.
"""
self.api_key = api_key or os.getenv("MUAPI_API_KEY")
if not self.api_key:
raise ValueError(
"API Key is required. Set MUAPI_API_KEY in .env or pass it to the constructor."
)
self.base_url = "https://api.muapi.ai/api/v1"
self.headers = {
"x-api-key": self.api_key,
"Content-Type": "application/json",
}