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": "IwngPCJz6cCPR53",
  "original_source_code": "Nbp02iRiOa1rrII3A33",
  "project_name": "Z",
  "prompt": "o3OMyqIHgUHUdvM2tp",
  "source_ranges": [
    {
      "file": "NDMbYL41xQo5XusCBUVjRjuReiA3",
      "prompt": "CYJN1b0zN25MjWncf",
      "range": {
        "end": {
          "column": 26,
          "line": 1
        },
        "start": {
          "column": 1,
          "line": 20
        }
      }
    }
  ]
}'
201 Created
Response
{
  "code": "Z9ObuBjO2fmS9rgbhrU",
  "completed_at": "2025-04-21T20:00:03.344Z",
  "created_at": "2025-04-21T20:00:03.344Z",
  "error": "lGmV3h8h6o",
  "feedback": "thumbs_up",
  "id": "873b0f7c-f17c-4a66-bdb4-ddcd6f4839d5",
  "model": "kcl",
  "model_version": "sf8SzykPT9oG4PdEVU8",
  "original_source_code": "GLH8Boqjz8LHGDteSX",
  "prompt": "Sscx55bTuohTfovmpCqLeV",
  "source_ranges": [
    {
      "file": "B9Kgv5wXqUYqk1t7Cylpz7YFOfaE",
      "prompt": "LOYlIb7uopU0Y3mGks2qBaKKm",
      "range": {
        "end": {
          "column": 5,
          "line": 16
        },
        "start": {
          "column": 23,
          "line": 14
        }
      }
    }
  ],
  "started_at": "2025-04-21T20:00:03.344Z",
  "status": "uploaded",
  "updated_at": "2025-04-21T20:00:03.344Z",
  "user_id": "8f3dcd88-5797-4e39-a8ff-4d51e52164a5"
}