API → MLIterate on a CAD model with a prompt
beta

Parameters

Name

Type

Req.

Returns

  • 201 Created

    successful creation

    Name

    Type

    Req.

    body

    object
    optional
    Object Properties
    • code

      string
      optional
    • completed_at

      string / ISO-8601
      optional
    • created_at

      string / ISO-8601
      optional
    • error

      string
      optional
    • feedback

      string
      optional
      Possible values
      • thumbs_up:  Thumbs up.
      • thumbs_down:  Thumbs down.
      • accepted:  Accepted.
      • rejected:  Rejected.
    • id

      string / UUID
      optional
    • model

      string
      optional
      Possible values
      • cad:  CAD.
      • kcl:  KCL.
      • kcl_iteration:  KCL iteration.
    • model_version

      string
      optional
    • original_source_code

      string
      optional
    • prompt

      string
      optional
    • source_ranges

      array
      optional
      Array of
      • file

        string
        optional
      • prompt

        string
        optional
      • range

        object
        optional
        Object Properties
        • end

          object
          optional
          Object Properties
        • start

          object
          optional
          Object Properties
    • started_at

      string / ISO-8601
      optional
    • status

      string
      optional
      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.
    • updated_at

      string / ISO-8601
      optional
    • user_id

      string / UUID
      optional
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"
}