Lyria
Google · 2 models · Text, Image → Text, Audio
https://onerouter.com/v1/chat/completionsHow to call
Pass any model ID from this series in the model field, e.g. google/lyria-3-pro-preview. The example on the right uses Lyria 3 Pro.
Overview
Lyria is Google's music-generation family. It turns text (and image) prompts into generated audio.
This series includes 2 models: google/lyria-3-pro-preview, google/lyria-3-clip-preview. They share the same request shape — switching between them is a one-line change to the model field of the Chat Completions API.
Models in this series
Switch tabs to compare each model's ID, context window, inputs, outputs, and capabilities. Check the Models page for current availability and pricing before use.
google/lyria-3-pro-preview| Provider | |
| Context window | 1.05M |
| Input | Text, Image |
| Output | Text, Audio |
| Summary | Lyria 3 Pro Preview is Google's music-generation model. It turns text (and image) prompts into generated audio, with a very large context window. |
| Strengths | Music generation from text or image prompts with a large context window. |
| Supported parameters | `max_tokens`, `response_format`, `seed`, `temperature`, `top_p` |
Request headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string · required | required | Bearer token, formatted as `Bearer YOUR_API_KEY`. |
| Content-Type | string · required | required | Must be `application/json`. |
Request body
Audio-capable models are called through Chat Completions with audio content parts, or through the dedicated audio routes. Common chat fields:
| Parameter | Type | Required | Description | Values |
|---|---|---|---|---|
| model | string | required | Audio model ID from this series (see the tabs above). | |
| messages | array | required | Conversation messages. Content may include `input_audio` parts (base64 audio + format). | |
| modalities | array | optional | Output modalities to request, e.g. `["text", "audio"]`. | |
| audio | object | optional | Output audio config, e.g. `{"voice": "alloy", "format": "mp3"}`. | |
| max_tokens | integer | optional | Maximum tokens to generate. | |
| temperature | number | optional | Sampling temperature. | |
| stream | boolean | optional | Stream the response as SSE. | truefalse |
Response fields
A non-streaming call returns a chat.completion object (see the panel on the right).
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | optional | Unique identifier for the completion. |
| choices | array | optional | Generated choices. `choices[0].message.content` holds the reply. |
| choices[].finish_reason | string | optional | Why generation stopped: `stop`, `length`, `tool_calls`, or `content_filter`. |
| usage | object | optional | Token accounting: `prompt_tokens`, `completion_tokens`, `total_tokens`. |
| model | string | optional | The model that produced the response. |
Model-dependent features
OneRouter keeps protocol compatibility and forwards model-specific parameters where supported. Features such as tool calling, structured output, reasoning, prompt caching, web search, image input, audio input, video generation, and provider-specific options depend on the selected model and upstream provider. Check the model detail page before relying on a feature in production.