---
title: "Generate JWT"
method: GET
path: "/api/models/{namespace}/{repo}/jwt"
tags: ["models"]
---

# Generate JWT

`GET /api/models/{namespace}/{repo}/jwt`

Generate a JWT token for accessing a repository. Supports optional write access for spaces in dev mode, custom expiration, and encryption.

## Path parameters

- `namespace` string, required
- `repo` string, required

## Query parameters

- `write` unknown
- `expiration` string, date-time
- `encrypted` unknown
- `inference_api` unknown
- `include_pro_status` unknown
- `billing_details` unknown

## Response `200`

The JWT token and related information

- object
  - `accessToken` string, required — The JWT token with Bearer prefix
  - `exp` integer — Token expiration timestamp in seconds (JWT standard)
  - `token` string, required — The JWT token
  - `encryptedToken` object — Encrypted JWT token and key ID (only if encrypted=true was requested)
    - `encrypted` string, required — The encrypted JWT token
    - `keyId` string, required — Key ID used to encrypt the token

---

[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)
