Generate JWT
Changed onGenerate a JWT token for accessing a repository. Supports optional write access for spaces in dev mode, custom expiration, and encryption.
Request
- Base URL: https://huggingface.co
- URL: https://huggingface.co/api/models/{namespace}/{repo}/jwt
- Auth: HTTP bearer
Path parameters
Query parameters
Requested expiration datetime, capped at the default (10 minutes with write, 24 hours for spaces, 1 hour otherwise). Use expires_in instead.
Requested lifetime in seconds, capped at the default (600s with write, 86400s for spaces, 3600s otherwise)
Use billing_details instead.
Response
The JWT token and related information
Changes
- warning
changed the pattern of the
queryrequest parameterexpirationfrom^((\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\d|3[01])|(0[469]|11)-(0[1-9]|[12]\d|30)|(02)-(0[1-9]|1\d|2[0-8])))T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(\.\d+)?(Z)$to^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$ - info
for the
queryrequest parameterbilling_details, the type was generalized from no type tostring - info
for the
queryrequest parameterencrypted, the type was generalized from no type tostring - info
for the
queryrequest parameterinclude_pro_status, the type was generalized from no type tostring - info
for the
queryrequest parameterinference_api, the type was generalized from no type tostring - info
for the
queryrequest parameterwrite, the type was generalized from no type tostring
- warning
- info
added the new optional
queryrequest parameterexpires_in
- info