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": "oYeymDzco7RQS2SVGmTfgV89",
  "prompt": "svu4ix3aiddU04uUrpg",
  "source_ranges": [
    {
      "prompt": "HpaHVUbN",
      "range": {
        "end": {
          "column": 14,
          "line": 21
        },
        "start": {
          "column": 24,
          "line": 7
        }
      }
    }
  ]
}'
201 Created
Response
{
  "code": "CufilqCy0QdW0PLlqFjoqGhC",
  "completed_at": "2024-09-19T16:11:55.027Z",
  "created_at": "2024-09-19T16:11:55.027Z",
  "error": "sj",
  "feedback": "thumbs_down",
  "id": "2772246b-7915-4775-98cd-f33fe55abbe2",
  "model": "cad",
  "model_version": "PyX6m6b3oZimHD5pO3oXFzvdI",
  "original_source_code": "24ZhOuZ2",
  "prompt": "Fw8zn1A0iagPESupJwqiVVFuj",
  "source_ranges": [
    {
      "prompt": "9dcmkXplbeBNdds0cG",
      "range": {
        "end": {
          "column": 20,
          "line": 14
        },
        "start": {
          "column": 29,
          "line": 5
        }
      }
    }
  ],
  "started_at": "2024-09-19T16:11:55.027Z",
  "status": "failed",
  "updated_at": "2024-09-19T16:11:55.027Z",
  "user_id": "f4887498-f7f6-4c35-b4a9-1cb8a954f9d7"
}