Since two days Lyria returns 500 INTERNAL

Hi there,

I was using Google Lyria successfully until 2 days ago. Since then Lyria returns 500 INTERNAL.

SDK: google-genai 1.73.1
Endpoint/method: client.models.generate_content
Models tested:

  • lyria-3-clip-preview
  • lyria-3-pro-preview

Tests:

  1. lyria-3-clip-preview with tiny prompt:
    “Create a 30-second calm instrumental ambient piano loop.”
    Result: 500 INTERNAL

  2. lyria-3-pro-preview with Google docs sample prompt and response_modalities=[“AUDIO”,“TEXT”]
    Result: 500 INTERNAL

  3. lyria-3-pro-preview with Google docs sample prompt and no config
    Result: 500 INTERNAL

Error:
500 INTERNAL. {‘error’: {‘code’: 500, ‘message’: ‘Internal error encountered.’, ‘status’: ‘INTERNAL’}}

This does not appear prompt-related because even the docs sample and clip model fail.

I migrated Lyria generation to the new Interactions API path. Same 500 INTERNAL error.

Lyria 3 family: 19/19 HTTP 500 on byte-identical request that previously returned 200

Summary

Both lyria-3-pro-preview and lyria-3-clip-preview return HTTP 500 INTERNAL on 100% of requests from our project, including a byte-identical request that returned HTTP 200 on 2026-05-27 22:52 UTC. Failure has been continuous since that timestamp. The same API key returns HTTP 200 from gemini-2.5-flash (3/3 control), ruling out key, account, billing, or rate-limit issues. No incident is listed on the public status page; Lyria preview models do not appear to be tracked there.

We’ve already worked through the documented 500 INTERNAL remediation steps in the Gemini API troubleshooting guide (input length, blocked key, switch model, status page) — all ruled out by the evidence below.

Affected endpoints

  • https://generativelanguage.googleapis.com/v1beta/models/lyria-3-pro-preview:generateContent

  • https://generativelanguage.googleapis.com/v1beta/models/lyria-3-clip-preview:generateContent

Timeline (all times UTC)

Date Event
2026-05-16 Current prompt template deployed
2026-05-16 → 2026-05-27 22:52 Intermittent operation: 5 successful generations / 13 failed (~28% success on this prompt template)
2026-05-27 22:52 Last observed successful generation
2026-05-28 ~14:00 Investigation begins; 100% failure rate confirmed across multiple prompt shapes and both Lyria 3 siblings
2026-05-28 (controlled probes) 19 trials, 19 failures

Reproduction

Equivalent curl (key redacted as $GEMINI_API_KEY):

curl -sS -X POST \

"https://generativelanguage.googleapis.com/v1beta/models/lyria-3-pro-preview:generateContent" \

-H "x-goog-api-key: $GEMINI_API_KEY" \

-H "Content-Type: application/json" \

--data-binary '{"contents":[{"parts":[{"text":"<prompt body — available on request>"}]}]}'

Identical headers and request shape to the request that returned 200 on 2026-05-27 22:52.

Probe results

All probes from the same API key, same project, same headers. Lyrics held byte-identical to the known-good 2026-05-27 22:52 request unless noted.

Probe Model Prompt variant Trials Result Latency to 500
A0 (control) lyria-3-pro-preview Byte-identical to 2026-05-27 22:52 success 5 5/5 fail (500) 26–41s
A3 lyria-3-pro-preview Different lyrics + bare style descriptor 2 2/2 fail (500) 26–30s
A1.1 lyria-3-pro-preview Style + known-good lyrics, no other instructions 2 2/2 fail (500) ~30s
A1.2 lyria-3-pro-preview A1.1 with [Section] tags stripped 2 2/2 fail (500) ~30s
A1.3 lyria-3-pro-preview Style + meta-instruction + lyrics 2 2/2 fail (500) ~30s
A4.1 lyria-3-clip-preview Byte-identical known-good prompt 5 5/5 fail (500) 6–8s
A4.2 lyria-3-clip-preview Minimal style + minimal lyrics 5 5/5 fail (500) 5–8s
Cross-model control gemini-2.5-flash Trivial text prompt 3 3/3 success (200) -–

Total: 19/19 fail on Lyria 3 family. 3/3 success on Gemini text on the same key.

Verbatim response body (identical across all 19 failures)

{"error":{"code":500,"message":"Internal error encountered.","status":"INTERNAL"}}

No additional diagnostic information returned.

Latency signature is itself diagnostic

  • lyria-3-pro-preview: 26–41s per failed attempt

  • lyria-3-clip-preview: 5–8s per failed attempt

  • A separate diagnostic using a malformed request (literal \n instead of newlines) failed instantly — indicating that our well-formed requests are accepted and processed, then fail during generation, not at request validation.

This argues against request validation, rate limiting, quota, or deadline issues. The model accepts the request, begins inference, and errors internally.

Documented 500 INTERNAL causes — ruled out

  • “Input context too long”: ruled out. The 19 failures span prompt sizes from ~50 characters (minimal style + minimal lyrics on clip) to ~1,600 characters (full production prompt on pro). If length were the trigger, minimal variants would have succeeded.

  • Blocked / leaked API key: ruled out. Same key returns 200 on gemini-2.5-flash 3/3. No “API key was reported as leaked” message returned.

  • Active status-page incident: no relevant entry. Lyria preview models do not appear on the tracked status page.

  • Switch to another model: attempted with lyria-3-clip-preview; affected identically. No working sibling within Lyria 3.

  • 504 DEADLINE_EXCEEDED: not occurring. Latency well within any reasonable deadline.

What we’ve changed on our side

  • Identified and fixed an unrelated edge-worker parse error that masked these failures for ~24 hours.

  • Reduced retry attempts (5 → 2) and per-attempt timeout (75s → 30s) to limit wasted load during the incident.

  • **No changes to model selection, request format, headers, payload schema, or API key.

    What we’re asking for**

    1. Acknowledgment that this matches a known internal issue, or confirmation that it’s been added to the incident queue.

    2. Visibility into status or expected timeline for any fix in progress for the Lyria 3 family.

    3. Workaround, if any exists, that doesn’t require leaving Lyria 3 — since both pro-preview and clip-preview are affected identically.

    4. Notification when resolved so we can verify the byte-identical request returns to 200.

I was able to work around this by switching Lyria generation from the Gemini API / AI Studio API-key path to Vertex AI.

The same general Lyria generation flow is working again for me when called through Vertex AI using OAuth / Application Default Credentials and the Vertex Interactions endpoint:

POST https://aiplatform.googleapis.com/v1beta1/projects/{PROJECT_ID}/locations/global/interactions

Model:
lyria-3-pro-preview

So this seems specific to the Gemini API / API-key path rather than the prompt, model name, or my local SDK version. My previous tests with both lyria-3-clip-preview and lyria-3-pro-preview still return 500 INTERNAL through client.models.generate_content / Gemini API, including Google’s sample prompt.

In short:

  • Gemini API / API key / generate_content: still returns 500 INTERNAL
  • Vertex AI / OAuth ADC / interactions endpoint: returns audio successfully

@Dominik_Mauritz thank you, is there any documentation around this setup method? I’ll need to rewrite my approach but at this point I’m fed up of the failures on the Gemini API so I don’t really have any other choice.

To be honest, I didn’t implement it myself - I asked Codex to handle the migration to Vertex. It referenced this guide, even though the document itself includes a warning that it’s no longer being actively updated.

Hi @Dominik_Mauritz ,

we tried to reproduce this internally but it worked fine for us. If you’re still seeing the error, could you provide the code snippet you used?

Hi @Sai_Deepika_K,

This is my pre-Vertex path: direct google-genai Google AI SDK, using models.generate_content, not Vertex.

import os
from google import genai

client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])
model = os.environ.get("LYRIA_MODEL", "lyria-3-pro-preview")

prompt = "A calm acoustic folk song with a gentle guitar melody and soft strings."

response = client.models.generate_content(
    model=model,
    contents=prompt,
)

mp3 = None
text_parts = []

for part in response.parts or []:
    if part.inline_data is not None and part.inline_data.data:
        mp3 = part.inline_data.data
    elif part.text:
        text_parts.append(part.text)

if mp3 is None:
    raise RuntimeError("Lyria returned no audio")

with open("lyria-output.mp3", "wb") as f:
    f.write(mp3)

print("lyrics/text:", "\n".join(text_parts).strip() or None)

And the repo function shape:

@remote_retry
def generate_song(client: genai.Client, model: str, spec: PromptSpec) → GeneratedAudio:
response = client.models.generate_content(model=model, contents=spec.prompt)

mp3: bytes | None = None
lyrics_parts: list[str] = []
for part in response.parts or []:
    if part.inline_data is not None and part.inline_data.data:
        mp3 = part.inline_data.data
    elif part.text:
        lyrics_parts.append(part.text)

if mp3 is None:
    raise EmptyGenerationError(f"Lyria returned no audio for {spec.id!r}")

return GeneratedAudio(
    mp3=mp3,
    lyrics="\n".join(lyrics_parts).strip() or None,
)

As I’m using the Vertex API now that is working for me I don’t know if the problem still exists. @Pritesh seems to have the same problem and might be able to provide more recent information.

Cheers,

Dominik