> For the complete documentation index, see [llms.txt](https://sonic-ai-works.gitbook.io/sonic-networks-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sonic-ai-works.gitbook.io/sonic-networks-docs/documentation/application-and-website/studio-dashboard-and-ai-music-generator.md).

# Studio Dashboard & AI Music Generator

SONIC AI Studio product contract for creator workflows, model responsibility, provider-backed music generation, durable operations, provenance and AI Credit accounting.

SONIC AI Studio is the authenticated creator workspace for AI music creation, projects, generation history, lyrics, remixing, stems and contextual AI assistance. Provider credentials, private model IDs, privileged routing configuration and operational administration remain server-side.

## Studio product hierarchy

The Studio should make the execution path understandable without exposing implementation internals:

```
Creative brief
→ Creative Model
→ Music Model
→ Duration / generation settings
→ Generate
→ progress + results
→ Open in Project
```

The primary composer is the dominant card. Secondary controls should not visually compete with the brief and Generate action.

## Responsibility boundary

| Layer                         | Responsibility                                                                                       | Authority boundary                                                                |
| ----------------------------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| **Sonic AI v1.0 Pro**         | creator assistance, context, prompt enhancement, structured workflows and tool routing               | inherits actor authority; cannot elevate permissions                              |
| **OpenAI / reasoning route**  | optional server-side brief refinement or project reasoning                                           | text/reasoning only unless separately configured for another supported capability |
| **Configured music provider** | actual audio generation and provider execution state                                                 | current MVP is primarily Suno; provider remains replaceable                       |
| **SONIC operation layer**     | durable operation, idempotency, AI Credits, callback/poll merge, normalized assets and project state | server-authoritative product/economic state                                       |

```
creator request
→ optional text refinement
→ validated GenerationOperation
→ AI Credit reservation
→ configured music provider
→ callback / poll merge
→ normalized provider-confirmed assets
→ Project
→ settle or release reservation
```

## Creative Model

Recommended product-facing modes:

### SONIC Direct

Uses the creator brief without external text rewriting. SONIC still performs validation, policy checks and provider routing.

### OpenAI Brief Refiner

Sends the permitted brief/context to a server-side OpenAI reasoning model for text refinement before music dispatch. The original creator brief remains preserved independently.

UI should show when refinement was applied. It should not label the OpenAI model as the audio-generation model.

## Music Model

Music-model choices come from the server model registry. The UI receives safe display metadata only.

A selection can expose:

```
displayName
providerDisplayName
providerLogo
capabilities
availability
recommendedFor
```

Do not expose provider API keys, internal model IDs that are not intended to be public, private routing policy or cost internals.

If a selected music model is unavailable, the UI shows an explicit unavailable/error state. Silent model substitution is permitted only when the selected routing policy explicitly allows it.

## Duration presets

Recommended Studio presets:

| Duration | Intent               |
| -------- | -------------------- |
| `1:30`   | short-form / concept |
| `2:00`   | standard             |
| `3:00`   | full song            |
| `3:30`   | extended             |
| `4:00`   | long-form            |

The selected preset is requested intent. The provider-confirmed asset duration is authoritative after completion.

Persist both where available:

```
requestedDurationSeconds
providerDurationSeconds
```

## Music generation

`GenerationOperation` is the durable SONIC business identity. Provider task IDs remain external correlation identifiers.

```
request
→ validate
→ authorize
→ create/recover idempotent operation
→ reserve AI Credits
→ dispatch
→ callback/poll merge
→ COMPLETED | FAILED | CANCELLED | REQUIRES_REVIEW
→ settle | release
```

Provider dispatch occurs only after valid signed-session context, access/entitlement checks, valid input, remote-asset URL validation, resolved atomic credit cost, operation creation and successful reservation.

## Studio generation states

Recommended user-facing states:

```
Preparing
→ Reserving Credits
→ Queued
→ Generating
→ Partial Results
→ Finalizing
→ Completed
```

Exceptional states:

```
Failed
Cancelled
Requires Review
Provider Unavailable
Credits Required
Session Expired
```

Progress is informative. It must not imply settlement or completion before server state confirms the corresponding transition.

## Unknown-state recovery

If a request times out after provider dispatch, the client must recover the existing operation instead of starting a second logical generation.

```
timeout
→ GET/recover durable operation
→ poll/reconcile provider evidence
→ continue existing lifecycle
```

The Generate button should disable or transition to recovery state while the existing operation is unresolved.

## Result card

A completed track card should prioritize:

```
title / generated label
provider-confirmed duration
playback when an authoritative asset URL exists
generation/provider responsibility summary
save / Open in Project
secondary provenance/details
```

Do not fabricate playable audio URLs, completion timestamps, provider state or generation IDs.

## Project handoff

`Open in Project` creates or links durable project state only after the output is accepted and the destination mutation is authorized.

Browser-local drafts may exist for offline/early UX, but they must be labeled as local and must not be presented as synchronized server projects.

## AI Credits

AI Credits remain separate from SONIC, SOL, SUI (Bridged), USDC/EURC, reputation and season points.

```
grant / purchase
→ available
→ reserve
→ settle | release
```

Ledger retry must never trigger provider redispatch. Missing balance/service state renders unavailable rather than a fabricated zero.

## Responsive Studio

### Desktop

Use the full composer plus generation/results workspace. Advanced controls may remain visible when they improve decision quality.

### Tablet

Keep composer, model selection and Generate prominent. Secondary project/context panels stack or collapse.

### Mobile / 390px

Prioritize:

```
brief
creative model
music model
duration
Generate
current operation
results
```

Advanced controls move into sheets/disclosures rather than compressing the desktop interface. Touch targets remain at least 44px and focus-visible/keyboard behavior remains defined for web.

## Accessibility and motion

* native/select semantics or fully accessible listbox semantics for model selectors;
* persistent visible focus states;
* status text in addition to color;
* progress announcements that do not spam assistive technology;
* reduced-motion disables cinematic/glass transitions that are not functionally required.

## Security invariant

```
client request
≠ provider authority
≠ credit authority

signed session
+ server authorization
+ validated generation settings
+ durable operation
+ successful reservation
+ provider correlation
+ normalized result validation
+ exactly-once financial transition
= durable Studio generation
```

Provider credentials, wallet secrets, private keys and privileged operational settings are never returned to client JavaScript.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sonic-ai-works.gitbook.io/sonic-networks-docs/documentation/application-and-website/studio-dashboard-and-ai-music-generator.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
