Skip to main content

Error 400 when using /fetch API



  • Aleksandar Kostadinov

    Hi Andrew,

    The X-Cld-Error response header value you're seeing is related to the length of the public_id which for Fetch resources is the whole remote URL. By default, this limit is 255 characters, however, in your case, the remote URL is less than 255 characters. The reason for the error is that the specified transformations have been picked up as part of the public_id because they contain an invalid transformation parameter which causes the parsing to incorrectly interpret them as part of the public_id which then results in the value going above the 255 limit. 

    Specifically, fetch_format:jpg is not a valid transformation in URLs. fetch_format is the parameter name that should be used when specifying this transformation via one of our SDKs, but in URLs, the fetch_format is specified using (f_) which you are already using, therefore, you won't need this included again.

    Making this change produces the following URL:,dpr_2.0,f_auto,g_north,c_fill,fl_force_strip,w_128/

    Accessing the above leads to a different error and if you inspect the X-Cld-Error header this time you will see the following:

    File size too large. Got 12419652. Maximum is 10485760.

    On our Free plans, the maximum image file-size limit is 10 MiB and as the remote image is larger than this it hits that limit and isn't allowed to be uploaded. However, if you use the same transformations but replace the remote image URL with one that is below 10 MiB then that should work for you.

    Best regards,


  • Andrew Pile

    Hi Aleksandar-


    Thanks for the quick response. I've removed the "fetch_format" parameter and upgraded to the Plus plan. However I'm still getting: x-cld-error: File size too large. Got 12419652. Maximum is 10485760.


    What are the upload limits for Plus?



  • Andrew Pile

    It appears it just took some time for this to work. All good now, thanks!


Post is closed for comments.