APIs / Hugging Face / Model

Hugging Face: Model

One model's details: downloads, likes, license, task, base models, parameter count, architectures and files.

GET /v1/huggingface/model

Parameters

Send parameters in the query string.

ParameterTypeRequiredAllowed values
idstringRequiredUp to 200 characters
Model id, owner/name, for example meta-llama/Llama-3.1-8B-Instruct.

Example request

Hugging Face
GET/v1/huggingface/model?id=meta-llama%2FLlama-3.1-8B-Instruct
{
  "success": true,
  "data": {
    "id": "meta-llama/Llama-3.1-8B-Instruct",
    "author": "meta-llama",
    "task": "text-generation",
    "library": "transformers",
    "downloads": 3761846,
    "likes": 9241,
    "tags": [
      "transformers",
      "safetensors",
      "llama"
    ],
    "created_at": "2024-07-18T08:56:00.000Z",
    "last_modified": "2024-09-25T17:00:57.000Z",
    "url": "https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct",
    "sha": "0e9e39f249a16976918f6564b8830bc894c89659",
    "gated": "manual",
    "license": "llama3.1",
    "languages": [
      "en",
      "de",
      "fr"
    ],
    "base_models": [
      "meta-llama/Meta-Llama-3.1-8B"
    ],
    "parameters": 8030261248,
    "parameters_by_dtype": {
      "BF16": 8030261248
    },
    "architectures": [
      "LlamaForCausalLM"
    ],
    "model_type": "llama",
    "storage_bytes": 32123357950,
    "file_count": 17,
    "files": [
      ".gitattributes",
      "LICENSE",
      "README.md"
    ],
    "spaces_count": 100,
    "spaces": [
      "HuggingFaceSwarms/scaling-swarms",
      "VIDraft/AI-Model-Market",
      "Dhshshd/Ninqggoai"
    ]
  },
  "meta": {
    "request_id": "req_ad107be61fd14df696485d7fb8be5fba",
    "credits_charged": 1,
    "credits_remaining": 1977
  }
}
200 OKJSONX-Credits-Used: 1
Recorded from our API and shortened.

Run this endpoint in the playground with your own parameters. 1 credit per successful call; failed calls are free.

Response fields

data has these 24 fields, read from a recorded call. The recording leaves out fields that were empty, so a live call can return more.

FieldType
idstring
authorstring
taskstring
librarystring
downloadsinteger
likesinteger
tagsstring[]
created_atstring
last_modifiedstring
urlurl
shastring
gatedstring
licensestring
languagesstring[]
base_modelsstring[]
parametersinteger
parameters_by_dtypeobject
architecturesstring[]
model_typestring
storage_bytesinteger
file_countinteger
filesstring[]
spaces_countinteger
spacesstring[]