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": "RYEcwlx8kpKPfVeF",
"prompt": "sqaAkEdyJqxqIB1p7wA4I6NKTC",
"source_ranges": [
{
"file": "iNWbKSv0S",
"prompt": "qkB0kS4RIYjG39FSRvEERN",
"range": {
"end": {
"column": 28,
"line": 8
},
"start": {
"column": 16,
"line": 9
}
}
}
]
}'
201 Created
Response{
"code": "AyXC",
"completed_at": "2025-02-11T16:12:02.509Z",
"created_at": "2025-02-11T16:12:02.509Z",
"error": "",
"feedback": "thumbs_down",
"id": "a6d96120-fd4a-41a1-a008-2e394ece429c",
"model": "cad",
"model_version": "NjCkgIvQtgSNdZo8",
"original_source_code": "XfVLA2e",
"prompt": "nIi82QVsB",
"source_ranges": [
{
"file": "YXiXONomN5Clr4q6pgjZMkt",
"prompt": "X1n",
"range": {
"end": {
"column": 4,
"line": 9
},
"start": {
"column": 6,
"line": 19
}
}
}
],
"started_at": "2025-02-11T16:12:02.509Z",
"status": "in_progress",
"updated_at": "2025-02-11T16:12:02.509Z",
"user_id": "6ebe43b0-479f-4f66-9a78-c5bb1ea60d8c"
}