---
updatedAt: 2025-03-06T23:35:29.000Z
agentTools:
  projectIndex: https://docs.tenyks.ai/llms.txt
---

# Create a Model

This endpoint creates a model for a given dataset.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "API Endpoints",
    "version": "1.0.1"
  },
  "servers": [
    {
      "url": "https://{base_url}.tenyks.ai",
      "description": "The Tenyks API",
      "variables": {
        "base_url": {
          "enum": [
            "dashboard",
            "sandbox"
          ],
          "default": "dashboard"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Data Upload GCS"
    }
  ],
  "paths": {
    "/api/workspaces/tenyks/datasets/{dataset_key}/model_inferences": {
      "post": {
        "tags": [
          "Data Upload GCS"
        ],
        "summary": "Create a Model",
        "description": "This endpoint creates a model for a given dataset.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModelPayload"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "dataset_key",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique key assigned  to your dataset when it was created.",
            "example": "face_detection"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ModelPayload": {
        "type": "object",
        "properties": {
          "display_name": {
            "type": "string",
            "description": "Name of your model to be displayed on the Tenyks dashboard.",
            "example": "yolo_v8"
          },
          "key": {
            "type": "string",
            "description": "Model key",
            "example": "yolo_v8"
          },
          "iou_threshold": {
            "type": "string",
            "description": "Intersection over Union threshold",
            "default": "0.5"
          },
          "confidence_threshold": {
            "type": "string",
            "description": "Confidence threshold",
            "default": "0.5"
          }
        },
        "required": [
          "display_name",
          "key",
          "iou_threshold",
          "confidence_threshold"
        ]
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  }
}
```