# Assets # Upload ## Upload Assets `workers.assets.upload.create(UploadCreateParams**kwargs) -> UploadCreateResponse` **post** `/accounts/{account_id}/workers/assets/upload` Upload assets ahead of creating a Worker version. To learn more about the direct uploads of assets, see https://developers.cloudflare.com/workers/static-assets/direct-upload/. ### Parameters - `account_id: str` Identifier. - `base64: Literal[true]` Whether the file contents are base64-encoded. Must be `true`. - `true` - `body: Dict[str, str]` ### Returns - `class UploadCreateResponse: …` - `jwt: Optional[str]` A "completion" JWT which can be redeemed when creating a Worker version. ### Example ```python from cloudflare import Cloudflare client = Cloudflare() upload = client.workers.assets.upload.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", base64=True, body={ "foo": "string" }, ) print(upload.jwt) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "jwt": "jwt" } } ``` ## Domain Types ### Upload Create Response - `class UploadCreateResponse: …` - `jwt: Optional[str]` A "completion" JWT which can be redeemed when creating a Worker version.