Skip to main content
Call POST /api/strudel/ with a nonempty prompt. Supply project context so the new part fits the arrangement. Complete request fields.

Supply context

Send songId to load song metadata. Add stylePrompt, active stems and tracks, plus musicalContext extracted by your client. Track entries require id, name and type; muted and solo are optional. Use selection for a region or playhead for the current position. Send currentCode to transform a pattern. Context aliases resolve in this order: songContext, musicalContext, musical_context.

Read and play the pattern

JSON returns code, optional reasoning and a graph summary. Enable NDJSON with stream: true or Accept: application/x-ndjson. Reuse the NDJSON reader. Rawchunks validates the final pattern with its client parser and schedules it locally at the project BPM. Your integration supplies its own player or reuses the open-source app’s parser and audio engine.
Code pattern with reference selector, AI Code action, Run, macros and Composer log.

Current Code REPL with Composer output and local playback controls.

Inspect before generating

Use graph routing to inspect selected libraries and theory references without model generation. Validation cleans code and checks supported notation. Drum, harmony, synth and archetype library routes expose the musical references. POST /api/editing/strudel accepts the same context fields and returns only { code }. Use the primary route for streaming and graph details. The Code walkthrough covers versions and macros. Composer architecture explains graph routing and ReAct.