Skip to content

Incorrect environment variable for ElevenLabs API key in blog_to_podcast_agent.py #220

@haoduotnt

Description

@haoduotnt

File:
starter_ai_agents/ai_blog_to_podcast_agent/audio_generations/blog_to_podcast_agent.py

Issue:
The code uses the environment variable ELEVENLABS_API_KEY, which is incorrect and causes authentication failure when calling the ElevenLabs API.

Line in question:

os.environ["ELEVENLABS_API_KEY"]

Fix:
It should be:

os.environ["ELEVEN_LABS_API_KEY"]

Impact:
Using the incorrect environment variable name results in a 401 Unauthorized error when making requests to the ElevenLabs API.

Reference:
Elevenlabs API - Error: 401 Client Error: Unauthorized for url

Let me know if you’d like me to help you actually submit it via the GitHub API or automate the process further!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions