Recently, I’ve been trying to implement a Freepik API key to make API calls, as I wanted to select a specific AI model to generate images, specifically Google Image 3. I inputted the correct credentials, but I noticed that the module doesn’t let me add x-freepik-api-key at the beginning before adding the API key. Because of this, I tried using the Authorization header instead, but it gave me the error shown in the image.
From what I’ve researched, there is another way that requires three modules to make an API call to the Google Image 3 endpoints of Freepik:
First, an HTTP POST request to create the image.
Then, a delay of 50 seconds.
Finally, an HTTP GET request to retrieve the generated image.
My question is: Is there any way to input something different in the Freepik API call?
So far, the module doesn’t let me add the x-freepik-api-key header. I also tried adding another header with the correct API call structure, but I got an invalid API call error. Interestingly, when I run a local API request using Windows Terminal, it works fine and returns a 200 status code.
One thing to note is that I can’t create a new API key or reset the existing one, since I’m using the Freepik free API plan with the 5 euro free trial. Even when I try with a different free account, I get the same error when using the Freepik API call module. I’m not sure if the module is outdated or if it only works with paid APIs.
Error output of make an api call Freepik module
RuntimeError
[403] <!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Access denied</title>
<link rel="icon" type="image/x-icon" href="https://fps.cdnpk.net/favicons/favicon.ico">
<link rel="icon" type="image/png" href="https://fps.cdnpk.net/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://fps.cdnpk.net/favicons/favicon-16x16.png" sizes="16x16">
<link rel="shortcut icon" type="image/x-icon" href="https://fps.cdnpk.net/favicons/favicon-96x96.png">
<link rel="icon" type="image/x-icon" href="https://fps.cdnpk.net/favicons/favicon-96x96.png" sizes="96x96">
<link rel="apple-touch-icon-precomposed" href="https://fps.cdnpk.net/favicons/apple-icon-57x57.png" sizes="57x57">
<link rel="apple-touch-icon-precomposed" href="https://fps.cdnpk.net/favicons/apple-icon-72x72.png" sizes="72x72">
<link rel="apple-touch-icon-precomposed" href="https://fps.cdnpk.net/favicons/apple-icon-114x114.png" sizes="114x114">
<link rel="apple-touch-icon-precomposed" href="https://fps.cdnpk.net/favicons/apple-icon-144x144.png" sizes="144x144">
<link rel="preload" href="https://fps.cdnpk.net/common/error-image-left.png" as="image" fetchpriority="high">
<link rel="preload" href="https://fps.cdnpk.net/common/error-image-right.png" as="image" fetchpriority="high">
<link rel="preload" href="https://fps.cdnpk.net/static/inter-regular.woff2" as="font" type="font/woff2"
crossorigin="anonymous">
<link rel="preload" href="https://fps.cdnpk.net/static/inter-semibold.woff2" as="font" type="font/woff2"
crossorigin="anonymous">
<link rel="preload" href="https://fps.cdnpk.net/static/inter-bold.woff2" as="font" type="font/woff2"
crossorigin="anonymous">
<link rel="preload" href="https://fps.cdnpk.net/static/degular-semibold.woff2" as="font" type="font/woff2"
crossorigin="anonymous">
<link rel="preload" href="https://fps.cdnpk.net/common/static-errors.css" as="style" crossorigin="">
<link rel="stylesheet" href="https://fps.cdnpk.net/common/static-errors.css" crossorigin="">
</head>
<body class="_otnfkq0">
<div
class="_17lid5f4 _17lid5f1 _1286nb12il _1286nb128l _1286nb18l _1286nb12v3 _1286nb12uf _1286nb16os _1286nb12sl _1286nb124l _1286nb1255 _1286nb1241 _1286nb12dx _1286nb12nl _1286nb12nh _17lid5f3">
<div class="_1286nb1m _1286nb18l _1286nb12v3 _1286nb12t9 _1286nb12tx">
<h4 class="_17lid5f9 _1286nb12n9 _1286nb12mz _1286nb12r3 _1286nb111 _1286nb11ol">Error</h4>
<div class="_17lid5fi">
<div class="_17lid5ft _17lid5fq _17lid5fr"><img alt="Space Man" fetchpriority="high" width="222" height="276"
decoding="async" class="_1286nb1433 _1286nb1434 _1286nb143n _1286nb1446 _1286nb13jl _1286nb11ox"
src="https://fps.cdnpk.net/common/error-image-left.png"></div><span
class="_17lid5ff _1286nb189 _1286nb12r9 _1286nb11ox">403</span>
<div class="_17lid5fo">
<div class="_17lid5ft _17lid5fq _17lid5fs"><img alt="Space Woman" fetchpriority="high" width="153"
height="317" decoding="async"
class="_1286nb1433 _1286nb1434 _1286nb143n _1286nb1446 _1286nb13jl _1286nb11ox"
src="https://fps.cdnpk.net/common/error-image-right.png"></div>
</div>
</div>
<h4 class="_17lid5f9 _1286nb12n9 _1286nb12mz _1286nb12r3 _1286nb11ox">Access denied
</h4>
<p><b>Reference:</b> 0.9b0a3d17.1751657173.25300774</p>
<p><b>My IP Address:</b> 44.209.150.16</p>
<p style="margin-top: 20px;">You don’t have permission to access this resource. This may be due to restricted
content, insufficient
permissions, or a misconfigured request.</p>
</div>
<p class="_1286nb12nx _1286nb168j _1286nb11b9">If the problem persists, contact our support team <a
class="_1286nb15nj _1286nb15op _1286nb12r3"
href="mailto:support@freepik.com?subject=Error%20500">support@freepik.com</a></p>
</div>
</body>
</html>
Images:
Temporary solution: