{
"code": "<string>",
"reasoning": "<string>",
"graph": {}
}Algorithmic Composer
Compose a Code pattern
Compose a new Strudel part or transform the current pattern.
POST
/
api
/
strudel
/
{
"code": "<string>",
"reasoning": "<string>",
"graph": {}
}Compose a new Strudel part or transform the current pattern.
Use request setup for account headers.
JSON body
string
required
Nonempty musical request.
string
Saved project to supply metadata.
string
Existing pattern to transform.
number
30 to 300.
string
For example, A minor.
string
Song style.
string
For example, 4/4.
string
Reference track name.
object
Nonnegative
start, end in seconds; optional trackId.number
Nonnegative position in seconds.
string[]
Active stem names.
object[]
Each requires
id, name, type; optional boolean muted, solo.string
Context, at most 4,000 characters. Takes precedence over the aliases.
string
Context alias, at most 4,000 characters.
string
Second context alias, at most 4,000 characters.
boolean
Enable NDJSON.
Accept: application/x-ndjson also enables it.JSON response
string
Validated pattern.
string
Short musical rationale.
object
Routing summary described below.
Graph summary
| Field | Type | Use |
|---|---|---|
intent | string | compose or transform. |
targetLayers | string[] | drums, bass, chords, arp. |
mountedLibraries | string[] | Library slices selected for this request. |
archetypeId / archetypeLabel | string | Selected genre reference. |
refRole | string | drums, bass, vocals, keys, master. |
sectionNode | string | intro, verse, build, drop, breakdown. |
estimatedTokens | integer | Character-based estimate of the prepared messages. |
NDJSON events
| Field | Type | Use |
|---|---|---|
graph | event | Routing summary. |
status | event | step describes current work. |
reasoning | event | text explains the musical choices. |
code | event | code updates the REPL. |
done | event | Final code and optional reasoning. |
error | event | message describes a failed run. |
Use the result
Integrate Composer. JSON is the default; consume streamed events bytype. The /strudel/ alias has the same contract.⌘I