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": "bcjWLpAALshLqK2Mumt8EoApuF",
"prompt": "Ll5NGru6YQCw1w4A",
"source_ranges": [
{
"prompt": "ksTq5ZKhUamCf2IEcCPaG",
"range": {
"end": {
"column": 27,
"line": 1
},
"start": {
"column": 7,
"line": 31
}
}
}
]
}'
201 Created
Response{
"code": "pgchEYCom",
"completed_at": "2024-11-22T17:03:05.716Z",
"created_at": "2024-11-22T17:03:05.716Z",
"error": "cf",
"feedback": "accepted",
"id": "1ff642d6-3437-4649-aeaa-e6a08a07b82f",
"model": "cad",
"model_version": "eGquQFR64BQ4QOAynKTL73",
"original_source_code": "yyFdq4Ep2sVIRhZO8s4PttjRkReM",
"prompt": "r81k9MIVuetplE5YlIJZExC6gRxiX",
"source_ranges": [
{
"prompt": "K9mrfWWpmu7wYn00",
"range": {
"end": {
"column": 11,
"line": 29
},
"start": {
"column": 1,
"line": 30
}
}
}
],
"started_at": "2024-11-22T17:03:05.716Z",
"status": "completed",
"updated_at": "2024-11-22T17:03:05.716Z",
"user_id": "56db707d-f0f7-4295-8810-0da2ab37bd9b"
}