Hugging Face Users API

User account and organization management

Operations 1

GET /whoami-v2 Get Current User Information #

Documentation

Specifications

SDKs

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/hugging-face-users-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

hugging-face-users-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Hugging Face Hub Users API
  description: Programmatically interact with the Hugging Face Hub to manage models, datasets, spaces, and repositories. Provides endpoints for listing, searching, creating, and managing resources on the Hub.
  version: 1.0.0
  termsOfService: https://huggingface.co/terms-of-service
  contact:
    name: Hugging Face Support
    url: https://huggingface.co/support
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://huggingface.co/api
  description: Hugging Face Hub API production server
security:
- bearerAuth: []
tags:
- name: Users
  description: User account and organization management
paths:
  /whoami-v2:
    get:
      summary: Get Current User Information
      description: Get information about the authenticated user, including their organizations and access tokens.
      operationId: whoami
      tags:
      - Users
      responses:
        '200':
          description: Current user information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserInfo'
              examples:
                Whoami200Example:
                  summary: Default whoami 200 response
                  x-microcks-default: true
                  value:
                    type: example_value
                    id: abc123
                    name: Example Title
                    fullname: example_value
                    email: user@example.com
                    emailVerified: user@example.com
                    plan: example_value
                    canPay: true
                    avatarUrl: https://www.example.com
                    orgs:
                    - name: Example Title
                      fullname: example_value
                      email: user@example.com
                      plan: example_value
                      avatarUrl: https://www.example.com
                      isEnterprise: true
                    auth:
                      accessToken:
                        displayName: example_value
                        role: example_value
        '401':
          description: Invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Whoami401Example:
                  summary: Default whoami 401 response
                  x-microcks-default: true
                  value:
                    error: example_value
                    statusCode: 10
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
          example: example_value
        statusCode:
          type: integer
          description: HTTP status code
          example: 10
    UserInfo:
      type: object
      properties:
        type:
          type: string
          description: Account type (user or organization)
          example: example_value
        id:
          type: string
          example: abc123
        name:
          type: string
          description: Username
          example: Example Title
        fullname:
          type: string
          description: Full display name
          example: example_value
        email:
          type: string
          format: email
          example: user@example.com
        emailVerified:
          type: boolean
          example: user@example.com
        plan:
          type: string
          description: Subscription plan
          example: example_value
        canPay:
          type: boolean
          example: true
        avatarUrl:
          type: string
          format: uri
          example: https://www.example.com
        orgs:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              fullname:
                type: string
              email:
                type: string
              plan:
                type: string
              avatarUrl:
                type: string
                format: uri
              isEnterprise:
                type: boolean
          example: []
        auth:
          type: object
          properties:
            accessToken:
              type: object
              properties:
                displayName:
                  type: string
                role:
                  type: string
          example: example_value
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: HF Token
      description: Hugging Face user access token. Generate from https://huggingface.co/settings/tokens