API → ML → Iterate on a CAD model with a promptbeta
beta
Parameters
Name
Type
Req.
bodyapplication/json
objectoptionalObject Properties
Returns
- 201 Created
successful creation
Name
Type
Req.
body
objectoptionalObject Properties
Possible values
thumbs_up
: Thumbs up.thumbs_down
: Thumbs down.accepted
: Accepted.rejected
: Rejected.
Possible values
cad
: CAD.kcl
: KCL.kcl_iteration
: KCL iteration.
Possible values
queued
: The async API call is queued.uploaded
: The async API call was uploaded to be converted.in_progress
: The async API call is in progress.completed
: The async API call has completed.failed
: The async API call has failed.
post
/ml/text-to-cad/iteration$ curl -X POST "https://api.zoo.dev/ml/text-to-cad/iteration" \
--header "Authorization: Bearer $TOKEN" \
--header "Content-Type: application/json" \
--data '{
"original_source_code": "WO",
"prompt": "XZPzzLVK0Nwb7VCeUtVcYte0",
"source_ranges": [
{
"prompt": "psasjmkM",
"range": {
"end": {
"column": 6,
"line": 19
},
"start": {
"column": 4,
"line": 29
}
}
}
]
}'
201 Created
Response{
"code": "C27MDrrKhLmb0sX592JO26KGlSlwbS",
"completed_at": "2024-09-20T22:41:11.546Z",
"created_at": "2024-09-20T22:41:11.546Z",
"error": "VMXaeESlX8oPfBYAcjVkJBjZzKKA",
"feedback": "rejected",
"id": "166d24cd-6a5a-4453-9591-f16d0d8431f0",
"model": "kcl",
"model_version": "vkXW2KZXOIPo1VSH1B28Zm",
"original_source_code": "",
"prompt": "b1iyrB8RzFrj5WetgixsWG5htlBKd",
"source_ranges": [
{
"prompt": "sdii2",
"range": {
"end": {
"column": 14,
"line": 13
},
"start": {
"column": 28,
"line": 11
}
}
}
],
"started_at": "2024-09-20T22:41:11.546Z",
"status": "uploaded",
"updated_at": "2024-09-20T22:41:11.546Z",
"user_id": "cb41aafe-f8fe-4758-9d14-adfe6240e8f5"
}