Get started
In this guide, you will get started with Cloudflare Images and make your first API request.
Before you make your first API request, ensure that you have a Cloudflare Account ID and an API token.
Refer to Find zone and account IDs for help locating your Account ID and Create an API token to learn how to create an access your API token.
curl --request POST \ --url https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/images/v1 \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: multipart/form-data' \ --form file=@./<YOUR_IMAGE.IMG>
You can dynamically optimize images that are stored outside of Cloudflare Images and deliver them using transformation URLs.
Cloudflare will automatically cache every transformed image on our global network so that you store only the original image at your origin.
To enable transformations on your zone:
- Log in to the Cloudflare dashboard ↗ and select your account.
- Go to Images > Transformations.
- Go to the specific zone where you want to enable transformations.
- Select Enable for zone. This will allow you to optimize and deliver remote images.