Skip to content

fix: pass API key via header in Neuphonic and Murf WebSocket TTS#5691

Merged
u9g merged 2 commits intomainfrom
fix/ws-api-key-header-auth
May 10, 2026
Merged

fix: pass API key via header in Neuphonic and Murf WebSocket TTS#5691
u9g merged 2 commits intomainfrom
fix/ws-api-key-header-auth

Conversation

@u9g
Copy link
Copy Markdown
Contributor

@u9g u9g commented May 8, 2026

Description

Both livekit-plugins-neuphonic and livekit-plugins-murf were embedding the API key in the WebSocket URL query string without URL-encoding. Move the key onto the WS handshake header instead — both providers' SDKs/docs already support header auth.

Changes

  • neuphonic: drop api_key= from the WS URL; the existing X-API-KEY header was already redundantly set on the handshake. JWT-token URL handling is unchanged.
  • murf: switch from the ?api-key=... query param to the api-key header (matches Murf's official Python SDK and WS API reference).

Testing

  • make check (ruff lint + format-check) passes locally on both edited files.

u9g added 2 commits May 8, 2026 14:20
The X-API-KEY header was already being set on the WS handshake, so the
api_key query param was redundant. Removing it avoids URL-encoding
fragility and keeps the key out of any proxy/access logs.

JWT-token URL handling is unchanged.
Murf's official Python SDK uses the api-key HTTP header for REST, and
the WebSocket API reference lists api-key as a supported header. Move
the credential out of the URL to avoid URL-encoding fragility and to
keep it out of proxy/access logs.
@chenghao-mou chenghao-mou requested a review from a team May 8, 2026 18:22
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@u9g u9g merged commit 9255c91 into main May 10, 2026
26 checks passed
@u9g u9g deleted the fix/ws-api-key-header-auth branch May 10, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants