{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pennycompute-com/json-schema/pennycompute-com-instance-start-schema.json",
  "title": "InstanceStart",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pennycompute-com-openapi.json#/components/schemas/InstanceStart",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._:-]{1,128}$",
      "description": "Your name for the instance. A start with the name of an instance that is starting or running returns that instance."
    },
    "image": {
      "type": "string",
      "pattern": "^sha256:[0-9a-f]{64}$",
      "description": "The image digest, as printed by the push to your registry."
    },
    "vcpu": {
      "type": "number",
      "minimum": 0.25,
      "maximum": 16,
      "multipleOf": 0.25,
      "description": "Cores reserved and billed, in quarters. The container sees the next whole number of cores."
    },
    "memory_mib": {
      "type": "integer",
      "minimum": 256,
      "maximum": 65536
    },
    "disk_gb": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 8
    },
    "env": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Environment variables for the container. Up to 64."
    },
    "port": {
      "type": "integer",
      "minimum": 1,
      "maximum": 65535,
      "default": 8080,
      "description": "The port your container listens on. Requests to the instance address arrive there."
    },
    "idle_stop_seconds": {
      "type": "integer",
      "minimum": 5,
      "maximum": 3600,
      "default": 30,
      "description": "Stop after this long with no request open."
    },
    "max_lifetime_seconds": {
      "type": "integer",
      "minimum": 60,
      "maximum": 86400,
      "default": 3600,
      "description": "Stop this long after the start, whatever is running."
    },
    "label": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,63}$",
      "description": "Groups instances in usage."
    },
    "min_request_body_bytes": {
      "type": "integer",
      "minimum": 0,
      "maximum": 4294967296,
      "default": 0,
      "description": "The largest single request body you will send to this instance. The instance is placed where that body can be carried, or the start is refused with no_capacity. Leave it out for bodies up to 100 MB."
    }
  },
  "required": [
    "name",
    "image",
    "vcpu",
    "memory_mib"
  ]
}