protocols

Generate Protocol Endpoint

Generate a UCP protocol from a natural-language description.

When the description leaves a value undecided that would change what runs on the channel, the response carries questions and no protocol. Answer them and call again with the full clarifications history.

Any protocol that is returned has already passed the same validation as POST /protocols/validate and contains no unresolved input["..."] references, so it can be saved as an experiment template directly.

Parameters

body : GenerateProtocolRequest The natural-language prompt, any answers already given, and an optional existing protocol to edit rather than replace.

Returns

GenerateProtocolResponse Either the generated YAML with a suggested name, an explanation, and the assumptions made — or the questions needed to write it.

Raises

ExternalServiceError If the model could not produce a valid protocol.

post/protocols/generate

Request body

promptstring required

Plain-English description of the test to run, e.g. '1C/1C cycling for 200 cycles between 4.2 V and 2.5 V with 10-minute rests'.

current_protocolstring nullable

Optional existing protocol as UCP YAML. When supplied the prompt is treated as an edit to it rather than a fresh protocol.

cell_specification_idstring nullable

Cell the test will run on. Its voltage limits, capacity and rate limits are given to the generator as facts, so it stops guessing (or asking) about them.

skip_existingboolean

Skip the saved-protocol search and write a new protocol. Set when the user rejects the suggested matches.

Response

Successful Response

protocol_yamlstring
namestring
explanationstring
assumptionsstring[]

Changes