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": "oYeymDzco7RQS2SVGmTfgV89",
"prompt": "svu4ix3aiddU04uUrpg",
"source_ranges": [
{
"prompt": "HpaHVUbN",
"range": {
"end": {
"column": 14,
"line": 21
},
"start": {
"column": 24,
"line": 7
}
}
}
]
}'
201 Created
Response{
"code": "CufilqCy0QdW0PLlqFjoqGhC",
"completed_at": "2024-09-19T16:11:55.027Z",
"created_at": "2024-09-19T16:11:55.027Z",
"error": "sj",
"feedback": "thumbs_down",
"id": "2772246b-7915-4775-98cd-f33fe55abbe2",
"model": "cad",
"model_version": "PyX6m6b3oZimHD5pO3oXFzvdI",
"original_source_code": "24ZhOuZ2",
"prompt": "Fw8zn1A0iagPESupJwqiVVFuj",
"source_ranges": [
{
"prompt": "9dcmkXplbeBNdds0cG",
"range": {
"end": {
"column": 20,
"line": 14
},
"start": {
"column": 29,
"line": 5
}
}
}
],
"started_at": "2024-09-19T16:11:55.027Z",
"status": "failed",
"updated_at": "2024-09-19T16:11:55.027Z",
"user_id": "f4887498-f7f6-4c35-b4a9-1cb8a954f9d7"
}