{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oneinfer-ai/json-schema/oneinfer-ai-deploy-cloud-model-request-schema.json",
  "title": "DeployCloudModelRequest",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oneinfer-ai-openapi.json#/components/schemas/DeployCloudModelRequest",
  "properties": {
    "provider_name": {
      "type": "string",
      "title": "Provider Name"
    },
    "instance_name": {
      "type": "string",
      "title": "Instance Name"
    },
    "gpu_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Gpu Id"
    },
    "gpu_num": {
      "type": "integer",
      "title": "Gpu Num",
      "default": 0
    },
    "disk_size": {
      "type": "integer",
      "title": "Disk Size",
      "default": 0
    },
    "image_url": {
      "type": "string",
      "title": "Image Url"
    },
    "ports": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "items": {},
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Ports",
      "description": "Ports exposed by the selected catalog or registry image"
    },
    "envs": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Envs",
      "description": "Environment variables required by the image"
    },
    "command": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Command",
      "description": "Container command or arguments"
    },
    "start_command": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Start Command",
      "description": "Catalog alias for the container command"
    },
    "kind": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Kind",
      "description": "Novita instance kind",
      "default": "gpu"
    },
    "image_source": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Image Source",
      "description": "Image source: catalog or registry"
    },
    "registry_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Registry Url",
      "description": "Container registry URL or host"
    },
    "registry_image": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Registry Image",
      "description": "Full private registry image path"
    },
    "registry_username": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Registry Username",
      "description": "Container registry username"
    },
    "registry_password": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Registry Password",
      "description": "Container registry password or access token"
    },
    "registry_auth_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Registry Auth Name",
      "description": "Friendly name for saved registry credentials"
    },
    "registry_credential_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Registry Credential Id",
      "description": "Saved OneInfer registry credential ID"
    },
    "registry_auth_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Registry Auth Id",
      "description": "Provider registry auth ID"
    },
    "container_registry_auth_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Container Registry Auth Id",
      "description": "Runpod container registry auth ID"
    },
    "region": {
      "type": "string",
      "title": "Region"
    },
    "startup_script": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Startup Script",
      "description": "Startup script to run on instance launch"
    },
    "additional_volume_size": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Additional Volume Size",
      "description": "Additional volume size in GB (Verda: volume, Novita AI: network storage)"
    },
    "additional_volume_region": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Additional Volume Region",
      "description": "Volume Region"
    },
    "storage": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/StorageAttachment"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Storage",
      "description": "Persistent storage volumes to attach"
    },
    "volume_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Volume Name",
      "description": "Name of existing volume to attach"
    },
    "volume_region": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Volume Region",
      "description": "Region hint for an existing external volume"
    },
    "compute_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Compute Type",
      "description": "Compute type (e.g. CPU, GPU)"
    },
    "plan_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Plan Id",
      "description": "Provider plan ID for CPU instances"
    },
    "cpu_flavor_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cpu Flavor Id",
      "description": "CPU flavor ID for CPU instances"
    },
    "is_spot": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Is Spot",
      "description": "Provision as a spot instance (Verda only). Uses spot pricing for credit checks.",
      "default": false
    },
    "endpoint_name": {
      "type": "string",
      "minLength": 1,
      "title": "Endpoint Name",
      "description": "Inference endpoint display name"
    },
    "model_source": {
      "type": "string",
      "enum": [
        "catalog",
        "huggingface",
        "custom"
      ],
      "title": "Model Source",
      "default": "huggingface"
    },
    "model_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model Id",
      "description": "Hugging Face model id or URL"
    },
    "model_template_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model Template Id",
      "description": "OneInfer model-template id"
    },
    "custom_model_s3_path": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Custom Model S3 Path",
      "description": "Uploaded custom-model S3 path"
    },
    "serving_library": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Serving Library",
      "description": "Serving runtime used to expose an OpenAI-compatible endpoint",
      "default": "vllm"
    },
    "hf_access_token": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Hf Access Token",
      "description": "Optional Hugging Face access token for gated/private models"
    },
    "scaling_type": {
      "type": "string",
      "enum": [
        "queue",
        "request_count"
      ],
      "title": "Scaling Type",
      "default": "queue"
    },
    "max_concurrency": {
      "type": "integer",
      "minimum": 1.0,
      "title": "Max Concurrency",
      "default": 1
    },
    "min_workers": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Min Workers",
      "default": 0
    },
    "max_workers": {
      "type": "integer",
      "minimum": 1.0,
      "title": "Max Workers",
      "default": 1
    },
    "endpoint_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Endpoint Url",
      "description": "Optional known endpoint URL. If omitted, backend will infer it when possible."
    },
    "top_p": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Top P",
      "default": 0.9
    },
    "temperature": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Temperature",
      "default": 0.7
    },
    "max_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Tokens",
      "default": 4096
    }
  },
  "type": "object",
  "required": [
    "provider_name",
    "instance_name",
    "image_url",
    "region",
    "endpoint_name"
  ],
  "$defs": {
    "StorageAttachment": {
      "properties": {
        "storage_id": {
          "type": "string",
          "title": "Storage Id"
        },
        "mount_path": {
          "type": "string",
          "title": "Mount Path",
          "description": "Path to mount storage inside container (e.g., /workspace)"
        },
        "read_only": {
          "type": "boolean",
          "title": "Read Only",
          "default": false
        }
      },
      "type": "object",
      "required": [
        "storage_id",
        "mount_path"
      ],
      "title": "StorageAttachment"
    }
  }
}