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": "WcDePblyuJHwD3KEKFJl2DSEb",
"prompt": "5AdwIDF",
"source_ranges": [
{
"prompt": "qVhxh7siMtyAgfu4xZkSPi9iRqA",
"range": {
"end": {
"column": 12,
"line": 30
},
"start": {
"column": 29,
"line": 30
}
}
}
]
}'
201 Created
Response{
"code": "Jx1moGb6n",
"completed_at": "2025-01-14T18:19:51.161Z",
"created_at": "2025-01-14T18:19:51.161Z",
"error": "y3DEDIpeLwhqcmMGXJ",
"feedback": "thumbs_up",
"id": "5f7c60e7-9281-4bad-8ac9-ee41600abf81",
"model": "kcl",
"model_version": "7ZnhBui",
"original_source_code": "g8G7",
"prompt": "",
"source_ranges": [
{
"prompt": "JkEFpa0p2UyoTe32rEYH7H1TFfcUj",
"range": {
"end": {
"column": 8,
"line": 21
},
"start": {
"column": 13,
"line": 9
}
}
}
],
"started_at": "2025-01-14T18:19:51.161Z",
"status": "failed",
"updated_at": "2025-01-14T18:19:51.161Z",
"user_id": "bfd32b7d-01b6-40fe-ac53-224187de2bb6"
}