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 '{
  "original_source_code": "RYEcwlx8kpKPfVeF",
  "prompt": "sqaAkEdyJqxqIB1p7wA4I6NKTC",
  "source_ranges": [
    {
      "file": "iNWbKSv0S",
      "prompt": "qkB0kS4RIYjG39FSRvEERN",
      "range": {
        "end": {
          "column": 28,
          "line": 8
        },
        "start": {
          "column": 16,
          "line": 9
        }
      }
    }
  ]
}'
201 Created
Response
{
  "code": "AyXC",
  "completed_at": "2025-02-11T16:12:02.509Z",
  "created_at": "2025-02-11T16:12:02.509Z",
  "error": "",
  "feedback": "thumbs_down",
  "id": "a6d96120-fd4a-41a1-a008-2e394ece429c",
  "model": "cad",
  "model_version": "NjCkgIvQtgSNdZo8",
  "original_source_code": "XfVLA2e",
  "prompt": "nIi82QVsB",
  "source_ranges": [
    {
      "file": "YXiXONomN5Clr4q6pgjZMkt",
      "prompt": "X1n",
      "range": {
        "end": {
          "column": 4,
          "line": 9
        },
        "start": {
          "column": 6,
          "line": 19
        }
      }
    }
  ],
  "started_at": "2025-02-11T16:12:02.509Z",
  "status": "in_progress",
  "updated_at": "2025-02-11T16:12:02.509Z",
  "user_id": "6ebe43b0-479f-4f66-9a78-c5bb1ea60d8c"
}