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 '{
"kcl_version": "wuUeng0TRwd0cEvvLAl7Nd",
"original_source_code": "St75JRii",
"project_name": "kfaTFEz08pzjNmovUOzilTZUMTP2xG",
"prompt": "397xs1Ark9Y4cyyiMAhLwni",
"source_ranges": [
{
"file": "gKkfMdreDMoeEfxFgcQLgqVo",
"prompt": "onJ8ylUh",
"range": {
"end": {
"column": 24,
"line": 3
},
"start": {
"column": 12,
"line": 1
}
}
}
]
}'
201 Created
Response{
"code": "l6N4pugqQeQ7jHTp0DC4B3VnyWm",
"completed_at": "2025-02-21T16:37:07.859Z",
"created_at": "2025-02-21T16:37:07.859Z",
"error": "KTRYpzgM2lbOr",
"feedback": "thumbs_down",
"id": "dc5d19a2-34de-4d72-82ab-a796e3a49422",
"model": "cad",
"model_version": "lksDsc9pR41aSarBlUdAJu78",
"original_source_code": "Ju66KKx",
"prompt": "QuhQdPHzO7Ob5v",
"source_ranges": [
{
"file": "GbfXZSsoCsr7fhc6rzg8KTaMZzo",
"prompt": "",
"range": {
"end": {
"column": 21,
"line": 7
},
"start": {
"column": 1,
"line": 19
}
}
}
],
"started_at": "2025-02-21T16:37:07.859Z",
"status": "completed",
"updated_at": "2025-02-21T16:37:07.859Z",
"user_id": "0cf0d3fe-d386-49f1-9c30-4aa7baf8129e"
}