From the course: Building a Project with the ChatGPT API
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Review images API response - ChatGPT Tutorial
From the course: Building a Project with the ChatGPT API
Review images API response
- [Instructor] Let's see the output of the image's API, a custom image generated based on your text prompt. The response format parameter is important. It drives the model's output. Let's navigate to the API documentation to look at the parameter more closely. There are two possible values for the parameter, URL or b64, which stands for Base64, json. Let's navigate to Postman to see the output. Here on line five, the response format is set to base64_json, which returns the Base64 value of the generated image down here in this output window. You'll need to convert this Base64 value to an image format such as PNG. Let's change the response format attribute to URL, and notice this value is case sensitive. Let's click Send again. And within our output, once it completes we should see two URLs. And yes, there are two URLs that point to the images which you can view and download. Let's look at one of the images by…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.