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": "uWA4BkosK",
  "prompt": "5n9bQMa2xV",
  "source_ranges": [
    {
      "prompt": "5sXGD8VVUKrCjZCDhJ",
      "range": {
        "end": {
          "column": 28,
          "line": 23
        },
        "start": {
          "column": 9,
          "line": 8
        }
      }
    }
  ]
}'
201 Created
Response
{
  "code": "aRmieqcEFf",
  "completed_at": "2024-09-18T17:46:47.198Z",
  "created_at": "2024-09-18T17:46:47.198Z",
  "error": "V",
  "feedback": "thumbs_up",
  "id": "a3757bb9-eaa5-431c-aee0-68215dff4b04",
  "model": "kcl",
  "model_version": "q4AefC6QVTlB0Mk3RzcrGsmzW",
  "original_source_code": "7",
  "prompt": "YJc58z7aXaNtJvbhL4x6He",
  "source_ranges": [
    {
      "prompt": "7r4jLgxzSjL4jXska2t",
      "range": {
        "end": {
          "column": 11,
          "line": 23
        },
        "start": {
          "column": 17,
          "line": 15
        }
      }
    }
  ],
  "started_at": "2024-09-18T17:46:47.198Z",
  "status": "failed",
  "updated_at": "2024-09-18T17:46:47.198Z",
  "user_id": "bc5e914c-7117-42bb-b4f7-82bd8afa7813"
}