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": "3KokT5tx65jIHfD",
  "original_source_code": "7L1Lz",
  "project_name": "OGh",
  "prompt": "xLSMOW5fsuCF8lQ",
  "source_ranges": [
    {
      "file": "PpTC3PlHq63BN73vilrHmsmB",
      "prompt": "8Dcwf7UrNKqKsh",
      "range": {
        "end": {
          "column": 3,
          "line": 2
        },
        "start": {
          "column": 13,
          "line": 5
        }
      }
    }
  ]
}'
201 Created
Response
{
  "code": "NKLJfc",
  "completed_at": "2025-04-25T16:37:46.550Z",
  "created_at": "2025-04-25T16:37:46.550Z",
  "error": "yTv8wbcz0jnKcQGfFKoTWl",
  "feedback": "thumbs_up",
  "id": "5e4d604b-818b-40d1-b292-80f29cc03e26",
  "model": "kcl",
  "model_version": "X0jpINFawYIbR7KER27Y7",
  "original_source_code": "YcuzcZJCoOqEU4u256hFHqWq",
  "prompt": "ek5nDyyTCGzZhQIMqRwPl0ablyjbcd",
  "source_ranges": [
    {
      "file": "mFm",
      "prompt": "wMlz74Rhl40MFez2kE8io",
      "range": {
        "end": {
          "column": 30,
          "line": 19
        },
        "start": {
          "column": 7,
          "line": 28
        }
      }
    }
  ],
  "started_at": "2025-04-25T16:37:46.550Z",
  "status": "uploaded",
  "updated_at": "2025-04-25T16:37:46.550Z",
  "user_id": "f451c858-327d-471d-8d67-be22c2a604ef"
}