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": "WO",
  "prompt": "XZPzzLVK0Nwb7VCeUtVcYte0",
  "source_ranges": [
    {
      "prompt": "psasjmkM",
      "range": {
        "end": {
          "column": 6,
          "line": 19
        },
        "start": {
          "column": 4,
          "line": 29
        }
      }
    }
  ]
}'
201 Created
Response
{
  "code": "C27MDrrKhLmb0sX592JO26KGlSlwbS",
  "completed_at": "2024-09-20T22:41:11.546Z",
  "created_at": "2024-09-20T22:41:11.546Z",
  "error": "VMXaeESlX8oPfBYAcjVkJBjZzKKA",
  "feedback": "rejected",
  "id": "166d24cd-6a5a-4453-9591-f16d0d8431f0",
  "model": "kcl",
  "model_version": "vkXW2KZXOIPo1VSH1B28Zm",
  "original_source_code": "",
  "prompt": "b1iyrB8RzFrj5WetgixsWG5htlBKd",
  "source_ranges": [
    {
      "prompt": "sdii2",
      "range": {
        "end": {
          "column": 14,
          "line": 13
        },
        "start": {
          "column": 28,
          "line": 11
        }
      }
    }
  ],
  "started_at": "2024-09-20T22:41:11.546Z",
  "status": "uploaded",
  "updated_at": "2024-09-20T22:41:11.546Z",
  "user_id": "cb41aafe-f8fe-4758-9d14-adfe6240e8f5"
}