API → MLOpen a websocket to prompt the ML copilot
Parameters
Name
Type
Req.
bodyapplication/json
oneOfoptionalOne of
user
objectoptionalObject Properties
Possible values
fast: Use a combination of models and reasoning effort for fast results.thoughtful: Use a model and effort that results in thoughtful responses.
Possible values
gpt5_nano: gpt-5-nanogpt5_mini: gpt-5-minigpt5_codex: gpt-5-codexgpt5: gpt-5o3_mini: o3-miniazure_o3_mini: azure o3-miniazure_gpt4o: azure gpt-4oazure_gpt4o_mini: azure gpt-4o-mini
Possible values
low: Low reasoningmedium: Medium reasoninghigh: High reasoning
Possible values
user
Returns
Websocket responses
Name
Type
Req.
body
oneOfoptionalOne of
object
Object Properties
session_data
objectoptionalObject Properties
object
Object Properties
conversation_id
objectrequiredObject Properties
object
Object Properties
tool_output
objectoptionalObject Properties
result
oneOfoptionalOne of
text_to_cad
objectoptionalObject Properties
Possible values
text_to_cad
edit_kcl_code
objectoptionalObject Properties
Possible values
edit_kcl_code
mechanical_knowledge_base
objectoptional
object
Object Properties
project_updated
objectoptionalObject Properties
object
Object Properties
reasoning
oneOfoptionalOne of
kcl_code_examples
objectoptionalfeature_tree_outline
objectoptionaldesign_plan
objectoptionalObject Properties
steps
arrayoptionalArray of
Possible values
design_plan
generated_kcl_code
objectoptionalkcl_code_error
objectoptionalcreated_kcl_file
objectoptionalupdated_kcl_file
objectoptionaldeleted_kcl_file
objectoptional
object
Object Properties
end_of_stream
objectoptionalObject Properties
get
/ws/ml/copilot# WebSocket endpoint
# curl does not work for WebSocket endpoints.
# Use an SDK or a WebSocket client.