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
      • 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": "WcDePblyuJHwD3KEKFJl2DSEb",
  "prompt": "5AdwIDF",
  "source_ranges": [
    {
      "prompt": "qVhxh7siMtyAgfu4xZkSPi9iRqA",
      "range": {
        "end": {
          "column": 12,
          "line": 30
        },
        "start": {
          "column": 29,
          "line": 30
        }
      }
    }
  ]
}'
201 Created
Response
{
  "code": "Jx1moGb6n",
  "completed_at": "2025-01-14T18:19:51.161Z",
  "created_at": "2025-01-14T18:19:51.161Z",
  "error": "y3DEDIpeLwhqcmMGXJ",
  "feedback": "thumbs_up",
  "id": "5f7c60e7-9281-4bad-8ac9-ee41600abf81",
  "model": "kcl",
  "model_version": "7ZnhBui",
  "original_source_code": "g8G7",
  "prompt": "",
  "source_ranges": [
    {
      "prompt": "JkEFpa0p2UyoTe32rEYH7H1TFfcUj",
      "range": {
        "end": {
          "column": 8,
          "line": 21
        },
        "start": {
          "column": 13,
          "line": 9
        }
      }
    }
  ],
  "started_at": "2025-01-14T18:19:51.161Z",
  "status": "failed",
  "updated_at": "2025-01-14T18:19:51.161Z",
  "user_id": "bfd32b7d-01b6-40fe-ac53-224187de2bb6"
}