How to decode b64_json from gpt-image-1 response

,

:bullseye: What is your goal?

I’m trying to process the b64_json value returned from the gpt-image-1 image generation response in OpenAI while working inside Make.

So far, I’ve tested decoding it using the Make Code (Python) module, but the execution fails with {“main”: null}. I also tried uploading the file to FTP, but the image doesn’t render properly and an error occurs.

My goal:
Convert the b64_json response into a usable image file (e.g., PNG or JPEG) inside Make — either using Make Code, native tools, or any other working approach.

Has anyone successfully decoded b64_json from gpt-image-1 in Make?

Is there a recommended method or module for handling this?

Any working example or guidance would be greatly appreciated. Thanks! :raising_hands:

:thinking: What is the problem & what have you tried?

decoded b64_json from gpt-image-1 in Make

:clipboard: Error messages or input/output bundles

{“main”: null}

Welcome to the Make community!

We’d love to help, however, we require more information that demonstrates the problem to help us reproduce the scenario and any issues and errors.

To allow others to assist you, please provide the following:

1. All Relevant Screenshots

We need to see what you’re working with to give you the best advice. Screenshots are important because Make is a visual editor — a picture provides us with more context.

It would help us identify the issue by having screenshots of:

  • the full scenario, and the zoomed in parts of the scenario that you are referring to (if your scenario is huge),
  • a full scenario run/execution from the history (showing output “speech” bubbles),
  • relevant module fields (showing how you’ve used any built-in functions, and how you’ve mapped the variables),
  • relevant filters between modules (showing which operators and any built-in functions you’ve used, and how you’ve mapped the variables),
  • relevant module input/output bubbles,
  • if applicable, any error messages,
  • and if applicable, any external services (spreadsheet headers/ sample data/ regex101.com/ etc. to show the item/ record exists, and is set up correctly).
Need help❓View instructions ◀

Uploading Attachments

  • You can upload files and images to this forum by clicking on the upload button:

    Uploading a file attachment here will look like this:
    blueprint.json (12.3 KB)

We would appreciate it if you could upload screenshots here instead of linking to them outside of the forum. This allows us to directly zoom in on the image when clicked, and also having improved privacy from third-party sources.

2. Scenario Blueprint

Providing your scenario will allow others to quickly recreate and see how you have set up the mappings in each module, and also allows us take screenshots or provide module exports of any solutions we have for you in return. This would benefit you in implementing our suggestions as you can view screenshots of the changes or paste corrected modules back into your scenario.

Need help❓View instructions ◀

A. Export Blueprint

To export your scenario blueprint, click the three dots at the top-right of the scenario editor then choose “Export Blueprint”.

  • You can upload files and images to this forum by clicking on the upload button:

    Uploading a file attachment here will look like this:
    blueprint.json (12.3 KB)

B. Create Public Share Link

You can also share your scenario by creating a public share link.

3. Module Output Bundles

Please provide the output bundles (input bundles are not so crucial) of each of the relevant modules by running the scenario, or get output bundles from a previous scenario run from the “History” tab.

Providing the output bundles will allow others to replicate what is going on in the scenario, especially if there are complex data structures (nested arrays and collections), especially if external services are involved, and help you with mapping the raw property names from collections.

Need help❓View instructions ◀

Click on the white speech bubbles on the top-right of each module and select “Download output bundles”.

A. Upload as a Text File

Save each bundle contents in a plain text editor as a bundle.txt file. Open the file to check if it has not added additional formatting or encoded the plain text.

  • You can upload files and images to this forum by clicking on the upload button:

    Uploading a file attachment here will look like this:
    output-bundle.txt (12.3 KB)

B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the bundles AND format them correctly.

:warning: Formatting IS Important! :warning:

Here are some ways to provide text content in a way that it won’t be modified by the forum.

  • Method 1: Type Markdown code fence
    Manually type three backticks ``` in a separate line before and after the content, like this,

    ```
    text goes here
    ```
    
  • Method 2: Highlight the pasted content, then click the preformatted text/code button

  • Method 3: Upload your file elsewhere and share the public link
    This method is only advised for large files exceeding the forum upload limit.

Sharing these details will make it easier for others to assist you, so that you can get better answers, faster.

Hope this helps! If you are still having trouble, please provide more details.

@samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!

@Stefan_Materzynski Just saw your post, a little late. But incase you did not find the solution:

toBinary(here data.b64_json; base64)

Cheers
Sven