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": "9OqPUGkcH",
  "original_source_code": "KwbPMjKC1Y",
  "project_name": "UUJxKQf0y7PAoUJdYu",
  "prompt": "",
  "source_ranges": [
    {
      "file": "in38ZYjbWpebo6Pxp4ReHEihCt6",
      "prompt": "FsQZYHcH",
      "range": {
        "end": {
          "column": 5,
          "line": 4
        },
        "start": {
          "column": 11,
          "line": 30
        }
      }
    }
  ]
}'
201 Created
Response
{
  "code": "d8N",
  "completed_at": "2025-03-12T01:36:22.511Z",
  "created_at": "2025-03-12T01:36:22.511Z",
  "error": "XnxwwVsdMCWI",
  "feedback": "rejected",
  "id": "2a8b594b-9085-45b5-b41a-0fad98773dca",
  "model": "kcl",
  "model_version": "zEBWI5elUE",
  "original_source_code": "YeK8BdDJo1VzXzMji",
  "prompt": "6DYAHYN8t1jBRma0",
  "source_ranges": [
    {
      "file": "TkubKqJ87O3Az1V9wOlWKiiTvBq6",
      "prompt": "YesJ7ZFUJwNopfSLhMA4Dcx",
      "range": {
        "end": {
          "column": 27,
          "line": 12
        },
        "start": {
          "column": 1,
          "line": 15
        }
      }
    }
  ],
  "started_at": "2025-03-12T01:36:22.511Z",
  "status": "completed",
  "updated_at": "2025-03-12T01:36:22.511Z",
  "user_id": "0d1a888e-16b8-4374-8367-c8fed051921b"
}