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": "bcjWLpAALshLqK2Mumt8EoApuF",
  "prompt": "Ll5NGru6YQCw1w4A",
  "source_ranges": [
    {
      "prompt": "ksTq5ZKhUamCf2IEcCPaG",
      "range": {
        "end": {
          "column": 27,
          "line": 1
        },
        "start": {
          "column": 7,
          "line": 31
        }
      }
    }
  ]
}'
201 Created
Response
{
  "code": "pgchEYCom",
  "completed_at": "2024-11-22T17:03:05.716Z",
  "created_at": "2024-11-22T17:03:05.716Z",
  "error": "cf",
  "feedback": "accepted",
  "id": "1ff642d6-3437-4649-aeaa-e6a08a07b82f",
  "model": "cad",
  "model_version": "eGquQFR64BQ4QOAynKTL73",
  "original_source_code": "yyFdq4Ep2sVIRhZO8s4PttjRkReM",
  "prompt": "r81k9MIVuetplE5YlIJZExC6gRxiX",
  "source_ranges": [
    {
      "prompt": "K9mrfWWpmu7wYn00",
      "range": {
        "end": {
          "column": 11,
          "line": 29
        },
        "start": {
          "column": 1,
          "line": 30
        }
      }
    }
  ],
  "started_at": "2024-11-22T17:03:05.716Z",
  "status": "completed",
  "updated_at": "2024-11-22T17:03:05.716Z",
  "user_id": "56db707d-f0f7-4295-8810-0da2ab37bd9b"
}