Skip to navigation

Signed AI image generation and auth tokens in File Uploader and the JavaScript SDKs

Signed AI image generation is a new project setting, next to Signed Uploads in the uploading settings. It’s on by default for every project, so AI Image Editor requests now need an auth token issued by your backend, even when uploads are unsigned. AI image requests accept tokens only, not signatures.

  • File Uploader 1.35.1 supports authToken, cached and refreshed before it expires.
  • AI Image Editor 0.2.6 supports authToken. Inside File Uploader it uses the uploader’s token.
  • @uploadcare/signed-uploads 6.23.0 supports generateAuthToken for minting tokens on your server, with a lifetime or expiry, scope, operations, and subject/tokenId for the sub/jti claims. Its /client entry includes AuthTokenCache, which holds the token in the browser, refreshes it before it expires and shares one fetch across uploads that start together.
  • Upload Client 6.23.0 supports authToken: a token, a function that returns one, or an AuthTokenCache instance. A function is called for each request and, on AccessTokenExpiredError or OperationsLimitExceededError, once more to retry with a fresh token. When it throws or returns nothing, the upload rejects with AuthTokenResolverError, with the original error on cause.
  • Tokens can be scoped to the AI image endpoints, where each generation or edit spends one operation. See the scope table.

See Signed uploads for setup and the AI Image Editor guide for the editor.