{
  "openapi": "3.0.1",
  "info": {
    "title": "LLM VRAM Calculator: GPU Fit for Hugging Face Models",
    "description": "Estimate GPU memory for any Hugging Face LLM: weights, KV cache and total VRAM per quantisation (FP16, FP8, INT8, GGUF, AWQ, GPTQ), MoE active params, and fit on RTX, A100, H100, H200, MI300X, Mac and DGX Spark. Pay per result, MCP ready.",
    "version": "1.0",
    "x-build-id": "lDmVgXa7LrmpLb51d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/punkjazz-labs~llm-vram-calculator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-punkjazz-labs-llm-vram-calculator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/punkjazz-labs~llm-vram-calculator/runs": {
      "post": {
        "operationId": "runs-sync-punkjazz-labs-llm-vram-calculator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/punkjazz-labs~llm-vram-calculator/run-sync": {
      "post": {
        "operationId": "run-sync-punkjazz-labs-llm-vram-calculator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "modelIds": {
            "title": "Hugging Face model ids",
            "type": "array",
            "description": "Models to size, as \"org/name\" or a huggingface.co link. Each model x quantisation is one billable row ($0.003). Leave empty and add a search query, or leave both empty to size Qwen/Qwen3-8B. Gated models (Llama, Gemma) need a token below.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Optional. Also size the most downloaded text-generation models on Hugging Face matching this text. Example: \"llama 3.3 70b\" or \"gpt-oss\"."
          },
          "searchLimit": {
            "title": "Max search results",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many models to take from the search query (1 to 50), most downloaded first. Ignored without a search query.",
            "default": 5
          },
          "quantizations": {
            "title": "Quantisations",
            "type": "array",
            "description": "Weight precisions to compare. Supported: fp32, fp16, bf16, fp8, int8, q8_0, q6_k, q5_k_m, q4_k_m, q3_k_m, int4, awq, gptq, mxfp4 (short forms like q4, q8 and 8bit also work). One row per model per quantisation.",
            "default": [
              "fp16",
              "int8",
              "q4_k_m"
            ],
            "items": {
              "type": "string"
            }
          },
          "contextLength": {
            "title": "Context length (tokens)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Tokens held in the KV cache per sequence (prompt plus output). Default 8192. Use 0 for each model's maximum context from config.json. Example: 32768.",
            "default": 8192
          },
          "batchSize": {
            "title": "Concurrent sequences (batch)",
            "minimum": 1,
            "maximum": 1024,
            "type": "integer",
            "description": "How many sequences run at the same time, each with its own full-length KV cache. 1 for a single chat user; raise it for serving many users.",
            "default": 1
          },
          "kvCacheType": {
            "title": "KV cache precision",
            "enum": [
              "fp16",
              "bf16",
              "fp8",
              "q8_0",
              "q4_0"
            ],
            "type": "string",
            "description": "Precision of the KV cache. FP16 is the default in vLLM, llama.cpp and Ollama; FP8 or Q8_0 roughly halves cache memory.",
            "default": "fp16"
          },
          "targetDevices": {
            "title": "Target GPUs / devices",
            "type": "array",
            "description": "Optional. Limit the fit check to these devices: built-in ids (rtx-3090, rtx-4090, rtx-5090, l40s, a100-40gb, a100-80gb, h100-80gb, h200, mi300x, dgx-spark, apple-16gb to apple-512gb), part of a name (\"4090\"), or a custom \"Name=GB\". Empty checks all built-ins.",
            "items": {
              "type": "string"
            }
          },
          "hfToken": {
            "title": "Hugging Face token",
            "type": "string",
            "description": "Optional read token for gated or private models (Llama, Gemma and similar), after you accept the licence on Hugging Face. Stored encrypted, sent only to huggingface.co, never logged or saved in results."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}