---
title: "Retrieve user avatar"
method: GET
path: "/api/users/{username}/avatar"
tags: ["users"]
---

# Retrieve user avatar

`GET /api/users/{username}/avatar`

This endpoint returns a JSON with the avatar URL for the user.

If called with the `Sec-Fetch-Dest: image` header, it instead redirects to the avatar URL

## Path parameters

- `username` string, required

## Query parameters

- `redirect` unknown

## Response `200`

Avatar URL

- object
  - `avatarUrl` string, uri, required

---

[API](https://skmtc.net/huggingface/apis/hub-api-endpoints.md) · [All operations](https://skmtc.net/huggingface/apis/hub-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huggingface/hub-api-endpoints/versions/6ab9f7d9cfb5/schema)
