Skip to content

Lyria2

POST/v1/run

Lyria 2 is Google's AI audio generation model. Produce high-quality music tracks, sound effects, and audio landscapes from natural language prompts.

Request body

Submit an async generation request. The model field selects the model; other fields are model-specific input parameters.

stringmodelrequired

Model identifier. Set to google/lyria-2.

Default: google/lyria-2

stringpromptrequired

The text prompt describing the music you want to generate

Optional<integer>seed

A seed for deterministic generation. If provided, the model will attempt to produce the same audio given the same prompt and other parameters.

Response Schema

The submit endpoint returns an accepted generation task. Poll the result endpoint with the returned id for terminal outputs or errors.

Optional<string>error

Error message if the task failed. Empty on success.

stringidrequired

Unique identifier for the generation task.

Optional<string>model

Model ID used for the prediction.

Optional<array>outputs

Array of generated content. Empty when status is not completed.

stringstatusrequired

Status of the task: pending, running, completed, failed, or timeout.

Allowed values: pending, running, completed, failed, timeout

Model capabilities

array<string>capability_tagsrequired

Capabilities declared by the model registry.

Default: text-to-audio

stringexecution_moderequired

Execution mode declared by the model registry.

Default: async