I suggest that the first thing to is to write some functions on the Arduino that control the LEDs and base the LED actions on the value of some variables and test them thoroughly on the Arduino. The classic things to do with a string or strings of programmable LEDs is to change the pattern, usually by having a function for each, but that can be difficult to exit from cleanly. Better to use switch/case and to have a case for each pattern with non blocking code. That gives you an easy way to receive serial data in loop() between executing the steps of a case
A simple API could accept a pattern number and switch to the requested one after tidying up the state of the LEDs, and run the pattern at a default speed. You could add a speed parameter to the API call and use a default value if it is not present or out of range.
If, for any reason you want a range of LEDs to do something then the API should accept the start and end numbers of the range and similarly with a range of colours to cut down the number of characters sent
There is a balance between sending clear values such as "pattern=1, speed=10" and "1,10" so maybe a compromise of "p1,s10" would be used
Have you considered adding a checksum to teh API messages to help prevent corrupted messages being acted on ?
How complicated do you want to make the API ?